Slope Calculator

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

Updated . Free, no sign-up, calculated in your browser.

Slope (m)
2
Equationy = 2x + 0
Angle63.4349°
Grade200%
Distance8.944272
Midpoint(3, 6)

Rise over run

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

Slope measures steepness: how much y changes for each unit of x. Positive slopes rise to the right, negative slopes fall, zero is flat and vertical lines have undefined slope.

The line’s equation in slope-intercept form is y = mx + b, where b is where it crosses the y-axis. Roads and ramps express slope as a percentage grade; ADA ramps can be no steeper than 1:12, about 8.3%.

Example calculation

Example: with x₁ 1, y₁ 2, x₂ 5, y₂ 10, the result is Slope (m): 2.

Equationy = 2x + 0
Angle63.4349°
Grade200%
Distance8.944272
Midpoint(3, 6)

Frequently asked questions

What is the slope formula?

m = (y₂ − y₁) ÷ (x₂ − x₁), the rise over the run between two points.

What does an undefined slope mean?

The line is vertical, so the run is zero and the slope can’t be calculated.

How do I convert slope to percent grade?

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

What slope is allowed for a wheelchair ramp?

ADA standards limit ramps to a slope of 1:12, about 8.3%, meaning 1 inch of rise for every 12 inches of run.

Results are calculated in your browser for general and educational use. Double-check figures before relying on them for graded work or important decisions.