Fits a straight line to data using linear regression and returns its slope.
SLOPE(yvalues, xvalues)
yvalues and xvalues are single row or column ranges specifying points in a set of data. yvalues and xvalues must be the same size.
SLOPE fits a straight line through these data points, using the linear regression method (least squares). It then returns the slope of that line.
The equation of a straight line may be given as y = a + bx. The linear regression method calculates:
and
b is the slope, returned by this function.
SLOPE(B2:B6, A2:A6)
where the x values in A2:A6 are 1, 2, 3, 4, 5 and the y values in B2:B6 are 2, 4, 6, 8, 11 returns 2.2. The equation of the straight line found is very nearly y = 2x - thus the slope is very nearly (but not quite) 2.
Marketing Campaign Analysis
A company wants to understand how effective their email marketing campaigns are. They track the number of emails sent for each campaign and the corresponding number of sales that resulted directly from those emails. They collect the following data:
Emails Sent (x) | Sales Generated (y) | ||
|---|---|---|---|
A | B | ||
1 | 1000 | 150 | |
2 | 2500 | 320 | |
3 | 4000 | 500 | |
4 | 5500 | 650 | |
5 | 7000 | 810 |
The company wants to find out the rate of change in sales for every email sent. In other words, they want to calculate the slope of the linear relationship between these two variables.
To find the slope, the company can use the SLOPE function. The syntax for the function is:
SLOPE(data_y, data_x)
The company would use the following formula:
SLOPE(B1:B5, A1:A5)
Result: The result of this calculation would be 0.11.
The slope of 0.11 means that, on average, for every additional email sent, the company can expect to generate about 0.11 more sales.
This information is valuable for a number of reasons:
Result for SLOPE(B1:B5, A1:A5):
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof