Statistics How To

How to Find Linear Regression Slope by Hand or Excel

Probability and Statistics > Regression Analysis > How to Find Linear Regression Slope

How to Find Linear Regression Slope: Overview

Remember from algebra, that the slope is the “m” in the formula y = mx + b.
In the linear regression formula, the slope is the a in the equation y’ = b + ax.
They are basically the same thing. So if you’re asked to find linear regression slope, all you need to do is find b in the same way that you would find m.
Calculating linear regression by hand is tricky, to say the least. There’s a lot of summation (that’s the Σ symbol, which means to add up). The basic steps are below, or you can watch a video on how to Find a linear regression equation. The video goes into a lot more detail about how to do summation. Finding the equation will also give you the slope. If you don’t want to find the slope by hand (or if you want to check your work), you can also use Excel. Scroll to the bottom for the video on how to find linear regression slope in Excel.

How to Find Linear Regression Slope: Steps

Step 1: Find the following data from the information given: Σx, Σy, Σxy, Σx2, Σy2. If you don’t remember how to get those variables from data, see this article on how to find a Pearson’s correlation coefficient. Follow the steps there to create a table and find Σx, Σy, Σxy, Σx2, and Σy2.

Step 2: Insert the data into the b formula (there is no need to find a).
how to find linear regression slope

If formulas scare you, you can find more comprehensive instructions on how to work the formula here: How to find a linear regression equation.

How to Find Regression Slope in Excel 2013

Subscribe to our Youtube channel for lots more stats tips and tricks.


If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.

Comments are now closed for this post. Need help or want to post a correction? Please post a comment on our Facebook page and I'll do my best to help!
How to Find Linear Regression Slope by Hand or Excel was last modified: December 9th, 2017 by Stephanie

6 thoughts on “How to Find Linear Regression Slope by Hand or Excel

  1. MJ

    These equations are incorrect. They are backwards, b is the slope and a is the intercept.

  2. Andale

    Hi, MJ,

    Thanks for stopping by, but I think you may be reading this wrong?

    “B” is indeed the slope — and it’s stated as such (“Insert the data into the b formula”)


  3. jhon

    if the regression line y on x is positive what will be the regresion line x on y negative or positive ,,,,,,,,,,,,,,,,,

  4. Andale

    Hello, Jhon,

    My work load doesn’t give me the time to answer stats questions here. However, please feel free to post on our forum :)

    Thanks for stopping by,