Get slope of linear regression line
=SLOPE(known_ys, known_xs)
| Parameter | Description |
|---|---|
known_ys |
An array or range of numeric data points (dependent values). |
known_xs |
An array or range of numeric data points (independent values). |
In the example shown, the formula in E5 is:
=SLOPE(B5:B9,C5:C9) // returns -2
For the example shown, this formula can be manually recreated like this:
=SUM((B5:B9-AVERAGE(B5:B9))*(C5:C9-AVERAGE(C5:C9)))/SUM((B5:B9-AVERAGE(B5:B9))^2)