Based on the quotient of inner products, a simple and rapid algorithm is proposed to retrieve the measured phase from two-frame phase-shifting interferograms with unknown phase shifts. Firstly, we filtered the background of interferograms by a Gaussian high-pass filter. Secondly, we calculated the inner products of the background-filtered interferograms. Thirdly, we extracted the phase shifts by the quotient of the inner products then calculated the measured phase by an arctangent function. Finally, we tested the performance of the proposed algorithm by the simulation calculation and the experimental research for a vortex phase plate. Both the simulation calculation and the experimental result showed that the phase shifts and the measured phase with high accuracy can be obtained by the proposed algorithm rapidly and conveniently.