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

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

  1. Sales per $1k of advertising

    ABCD
    1Ad spendSales
    2101205.18
    315150
    420168
    525205
    630222

    In D2: =SLOPE(B2:B6, A2:A6) → 5.18

    Each extra $1k of ad spend goes with about $5.18k more sales.

    Try this example

  2. The full line: intercept + slope × x

    ABCD
    1Ad spendSales
    210120276.6
    315150
    420168
    525205
    630222

    In D2: =INTERCEPT(B2:B6, A2:A6)+SLOPE(B2:B6, A2:A6)*40 → 276.6

    Predicted sales for $40k of ad spend. FORECAST does this in one step.

    Try this example

  3. With the arguments the wrong way round

    ABCD
    1Ad spendSales
    2101200.191
    315150
    420168
    525205
    630222

    In D2: =SLOPE(A2:A6, B2:B6) → 0.191

    This answers a different question: ad spend per dollar of sales.

    Try this example

Common mistakes

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.

Translate a whole formula

Try SLOPE in the playground

Practise it

Related functions