Slope Calculator (Slope, Intercept, Equation & Distance)
Find the slope of a line through two points with rise over run, y-intercept, straight-line equation, angle of inclination, and point-to-point distance.
Slope Calculator — interactive calculator, computed instantly in your browser.
Slope, Rise over Run: Finding the Equation of a Line
Rise ÷ Run Between Two Points
The slope of a line measures its steepness and direction: how many units y changes for every one unit x moves. Roof pitch, wheelchair ramps, road grades, and profit trends are slope problems in disguise. Give any two points and this calculator returns the slope, y-intercept, full line equation, angle of inclination, and the distance between the points.
1. The Slope Formula (Rise over Run)
- m positive: line rises left-to-right (y grows as x grows)
- m negative: line falls left-to-right (y shrinks as x grows)
- m = 0: horizontal line — no rise at all
- x₂ = x₁: vertical line — slope undefined, because dividing by a zero run is impossible
- |m| greater than 1: steep; |m| under 1: shallow — the sign alone never says how steep
2. From Slope to the Line Equation
With slope m and any point on the line, point-slope form y − y₁ = m(x − x₁) rearranges into the familiar slope-intercept form y = mx + b, where b = y₁ − m·x₁ is the y-intercept. Example with (1, 2) and (4, 8): m = (8 − 2) ÷ (4 − 1) = 2 and b = 2 − 2·1 = 0, so the line is y = 2x — every x doubles into its y.
3. Angle, Distance, and Real Uses
- The inclination angle converts slope into degrees — a 12% road grade is only about 6.8°, yet steep enough for loaded trucks to crawl
- The distance formula is the Pythagorean theorem applied to Δx and Δy along the segment
- ADA ramps cap at 1:12 slope (8.3%) — accessibility codes are slope problems with legal limits
- Roof pitches are quoted as ratios such as 4:12 for exactly the same reason
🔗 Algebra Cross-References
Slope is the entry ticket to coordinate geometry — pair it with our 🧮 Math Hub for quadratic, exponent, and notation solvers.
Lines model data; the statistics calculators below summarize what the data is doing.
Frequently Asked Questions (Slope Calculator)
Subtract the y-coordinates to get the rise, subtract the x-coordinates to get the run, then divide rise by run. For points (1, 2) and (4, 8): (8 − 2) ÷ (4 − 1) = 6 ÷ 3 = 2, so the slope m equals 2 — y climbs two units for every single unit of x movement.
A negative slope means the line falls from left to right: as x increases, y decreases. It describes any declining relationship such as depreciation over time or a descent. The steeper the drop, the more negative the number, with −3 being far steeper than −0.5.
When x₂ equals x₁ the run is zero and division by zero is undefined — the two points form a vertical line whose equation is x = constant. Vertical lines still have a 90-degree inclination and a finite point-to-point distance; only the numeric slope is undefined.
Slope m is the raw ratio rise ÷ run, while the inclination θ expresses that same steepness in degrees through arctangent. A slope of 1 equals 45°, a slope of √3 equals 60° — the same line measured with two different rulers.