An algorithm for frequency measurement based on discrete Fourier transform(DFT) is analyzed, in which the difference between frequency deviations of two adjacent cycles of the signal is not considered. So the frequency measurement error is rather big when the signal frequency variation is rapid. To solve this problem, an improved algorithm is proposed, in which the influence of difference between frequency deviations of two adjacent cycles of the signal on frequency deviation measurement is considered using the original method. The improved algorithm takes the rate of frequency variation of the signal as a parameter and two methods to identify the parameter are given. One consists in using the rate of frequency variation obtained in the preceding calculation, and the other in using the relatively fixed rate of frequency variation. The results of numerical simulation show that the improved algorithm can give fairly good frequency and accuracy in measuring the rate of frequency variation.