CCalclabhub

Slope Calculator

Slope is how much a quantity changes vertically for one unit of horizontal movement. It turns two data points into a rate, and once you have it, the whole line follows.

Slope of the line

2

Y-intercept
-1
X-intercept
0.5
Distance between the two points
13.4164

Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.

The formula this calculator uses

Slope = (y2 - y1) / (x2 - x1)

m
Slope — the rate of change of y per unit of x
y2 - y1
Rise — how much the vertical coordinate changed
x2 - x1
Run — how much the horizontal coordinate changed
b
Y-intercept — where the line crosses the vertical axis

How to check the result by hand

  1. 1

    Label the two points consistently

    Call one (x1, y1) and the other (x2, y2). Which is which does not matter, but once chosen it must not change partway through the calculation.

  2. 2

    Compute the rise

    y2 - y1 = 15 - 3 = 12. Keep the sign — it tells you whether the line rises or falls as you move right.

  3. 3

    Compute the run

    x2 - x1 = 8 - 2 = 6. If this comes out zero, stop: the line is vertical and has no defined slope.

  4. 4

    Divide rise by run

    12 / 6 = 2. Read it as "y increases 2 units for every 1 unit of x", rather than as an abstract number.

  5. 5

    Find the intercept to complete the line

    Substitute either point into y = mx + b: b = 3 - 2 x 2 = -1. The line is y = 2x - 1, which you can verify against the second point.

For worked examples, common mistakes and the limits of this formula, read the full How To Calculate Slope page.