In phase measurement systems that use phase-shifting techniques, phase errors that are due to nonsinusoidal waveforms can be minimized by applying synchronous phase-shifting algorithms with more than four samples. However, when the phase-shift calibration is inaccurate, these algorithms cannot eliminate the effects of nonsinusoidal characteristics. It is shown that, when a number of samples beyond one period of a waveform such as a fringe pattern are taken, phase errors that are due to the harmonic components of the waveform can be eliminated, even when there exists a constant error in the phase-shift interval. A general procedure for constructing phase-shifting algorithms that eliminate these errors is derived. It is shown that 2j+3 samples are necessary for the elimination of the effects of higher harmonic components up to the j th order. As examples, three algorithms are derived, in which the effects of harmonic components of low orders can be eliminated in the presence of a constant error in the phase-shift interval. algorithm, phase-shift error, nonsinusoidal signals, interferometry.