Slope Calculator
Enter two points to get the slope, the angle of incline, the distance between them, and the full line equation with both intercepts — or switch modes to build the line from a single point and a known slope, optionally walking a set distance along it.
Steps
Slope is rise over run
Slope measures steepness as rise divided by run: m = (y₂ − y₁) ÷ (x₂ − x₁). Positive slopes climb left-to-right, negative ones fall, zero is flat, and a vertical line has no defined slope at all (the run is zero). The angle of incline is arctan(m) — a slope of 1 is 45°, a slope of 2 is 63.4°. Once you have m, one point pins the whole line: b = y − mx gives the y-intercept and the equation y = mx + b; setting y = 0 recovers where it crosses the x-axis. A 100% grade on a road sign is a slope of 1.
How it’s calculated
m = Δy ÷ Δx; θ = arctan(m); distance = √(Δx² + Δy²); b = y₁ − m·x₁; x-intercept = −b ÷ m. Point-plus-slope mode walks the optional distance d along the line to (x₁ + d·cos θ, y₁ + d·sin θ) — the point d units away in the increasing-x direction (the mirror point lies the same distance the other way).
Results update as you type and are for education, not professional advice — double-check any number that matters.
Worked example
Points (3, 2) and (7, 10): m = (10 − 2) ÷ (7 − 3) = 2, angle = arctan 2 = 63.43°, distance = √(4² + 8²) = 8.9443. The line is y = 2x − 4, crossing the y-axis at −4 and the x-axis at 2. Point-slope mode: from (1, 4) with m = 0.5, walking d = 6 lands on (6.3666, 6.6833) and the line is y = 0.5x + 3.5.
Common mistakes
- Flipping the ratio to run-over-rise — slope is vertical change divided by horizontal change.
- Mixing point order between numerator and denominator — subtract in the same direction for both.
- Dividing by zero on a vertical line — there the slope is undefined and the equation is x = constant, which this tool reports.
Where it is used
- Graphing homework — finding equations from two points.
- Ramps, roads, and roofs — converting slope to angle or percent grade.
- Physics and data — a straight-line rate of change between two measurements.
Frequently asked questions
What is the difference between slope and angle?
Slope is a ratio (rise ÷ run); the angle is its arctangent. m = 1 → 45°, m = 2 → 63.43°, m = 0.5 → 26.57°. Road grades quote slope as a percent: m × 100, so a 6% grade is m = 0.06 (about 3.4°).
What happens with a vertical line?
Δx = 0, so the slope is undefined — division by zero. The calculator reports the equation as x = constant, the angle as 90°, and skips the y-intercept, which does not exist unless the line is the y-axis itself.
How do I get the equation from just one point?
You also need the slope: b = y₁ − m·x₁, then y = mx + b. That is exactly what the one-point-plus-slope mode does — with (1, 4) and m = 0.5, b = 3.5.
Which second point does the distance option return?
The one d units away in the direction of increasing x: (x₁ + d·cosθ, y₁ + d·sinθ). The equally valid mirror point sits the same distance in the opposite direction, and the steps panel lists it.
Are parallel and perpendicular slopes related?
Parallel lines share the same m. Perpendicular lines have slopes that multiply to −1: a line with m = 2 is perpendicular to one with m = −0.5.