The essential step in determination of height in confocal microscopy is localization of the axial peak positions. A sinc2-fitting algorithm was developed to achieve a reliable and theoretically accurate method for height extraction in surface topography measurements. We demonstrate that the sinc2 model closely matches the rigorously calculated axial response for some typical cases, such as low- or high-aperture focusing when scanning a planar object. Compared with the existing methods, such as polynomial fitting and Gaussian fitting, sinc2 fitting can be used to easily determine the initial values of the fitted parameters. In addition, the method is computationally efficient and theoretically rigorous.