Slope Calculator

Slope, line equation, angle and distance from two points

Find the slope between two points, the equation of the line (y = mx + b), its angle, grade percentage and the distance between the points - with a graph.
Share
Try an example:
Your result will appear here as you type.

About Slope Calculator

Formula

m = (y₂ − y₁) ÷ (x₂ − x₁)

y = mx + b

Worked examples

(1, 2) to (4, 8)

m = 6 ÷ 3 = 2, line y = 2x, angle 63.43°, distance 6.71.

How it works

  1. Slope m = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁).
  2. The intercept b = y₁ − m × x₁ gives the line y = mx + b.
  3. Angle = arctan(m); grade = m × 100%.

What you need

  • Two points.

Tips

  • A ramp grade of 1:12 (8.3%) is the usual accessibility limit.

Limitations

  • Vertical lines have an undefined slope.

Runs in your browser. Calculations run in your browser - nothing you enter is sent anywhere.

Definitions

Slope
Steepness: change in y for each unit of x.
Grade
Slope as a percentage.

Frequently asked questions

What does a negative slope mean?+

The line goes down from left to right.

Was this calculator helpful?