It is important to improve the serviceability of a coordinate measuring machine from both aspects of the hardware and the software. The influence of the software on the measurement accuracy has been almost ignored. Nowadays the testing construction is quite well explored, then special attention is paid to the software. With the coordinate measuring machine, the measured points are obtained as a set of points in area. The coordinates of measured points consist of the original feature and the deviation caused by misalignment, i. e. translated deviation and angular deviation. To evaluate the form deviation accurately, it is required to best-fit the measured feature to the ideal feature. This paper gives a new method of best-fitting. This method is done to fit the datum of measured feature to that of ideal feature. It is so easy to apply to the curved surface as same as to the curved line. The method suggested in this paper is useful to introduce into the commercial coordinate measuring machine.