Powerline noise is a severe interference source in urban or mine transient electromagnetic (TEM) surveys. TEM systems generally adopt the synchronous detection scheme to suppress the powerline noise. However, when the powerline frequency fluctuates differing from its nominal value (50/60Hz), the considerable powerline noise residue still remains even after synchronous detection. To overcome this problem, this paper proposes the quantitative suppression method for powerline noise taking into account the instability of powerline frequency. The method is based on the adjustment of base-frequency and optimal choice of stacking-times. We represent mathematically the sufficient condition for powerline noise suppression by synchronous detection. It consists of two equations, one with respect to base-frequency and other with respect to stacking-times. The base-frequency is adjusted according to powerline frequency estimate. We first derive the mathematical relationship between frequency estimation accuracy, residual noise amplitude, and stacking-times. Based on it, we develop an efficient algorithm to determine the optimal stacking-times. The algorithm takes as an input the powerline noise estimates and the noise tolerance limit. The tolerance limit is set to a certain value desired by the user, such as 10, 4, and 1 µV. By adjusting base-frequency and determining optimal stacking-times, the powerline noise residue after synchronous detection is reduced to below the desired tolerance limit. We verify the effectiveness of the proposed method for both simulated and actual noise. Experimental results show that the method achieves quantitative suppression of unsteady powerline noise without any damage of effective signal and prevents the measurement time loss due to excessive stacking.