© 2020 Improving the time efficiency of fringe projection profilometry (FPP) is an attractive problem. For FPP using phase-shifting, it is desired to improve the efficiency by reducing the step number for phase retrieval. This paper proposes a two-step phase-shifting algorithm dedicated to FPP. Considering the physical process of FPP, the captured fringe image is formulated with two variables, i.e. surface reflectance and phase value. And a phase shift is introduced to get the two equations, which lead to the close-form solution for phase calculation. Then the phase error due to ambient light is analyzed via a line-circle model, and an algorithm of refining the phase calculation is proposed based on the estimation of the actual fringe contrast. The validity of the proposed approach is demonstrated with experiments.