Based on the small scale power system frequency fluctuation frequency leakage problems due to the FFT phase measurement error problem, this paper presents a high accuracy algorithm for phase difference measurement based on windowed discrete Fourier transform, the signal truncated using 4 order Blackman-Harris window, and corrects the phase correction method for discrete spectrum thus to calculate the phase difference. The algorithm for phase difference measurement theory and signal frequency independent, so there is no need to sample the signals of the whole cycle. A simple algorithm, less calculation, high precision, has strong inhibition on the harmonic and noise, simulation results verify the feasibility and effectiveness of the algorithm.