CalcStack — free, instant, no signup. The interactive calculator loads automatically.

Slope Calculator

From (2,3) to (8,11): slope 4/3, y = 1.333x + 0.333, angle 53.13°. Roofers call a 0.5 slope a 6/12 pitch; roads call it a 50% grade.

Slope is one concept wearing four costumes: algebra's rise-over-run, the roofer's pitch, the highway's percent grade, and the engineer's angle of inclination. Enter two points and this calculator returns all of them at once — slope, line equation, distance, midpoint, angle, grade, and the perpendicular slope for the next problem in the set.

Why people use this

Geometry students and builders use the same math: (2,3) to (8,11) → slope 4/3, y = 1.333x + 0.333, angle 53.13°, grade 133% — slope, distance, midpoint in one shot.

How it works

  1. Enter the two points (x₁, y₁) and (x₂, y₂).
  2. Read the slope — rise ÷ run.
  3. Get the full line equation in y = mx + b form.
  4. See distance, midpoint, angle in degrees, and percent grade.
  5. Vertical lines (zero run) are flagged — their slope is undefined, not zero.

Common questions

How do I find the slope between two points?

Subtract the y's, subtract the x's, divide: m = (y₂ − y₁) ÷ (x₂ − x₁). From (2,3) to (8,11): rise = 11−3 = 8, run = 8−2 = 6, slope = 8/6 = 4/3 ≈ 1.333. Order does not matter as long as you stay consistent — (3−11)/(2−8) gives the same 4/3. The sign tells direction: positive slopes climb left-to-right, negative fall, zero is horizontal, and undefined (zero run) is vertical. From slope to equation is one more step: plug either point into b = y − mx. Here b = 3 − 1.333×2 = 0.333, giving y = 1.333x + 0.333. Verify with the other point: 1.333×8 + 0.333 = 11. Checks out.

How does slope relate to percent grade and roof pitch?

They are the same ratio in different dialects. Percent grade = slope × 100: a 6% highway grade rises 6 feet per 100 feet of horizontal run — slope 0.06, angle 3.43°. Roof pitch states rise per 12 of run: a 6/12 pitch is slope 0.5, a 50% grade, 26.57°. Wheelchair ramps are federally capped at slope 1/12 (8.33% grade, 4.76°) — that is the ADA's 1:12 rule. The conversion trap: grade percentages feel small while angles feel big — a 100% grade is only 45°, and the steepest signed highway grades (~10%) look terrifying but are just 5.7°. San Francisco's steepest streets hit 31.5% grade = 17.5° = roughly a 4/12 roof pitch, which reframes both numbers.

Why is the slope of a vertical line undefined?

Because slope = rise ÷ run and a vertical line has zero run — division by zero has no defined value. This is not a technicality: as a line steepens toward vertical, its slope explodes (1, 10, 1000, a million) with no ceiling, so no number can be assigned. Contrast with horizontal lines, which have slope exactly 0 — a perfectly fine number. The perpendicular-slope rule ties it together: perpendicular lines have negative-reciprocal slopes (m and −1/m), so a line perpendicular to slope 2 has slope −0.5. The vertical line's perpendicular is horizontal (slope 0), which is exactly what the rule produces in the limit. In equations: vertical lines are x = constant, horizontal are y = constant — neither fits y = mx + b in the vertical case.

Browse all 500+ free calculators →