Overview

Slope measures how steep a line is: how much y changes for each step in x. This finds the slope between two points and the line's equation.

Enter the coordinates of two points. They can be negative or decimals.

Worked examples

InputsResult
x11y12x24y28Slope: 2y = 2x + 0
Show 2 more examples
x1-2y15x23y2-5Slope: -2y = -2x + 1
x10y11x24y23Slope: 0.5y = 0.5x + 1

Slope by x2

With the calculator's starting values, the slope is 2. The table shows how it changes with the x2.

x2Slope
26
2.54
33
3.52.4
4starting value2
4.51.71
51.5
5.51.33
61.2

Other inputs: x1: 1 · y1: 2 · y2: 8. Change them in the calculator above for your own numbers.

How it works

Slope is rise over run: the change in y divided by the change in x. The y-intercept is where the line crosses the y-axis, found by putting either point into y = mx + b. If both points have the same x, the line is vertical and its slope is undefined.

The formula

m = (y₂ − y₁) ÷ (x₂ − x₁)
mSlope
by-intercept

Practical tips

  • (1, 2) and (4, 8) give a slope of 2 and the line y = 2x + 0.
  • A negative slope falls from left to right. (−2, 5) and (3, −5) give −2.
  • A slope of 0 is a flat line, while an undefined slope is vertical.

Frequently asked questions

Does the order of the points matter?

No. Swapping them flips both differences, so the slope is the same.

How do I turn slope into a percentage grade?

Multiply by 100. A slope of 0.05 is a 5% grade.

What is the angle of the line?

It's the arctangent of the slope. A slope of 1 is 45°.