# Formula for fitting a straight line using least square solution

Please consider this as a request for some urgent help.

I have $N$ points $(x_i,y_i)$, $i = 1,2,3,...N$. I need to fit a straight line (to these points) of the form $y = mx+c$. I need a formula for calculating $m$ and $c$. I am not interested in any particular method or proof. I just need a formula. (hope fully of least squares solution).

-
See formulae 12-15 here. –  Ｊ. Ｍ. Sep 26 '11 at 12:58
@Ross and J.M. : thank you very much for the help. –  Rajesh D Sep 26 '11 at 13:12