An advanced spatial carrier phase-shifting algorithm based on minimizing the coefficient of a variation method is proposed, which realizes the phase extraction of a single-frame spatial carrier fringe pattern. In our test, compared with the existing classical algorithms, the proposed method is proved to have the dual advantages of efficiency and accuracy. In addition, the main factors that may affect the performance of the method are analysed and discussed. The results show that the method proposed is a fast and accurate single-frame phase detection method, which can provide an effective solution for real-time phase demodulation.