In image-guided therapy (IGT), the coordinates of the surgical needle's tip can be calculated according to the geometric relationship between the needle's tip and the spherical markers, which are attached on the surgical needle and tracked directly by the optical trackers. Therefore, the step to determine such geometric relationship, also called calibration, is an essential component for IGT system. Precise target-aided method and spherical fitting method are most commonly used for the calibration. However, the accuracy of the former method heavily depends on the precision of the target, which is difficult to guarantee, while the latter method requires a wide range of markers' sampling around the sphere with the tip as the center, which will lead slight tip movement or needle bending and thus affect the accuracy of calibration. We propose a new calibration method based on transform invariant matrix and spherical constraints, by using only a small number of makers' sampling, thus alleviating the challenges caused by tip movement or needle bending. First, the coordinates of the spherical markers in three locations during the needle rotating around the needle' s tip were tracked by the optical tracker. Then, the tip' s coordinate is calculated based on the observation that the tip is a transform invariant point during the rotation and the trajectories of the spherical markers satisfy the spherical constraints. Finally, we complete the calibration precisely.