Slope Calculator
Calculate slope, y-intercept, and equation of a line.
Calculation Type
Point 1
Point 2
📐 Common Slopes
Slope Formula
Slope
positive
Angle
from horizontal
Rise
vertical change
Run
horizontal change
Distance
between points
Midpoint
center point
Parallel Slope
same slope
Perpendicular Slope
negative reciprocal
Line Equations
Step-by-Step Solution
How it works
Slope measures how steep a line is — the rise (change in y) over the run (change in x) between two points. A positive slope rises left-to-right, negative falls, zero is flat, and a vertical line has undefined slope.
Slope of a line
m = (y₂ − y₁) ÷ (x₂ − x₁)
- (x₁, y₁)
- first point
- (x₂, y₂)
- second point
- m
- slope (rise over run)
Worked example
- Points (1, 2) and (3, 8)
- Rise = 8 − 2 = 6
- Run = 3 − 1 = 2
- m = 6 ÷ 2
Slope m = 3.
Good to know
- A vertical line has zero run, so its slope is undefined (division by zero).
- Parallel lines share the same slope; perpendicular lines have slopes that multiply to −1.
- In y = mx + b, the slope m is the coefficient of x and b is where the line crosses the y-axis.
Related Calculators
Frequently Asked Questions
How do I calculate slope between two points?
Slope m = (y₂ - y₁) / (x₂ - x₁) — rise over run. Between (1, 2) and (4, 11), the slope is (11 - 2) / (4 - 1) = 3.
What do negative, zero, and undefined slopes mean?
A negative slope falls from left to right, a positive slope rises, zero slope is a horizontal line, and a vertical line has undefined slope because the run (x₂ - x₁) is zero.
How do I get the equation of a line from the slope?
With slope m and a point (x₁, y₁), use point-slope form y - y₁ = m(x - x₁), then rearrange to slope-intercept form y = mx + b, where b is the y-intercept.
How does slope convert to percent grade or an angle?
Percent grade is slope x 100, and the incline angle is arctan(m). A 0.10 slope is a 10% grade (about 5.7°), while a 45° incline corresponds to a 100% grade.
What are the slopes of parallel and perpendicular lines?
Parallel lines share the same slope. Perpendicular lines have slopes that are negative reciprocals: a line with slope 2 is perpendicular to one with slope -1/2.