I propose a systematic way to derive efficient, error-compensating algorithms for phase-shifting interferometry by integer approximation of well-known data-sampling windows. The theoretical basis of the approach is the observation that many of the common sources of phase-estimation error can be related to the frequency-domain characteristics of the sampling window. Improving these characteristics can therefore improve the overall performance of the algorithm. Analysis of a seven-frame example algorithm demonstrates an exceptionally good resistance to first- and second-order distortions in the phase shift and a much reduced sensitivity to low-frequency mechanical vibration.