PureBytes Links
Trading Reference Links
MS-EXcel has regression which is the same thing as least squares. The help file contains the formula.