Excel functions / Statistics
SLOPE function
The slope of the straight line that best fits the data: how much y changes for each 1 added to x.
Syntax
=SLOPE(known_y, known_x)
Arguments
known_y: The dependent values: what you want to explain or predict.known_x: The independent values, one for each known_y.
When to use it
SLOPE gives the slope of the straight line that best fits your data: how much y changes, on average, for each 1 added to x. With ad spend as x and sales as y, it answers "how many extra dollars of sales come with each extra dollar of advertising?"
The arguments go y first, then x: the values you want to explain, then the values you explain them with. Pair it with INTERCEPT for the whole line, y = intercept + slope × x.
Examples
Sales per $1k of advertising
A B C D 1 Ad spend Sales 2 10 120 5.18 3 15 150 4 20 168 5 25 205 6 30 222 In D2:
=SLOPE(B2:B6, A2:A6)→ 5.18Each extra $1k of ad spend goes with about $5.18k more sales.
The full line: intercept + slope × x
A B C D 1 Ad spend Sales 2 10 120 276.6 3 15 150 4 20 168 5 25 205 6 30 222 In D2:
=INTERCEPT(B2:B6, A2:A6)+SLOPE(B2:B6, A2:A6)*40→ 276.6Predicted sales for $40k of ad spend. FORECAST does this in one step.
With the arguments the wrong way round
A B C D 1 Ad spend Sales 2 10 120 0.191 3 15 150 4 20 168 5 25 205 6 30 222 In D2:
=SLOPE(A2:A6, B2:B6)→ 0.191This answers a different question: ad spend per dollar of sales.
Common mistakes
- Swapping y and x. SLOPE(known_y, known_x) takes the dependent values first. Swapped, it answers a different question and gives a different number.
- Trusting it far outside the data. The slope describes the range of x you have. Predictions far beyond it (double the biggest ad spend, say) are guesses.
- Ignoring how well the line fits. Every data set has a slope, even a random one. Check RSQ: a low value means the line explains little.
SLOPE in other languages
Excel shows function names in its own language. In these languages it also puts a semicolon between arguments where English has a comma.
- Czech: SLOPE
- Danish: STIGNING
- Dutch: RICHTING
- Finnish: KULMAKERROIN
- French: PENTE
- German: STEIGUNG
- Hungarian: MEREDEKSÉG
- Italian: PENDENZA
- Norwegian: STIGNINGSTALL
- Polish: NACHYLENIE
- Portuguese (Brazil): INCLINAÇÃO
- Portuguese (Portugal): DECLIVE
- Russian: НАКЛОН
- Spanish: PENDIENTE
- Swedish: LUTNING
- Turkish: EĞİM
Practise it
Related functions
- INTERCEPT: Where the best-fit straight line crosses the y axis: the predicted y when x is 0.
- RSQ: R squared: the share of the variation in y that the best-fit line explains, from 0 to 1.
- FORECAST: Predicts a y value for a new x from the best-fit straight line through known data.
- LINEST: Fits a straight line by least squares and returns its slope(s) and intercept, with the full regression statistics (standard errors, R², F, sums of squares) if you ask. Spills.
- CORREL: The correlation coefficient of two data sets: from −1 (opposite) through 0 (unrelated) to 1 (move together).