A new least-squares algorithm based on the Kalman filter is presented. The algorithm has a self-perturbing term added to the covariance matrix, which keeps the gain vector from going infinitely small. It not only has a fast tracking capability, but also is immunised against measurement noise. The effectiveness of the algorithm are confirmed through computer simulations.