Slope & Line Equation Calculator
Find the slope, equation, length and angle of a line from two points.
A vertical line (equal x values) has an undefined slope and the equation x = a constant.
Rise over run
The slope measures how steeply a line climbs or falls: the change in y divided by the change in x between two points on it. From the slope and one point, the whole line is determined.
m = (y₂ − y₁) ÷ (x₂ − x₁) · y = mx + b
Once you have the slope, the y-intercept follows by extending the line back to where x is zero. The calculator also reports the straight-line distance between the points and the angle the line makes with the horizontal.
Through the points (1, 2) and (3, 8), the slope is 3 and the line is y = 3x − 1. The two points are about 6.32 units apart, and the line rises at roughly 71.6° from horizontal.
Reading a line
Slope is everywhere lines describe change: speed on a distance-time graph, cost per unit, the pitch of a ramp or roof. A clear equation lets you predict any point on the line, not just the two you started with.
Good to remember
- Sign tells direction. Positive rises, negative falls, zero is flat.
- Vertical is special. Equal x values mean an undefined slope.
- Parallel and perpendicular. Parallel lines share a slope; perpendicular slopes multiply to −1.