How do you calculate the slope and intercept of a regression?

For equations, see:

http://en.wikipedia.org/wiki/Simple_linear_regression