In this study, a calibration method to determine the coordinate transformation between the robot tool and the external axle worktable based on ant colony optimization algorithm is discussed. The approach can be divided into three different steps. Firstly, the transformation relationship between the robot wrist and the contact position sensor tool is calibrated. Secondly, the transformation relationship between the robot tool and the external axle worktable is determined by the robot and the contact position sensor joint measurement system. Finally, ant colony optimization (ACO) algorithm is employed to optimize the key parameters to improve the system accuracy. Based on the presented method, the robot system with external axle is calibrated with successful results. The presented approach is validated to be effective via a real experiment.