Single frequency estimation is a long-studied problem with application domains including radar, sonar, telecommunications, astronomy and medicine. One method of estimation, called phase unwrapping, attempts to estimate the frequency by performing linear regression on the phase of the received signal. This procedure is complicated by the fact that the received phase is 'wrapped' modulo 2π and therefore must be 'unwrapped' before the regression can be performed. In this paper, we propose an estimator that performs phase unwrapping in the least squares sense. The estimator is shown to be strongly consistent and its asymptotic distribution is derived. We then show that the problem of computing the least squares phase unwrapping is related to a problem in algorithmic number theory known as the nearest lattice point problem. We derive a polynomial time algorithm that computes the least squares estimator. The results of various simulations are described for different values of sample size and SNR.