The four phases stitching algorithm is proposed to demodulate the circular carrier interferogram, which can eliminate the sign ambiguity and avoid serious local errors in the Fourier transform method. A pair of orthogonal low-pass filters is used to obtain four demodulated phases with local errors concentrated in different areas, then their reliable parts are chosen and combined to get the phase without sign ambiguity by a stitching strategy, which makes a significant error suppression. Furthermore, due to the stitching strategy the sign flip location just needs to be detected approximately, therefore the detection can be done using an automatic procedure. The algorithm is validated by the numerical simulations, where the calculation precisions are better than lambda/50 with suitable carrier. Besides, an actual interferogram is analyzed and the result is in good accordance with the Zygo phase-shifting interferometer. (C) 2011 Elsevier Ltd. All rights reserved.