Find a Linear Regression Equation

# Find a Linear Regression Equation

How to Find a Linear Regression Equation in Google Sheets

Written by Michael Mancuso

Updated over a week ago

- Find the linear regression equation given a list of data points
- Find the linear regression equation given a list of data points with business applications

- Paste the data into cell A1 of Google Sheets.
- In an empty cell, enter “=SLOPE({Y data range},{X data range})”, where {Y data range} is the range of cells containing the y-values for the data set and {X data range} is the range of cells containing the x-values for the data set. The resulting value will be the slope of the linear regression equation. For example:
- If the data are arranged in columns, the x-values are in column A, the y-values are in column B, and there are 8 rows with a header row, then enter “=SLOPE(B2:B8,A2:A8)”.
- If the data are arranged in rows, the x-values are in row 1, the y-values are in row 2, and there are 8 columns with a header column, then enter “=SLOPE(B2:H2,B1:H1)”.
- In an empty cell, enter “=INTERCEPT({Y data range},{X data range})”. The resulting value will be the intercept of the linear regression equation.