📈 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.
m = (y₂ − y₁) ÷ (x₂ − x₁) = (10 − 2) ÷ (5 − 1) = 8 ÷ 4 = 2
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
- Choose Two points, Rise and run, or Angle → grade
- Enter the coordinates or measurements
- Read the slope, angle, percent grade and ratio
- 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).
- Rise = 10 − 2 = 8
- Run = 5 − 1 = 4
- m = 8 ÷ 4 = 2
- 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.
- m = 1 ÷ 12 = 0.0833
- Grade = 8.33%
- 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) | Slope | Percent grade | Angle |
|---|---|---|---|
| 1:20 | 0.05 | 5% | 2.86° |
| 1:12 | 0.0833 | 8.33% | 4.76° |
| 1:10 | 0.1 | 10% | 5.71° |
| 1:4 | 0.25 | 25% | 14.04° |
| 1:2 | 0.5 | 50% | 26.57° |
| 1:1 | 1 | 100% | 45° |
| 2:1 | 2 | 200% | 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?
What is the difference between slope, grade and angle?
What does an undefined slope or a zero slope mean?
How do I find the equation of a line from two points?
What slope is allowed for a wheelchair ramp?
Can slope be negative?
References & Further Reading
- U.S. Access Board — Guide to the ADA Standards, Chapter 4: Ramps and Curb Ramps — Running slope 1:12 maximum