Based on the analysis of phase evaluation algorithms in phase-shifting interferometry (PSI), a novel compensation algorithm for reference phase deviations has been proposed to reduce the linear and quadratic reference phase deviations using interferometry signals. The algorithm evaluates the accurate phase shifts at each step from the interferograms, and then calculates the exact phase difference between the interference beams based on these phase shifts. A numerical simulation was performed and gave evidence to support this novel method. Investigations were performed on a Twyman–Green interferometer for gauge calibration to verify this method. Additional 10% linear and 1% quadratic phase deviations were added on purpose in the phase shifter device. The experiment demonstrates that, for the four- and five-bucket phase evaluation algorithms, the phase errors caused by the linear and quadratic reference phase deviations can be eliminated significantly using the proposed compensation method.