Variable frequency phase shift interferometry is widely applied in optical precision measurement, with the accuracy of phase extraction’s direct impact on that of phase shift interferometry. In the variable-frequency phase-shift interferometry, the commonly used phase-shifting devices are prone to phase shift errors, because the ordinary equal-step phase extraction algorithm, which can be merely used to measure simple and smooth surface, influences the accuracy of phase extraction resulting in measuring error, and causes inefficiency led by the long time the iterative process lasts for when applied in complex stepped surfaces measurement. As a sort of step-by-step phase-shifting phase extraction algorithm based on selective sampling is used to measure the step surface contour, the interference image is firstly sampled at equal intervals to reduce the iterative calculation, and in view of the fact that the phase calibration of the test system is not required in this algorithm, the measured phase is given by using the alternating iterative method despite the unknown phase and unknown phase shift amount. The phase extraction accuracy and iteration time among traditional iterative algorithm, four-step phase shift algorithm and the variable phase shift phase interpolation algorithm based on selective sampling are compared in the simulation and experiment. It is shown that the variable frequency phase shifting interference phase extraction algorithm based on selective sampling has shorter operation time, less error and higher accuracy than traditional iterative algorithm in measuring complex step surface.