A reliable algorithm is developed for the analysis of machined aspheric surfaces with a stylus instrument. This research has been done prior to the evaluation of uncertainties in the aspheric surface analysis. The algorithm considers two factors: the pickup configuration (pivoted arm) and the stylus radius. It also compensates for the sample tilt and the axis offset (the setup error) in the best-fit least-squares process. The algorithm consists of two parts for instrument calibration and aspheric surface analysis, and has been coded by means of C++ and MATLAB. Further it was also applied to the instrument calibration and the aspheric surface measurement, and the results were compared with the instrument-produced ones. The developed algorithm shows better performance over the commercial instrument in both the instrument calibration and the analysis of aspheric surfaces. Besides the uncertainty analysis, the developed algorithm will be a basis for the applications that the commercial instrument cannot provide with its own built-in code.