Slope Calculator

Find the slope, angle and equation of the line through two points.

What the Slope Calculator does

Slope is rise over run: how much the line climbs for each unit it moves right. Positive slopes rise, negative slopes fall, zero is flat, and a vertical line has no defined slope because the run is zero.

Formula

  • m = (y₂ − y₁) ÷ (x₂ − x₁)
  • y = mx + b
  • Perpendicular slope = −1 ÷ m

Inputs explained

InputUnitRequiredNotes
x₁numberYes
y₁numberYes
x₂numberYes
y₂numberYes

How to use it

  1. Enter x₁, y₁, x₂ and y₂.
  2. Select Calculate.

Worked example

A wheelchair ramp rises 0.5 m over a 6 m run.

x₁, y₁
0, 0
x₂, y₂
6, 0.5

Slope 0.0833, a grade of 8.33% — steeper than the 1:12 (8.33%) accessibility limit allows only just.

Frequently asked questions

What does a slope of zero mean?

A horizontal line. Its y value never changes. A vertical line is the opposite case and has an undefined slope.

How do I convert slope to a percentage grade?

Multiply by 100. A slope of 0.05 is a 5% grade, meaning 5 units of rise per 100 of run.

Related calculators