The increasing use of power electronics in power systems causes a high injection of harmonic components which can in turn interfere with utility equipment and customer loads. Therefore, the correct estimation and measurement of harmonics have become an important issue. If the power frequency of the signal is steady and near the nominal value, the discrete Fourier transform (DFT) can be used and good estimation performance is achieved. However, there are considerable power frequency variations on isolated systems such as shipboard power systems, micro-grids and smart-grids. When these variations occur there may be significant errors in the estimates using the DFT. In order to deal with this problem, this work presents a novel technique based on demodulation of the power line signal and subsequent filtering for harmonics estimation. The main features of the proposed harmonic estimation technique are: precise and accurate estimation of harmonics of off-nominal frequencies and fast estimation of harmonics (about two cycles of the fundamental component). Simulation results show that the proposed technique performs well in comparison with the DFT and can be a good candidate to replace it in cases where the power frequency is subject to considerable variations.