Fast Fourier Transform (FFT) has been widely used for the signal processing because of its computational efficiency. Most power quality meters and digital relays adopt FFT-based algorithm to characterize harmonics of the measured signals. A direct application of FFT-based algorithms may lead to inaccurate results, if the system fundamental frequency varies or interharmonics are present. This paper proposes a modified algorithm of FFT for harmonics and interharmonics measurements. The performance of the proposed algorithm is then validated by testing the simulated and actual measured signals. Results are compared with those obtained by the direct application of a conventional FFT algorithm without corrections. It shows that the solutions obtained by the proposed algorithm are more accurate with reasonable computational time.