If only a segment of a functionf (t)is given, then its Fourier spectrumF(omega)is estimated either as the transform of the product off(t)with a time-limited windoww(t), or by certain techniques based on various a priori assumptions. In the following, a new algorithm is proposed for computing the transform of a band-limited function. The algorithm is a simple iteration involving only the fast Fourier transform (FFT). The effect of noise and the error due to aliasing are determined and it is shown that they can be controlled by early termination of the iteration. The proposed method can also be used to extrapolate bandlimited functions.