The estimation of the centroid offset can have an effect on the accuracy of wavefront measurements conducted by highly sensitive Shack-Hartmann wavefront sensors. In this paper, a novel offset estimation algorithm processed in the Fourier domain is proposed. This method can be used to process the offset estimation in the Fourier domain and is efficient in noise suppression. The principle of the algorithm is described in detail. Comparisons between the technique and two other widely used algorithms, the best-threshold center of gravity algorithm and the correlation algorithm, are performed theoretically using numerical simulation and experimentally using a Shack-Hartmann wavefront sensor. The results show that the proposed offset estimation algorithm is unbiased, as robust as the correlation algorithm, as fast as the best-threshold center of gravity algorithm, and achieves a good balance between precision and speed.