Abstract Accuracy identification of geometric errors of rotary axis is important for error compensation of the multi-axis machine tool. However, it is not easy because of the influence of setup error of measurement instrument, and there exists angular errors and displacement errors need to be identified simultaneously. In this paper, a decoupled method based on double ball bar is proposed to identify the geometric errors of rotary axis including both position independent geometric error (PIGE) and position dependent geometric error (PDGE). A formulation for ball bar measurement is derived from kinematic analysis to reveal the relationship between sensitivity direction and setup position of ball bar. The angular errors and displacement errors can be identified separately when choosing the appropriate setup position and direction of ball bar. It can effectively reduce the interaction influence between them and improve the accuracy. To identify the 4 PIGEs, a method by averaging the measured results of ball bar to compute the eccentricity and slant of rotary axis is proposed. And, the PDGEs are leaved to mainly describe the oscillation of geometric errors of rotary axis. It is useful to correct the deviation error resulting from setup error of ball bar. For the identification of 6 PDGEs, by means of adjusting setup position and direction of ball bar, they can be identified one by one along the sensitivity direction of ball bar. Furthermore, in order to reduce the influence of setup error of ball bar, the sensitivity analysis is performed to obtain the sensitivity of measured results of ball bar with respect to setup error. According to the sensitivity characteristics of setup error, a method is presented to correct the PDGEs. Finally, several numerical simulations and experiments are conducted to verify the theoretical model and the proposed identification method. The results from the simulations and experiments demonstrate that the method can identify the geometric errors of rotary axis effectively and accurately.