Slope Calculator
Enter two points to find the slope, distance, midpoint, and line equation. See the complete solution with step-by-step working and formula explanations.
Enter your values above to see the results.
Tips & Notes
- ✓Slope = rise/run. Rise = y₂−y₁ (vertical change). Run = x₂−x₁ (horizontal change).
- ✓Verify your equation by substituting both original points into y=mx+b — both must satisfy it.
- ✓Parallel lines: same slope. Perpendicular lines: slopes multiply to −1. Slope 2/3 → perpendicular is −3/2.
- ✓Road grade % = slope × 100. A road rising 12 ft over 200 horizontal ft: slope = 0.06 = 6% grade.
- ✓Slope from a graph: pick 2 clear grid intersection points, count squares up (rise) and right (run).
Common Mistakes
- ✗Subtracting y in opposite order from x — if y uses y₂−y₁ then x must also use x₂−x₁, never reversed.
- ✗Putting x values in the numerator. Slope = (y₂−y₁)/(x₂−x₁), never (x₂−x₁)/(y₂−y₁).
- ✗Confusing slope 0 (horizontal, y=constant) with undefined slope (vertical, x=constant).
- ✗Swapping x and y coordinates. Point (3,7) has x=3, y=7 — not x=7, y=3.
- ✗Stopping after finding slope without computing b. Full equation needs both m and b.
Slope Calculator Overview
The slope of a line measures both its steepness and direction — how much the y-coordinate changes for each unit increase in the x-coordinate. A positive slope rises from left to right; a negative slope falls; zero slope is horizontal; undefined slope is vertical. Slope appears in every field that analyzes rates of change: the slope of a distance-time graph is velocity, the slope of a velocity-time graph is acceleration, the slope of a cost function is marginal cost, and the slope of a regression line quantifies how much one variable changes per unit change in another.
The slope formula — given two points (x₁,y₁) and (x₂,y₂):
m = (y₂ − y₁) / (x₂ − x₁) = rise / run
EX: Points (2,3) and (6,11) → m = (11−3)/(6−2) = 8/4 = 2 — rises 2 units for each unit right
EX: Points (−1,4) and (3,−4) → m = (−4−4)/(3−(−1)) = −8/4 = −2 — falls 2 units per unit rightLine equation from slope and one point:
EX: slope m=2, point (2,3) → y−3 = 2(x−2) → y = 2x−1 | verify with (6,11): 2(6)−1=11 ✓Distance between the same two points:
d = √((x₂−x₁)² + (y₂−y₁)²)
EX: Points (2,3) and (6,11) → d = √(16+64) = √80 = 4√5 ≈ 8.944Midpoint of the segment:
EX: Midpoint of (2,3) and (6,11) → ((2+6)/2, (3+11)/2) = (4, 7)Parallel and perpendicular slopes: - Parallel lines: identical slopes (m₁ = m₂). Lines 2x+3y=6 and 4x+6y=12 are parallel — same slope −2/3. - Perpendicular lines: slopes are negative reciprocals (m₁ × m₂ = −1). Slope 3/4 → perpendicular slope is −4/3.
EX: Line with slope 2 is perpendicular to a line with slope −1/2. Check: 2×(−1/2) = −1 ✓Slope is the rate at which the output changes per unit of input — the conversion factor between the two variables. Positive slope means both increase together; negative slope means one decreases as the other increases; zero slope means the output is constant regardless of input. In physics, slope on a position-time graph is velocity; on a velocity-time graph, it is acceleration. In economics, slope of the demand curve is price sensitivity; slope of the cost curve is marginal cost. Perpendicular lines have slopes that are negative reciprocals of each other: if one line has slope m, any line perpendicular to it has slope −1/m. Parallel lines have identical slopes — same steepness and direction, different vertical position. The midpoint formula gives the point exactly halfway between two points, and the distance formula extends the Pythagorean theorem to measure the length of any line segment in the coordinate plane.