In this paper, an efficient and effective method to estimate utility grid harmonics and eliminate their effect during Phase Locked Loop (PLL) phase estimation is proposed. This harmonics estimation algorithm is designed primarily for grid-connected renewable energy systems (RES). The estimation of the grid harmonics is very important for the RES to participate in power quality improvement. The proposed method uses simple arithmetic operations and it can be combined easily with PLL algorithms for grid synchronization. The proposed method has less computation complexity than the other existing method to perform the same task. The overall algorithm can be implemented on a low cost embedded controller with minimum processing time. The simulations and experimental results verified that the algorithm achieves very fast and accurate phase and harmonic estimation on highly distorted utility grids.