Active power filters are key elements in both the removal of harmonic components caused by different loads and the maintenance of the power quality. Algorithms which extract the various harmonics from the waveform are therefore needed to generate the references for the active power filters. These algorithms normally extract the sum of all the undesired harmonics. Nevertheless, if it is necessary to compensate certain harmonics or if the individual information of each harmonic component is required, these algorithms are not valid. This work proposes the simultaneous estimation of the amplitudes of various harmonics by taking frequency deviations into consideration. The proposed algorithm uses robust discrete notch filters and approximately estimates the amplitudes of the harmonics in one cycle of the fundamental period.