Slope Calculator
Slope and line equation from two points.
- 100% free
- No sign-up
- Private — runs in your browser
- Instant results
Slope between two points
The slope of a line tells you how steep it is — how much y changes for each step in x. From two points this calculator finds the slope, the full line equation, the distance between the points, and their midpoint.
The formulas
- Slope m = (y₂ − y₁) ÷ (x₂ − x₁)
- Line equation y = mx + b, where b is the y-intercept
- Distance = √((x₂ − x₁)² + (y₂ − y₁)²)
- Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
FAQ
Why is my slope "undefined"?
When both points share the same x-value, the line is vertical and its slope is undefined (you'd be dividing by zero). The calculator reports the line as x = a constant instead.
What does a slope of zero mean?
A slope of zero means the line is perfectly horizontal — y doesn't change as x increases. This happens when both points share the same y-value, and the line equation reduces to y = a constant.
What does a negative slope tell me?
A negative slope means the line goes downhill from left to right: as x increases, y decreases. The steeper the downhill, the larger the slope's absolute value, while a positive slope rises from left to right.
How is the y-intercept found from two points?
Once the slope m is known, the y-intercept b comes from rearranging y = mx + b to b = y − mx using either point's coordinates. That gives the full line equation, which the calculator displays in slope-intercept form.
Is this calculator free and private?
Yes — it's free with no sign-up, works on mobile, and computes everything in your browser, so the coordinates you enter are never sent anywhere.