📈 Slope Calculator

Find the slope of a line from two points or rise and run: slope as a fraction, angle, percent grade, ratio, y = mx + b equation, distance and midpoint.

✓ Free✓ No Signup Required✓ Browser-Based
Slope (m)
2
Angle
63.435°
Percent grade
200%
Ratio (rise : run)
1 : 0.5
Equation
y = 2x + 0
Point-slope form
y − 2 = 2(x − 1)
Distance
8.9443
Midpoint
(3, 6)

m = (y₂ − y₁) ÷ (x₂ − x₁) = (10 − 2) ÷ (5 − 1) = 8 ÷ 4 = 2

(1, 2)(5, 10)

What Slope Calculator Does

This slope calculator finds the slope of a line three ways — from two points, from rise and run, or from an angle — and reports it as a number, a fraction, a percent grade and an angle in degrees. From two points it also gives the equation of the line in slope-intercept form, y = mx + b, the distance between the points, and a small graph so you can see the line.

Slope measures steepness: how far a line rises for each unit it runs horizontally. The same idea shows up in algebra homework, roof pitch, wheelchair ramps, road grades and drainage, just in different units, which is why the result is shown in all of them at once.

How to Use Slope Calculator

  1. Choose Two points, Rise and run, or Angle → grade
  2. Enter the coordinates or measurements
  3. Read the slope, angle, percent grade and ratio
  4. For two points, copy the line’s equation and check the plotted graph

Formula Used by Slope Calculator

Slope from two points

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

m
Slope — rise per unit of run
(x₁, y₁), (x₂, y₂)
Any two points on the line

Worked example

Points (1, 2) and (5, 10).

  1. Rise = 10 − 2 = 8
  2. Run = 5 − 1 = 4
  3. m = 8 ÷ 4 = 2
  4. b = y₁ − m·x₁ = 2 − 2 × 1 = 0

Result: Slope 2 (200% grade, 63.43°); line y = 2x.

Grade and angle

Percent grade = m × 100 · Angle = arctan(m)

Worked example

A ramp that rises 1 inch for every 12 inches of run.

  1. m = 1 ÷ 12 = 0.0833
  2. Grade = 8.33%
  3. Angle = arctan(0.0833) = 4.76°

Result: 8.33% grade, 4.76° — the steepest running slope the ADA allows for a ramp.

Slope, Grade and Angle Equivalents

Ratio (rise:run)SlopePercent gradeAngle
1:200.055%2.86°
1:120.08338.33%4.76°
1:100.110%5.71°
1:40.2525%14.04°
1:20.550%26.57°
1:11100%45°
2:12200%63.43°

How to Read Your Result

Positive, negative, zero, undefined

A positive slope rises from left to right and a negative one falls. A horizontal line has slope 0. A vertical line has no run, and division by zero is undefined, so its slope is undefined and its equation is x = constant rather than y = mx + b.

Percent grade is not the angle

A 100% grade is 45°, not 90°: it means the rise equals the run. Road signs and ramp codes use percent grade or ratios; construction plans often use ratios like 1:12; trigonometry uses the angle. Mixing them up is a common and costly error.

Ramps

The 2010 ADA Standards limit a ramp’s running slope to 1:12 (8.33%) and cross slope to 1:48. Any walking surface steeper than 1:20 counts as a ramp and needs to meet the ramp rules, including landings and handrails where required.

Limitations & Accuracy Notes

  • Angles are measured from the horizontal and rounded to two decimals.
  • Ramp figures summarize the federal ADA Standards; state and local codes can be stricter.

Frequently Asked Questions

How do you find the slope from two points?
Subtract the y-values and divide by the difference of the x-values in the same order: m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (5, 10), m = (10 − 2) ÷ (5 − 1) = 8 ÷ 4 = 2 — the line rises 2 units for every 1 unit it runs.
What is the difference between slope, grade and angle?
Slope is rise ÷ run as a number. Percent grade is that number × 100, so a slope of 0.08 is an 8% grade. The angle is the arctangent of the slope: an 8% grade is about 4.57°. A 100% grade is 45°, not vertical.
What does an undefined slope or a zero slope mean?
A horizontal line has zero rise, so its slope is 0. A vertical line has zero run, and division by zero is undefined — its equation is written x = constant instead of y = mx + b.
How do I find the equation of a line from two points?
Find the slope m, then solve for the y-intercept with b = y₁ − m·x₁. For (1, 2) and (5, 10), m = 2 and b = 2 − 2 × 1 = 0, so y = 2x. The calculator shows both the slope-intercept and point-slope forms.
What slope is allowed for a wheelchair ramp?
Under the 2010 ADA Standards for Accessible Design, a ramp’s running slope may be no steeper than 1:12 — one inch of rise for every 12 inches of run, an 8.33% grade or about 4.76°. Steeper slopes are allowed only for short rises in existing buildings where space is limited.
Can slope be negative?
Yes. A negative slope means the line falls from left to right. The size of the number still tells you how steep it is: −3 is steeper than −0.5.

References & Further Reading

By OnlineToolHubs Team • September 2026