The numerical control (NC) program files need re-generating if there is any tool dimension change or tool wear for multi-axis machining. If the tool is replaced to adapt this change there will be increased cost. To solute this problem, 3D cutter radius compensation method for 5-axis computer numerical control (CNC) machining is deeply researched. Taking five axes linkage machine tools of X, Y, Z, B, C form with rotary tables B and C as an example, coordinate transformation matrix (CTM) and the cutter compensation vector for 3D cutter radius compensation are derived. The discrimination methods for path joint pattern (PJP) are given. A controller with 3D cutter radius compensation function for 5-axis linkage CNC machine tools is developed based on this method. The controller is allocated to a 5-axis milling machine tool and experiments are done. The proposed algorithm is demonstrated using a practical example.