Background: Phase-shifting interferometry is a kind of important technique used in optical interference metrology. This technique has high precision and good stability, which has been widely used in scientific research and industrial production. Methods: This paper proposes a new method to estimate global phase shift from two interferograms. This method performs algebraic calculation of two interferograms with the assistance of Hilbert transform. An iterative approach is used for the attempted phase to ensure that the minimum of assessment function is obtained. Results: The simulated result indicate that the maximum calculation error of the global phase-shifting is 1.5%. And then we use experimental data to verify the performance of this method. Conclusions: The method proposed in this article is simple but precise, and can cope with interferograms with uneven background and modulation, non-periodic apodization, and random noises. It does not require any specific carrier frequency of the measured interferogram or any adjustment of range of integration in accordance with the carrier frequency.