Slope calculator from two points (with steps)
Type two points. You get the slope, the line's equation in y = mx + b form, the intercepts, the midpoint, the distance, and the parallel and perpendicular slopes.
Worked example: (1, 2) and (3, 8)
- Slope m = (8 − 2) / (3 − 1) = 6/2 = 3.
- Use y = mx + b with (1, 2): 2 = 3(1) + b, so b = −1.
- The line is y = 3x − 1.
- Midpoint: ((1 + 3)/2, (2 + 8)/2) = (2, 5). Distance: √(2² + 6²) = √40 = 2√10.
Remember: parallel lines have the same slope. Perpendicular slopes multiply to −1, so the perpendicular slope here is −1/3.
Quick answers
How do you find the slope between two points?
Slope is rise over run: (y₂ − y₁) / (x₂ − x₁). It doesn't matter which point you call first, as long as you keep the order the same on top and bottom.
What is the slope of a vertical line?
A vertical line has no slope (it's undefined) because the run is 0. Its equation is x = a number.
How do you find a perpendicular slope?
Flip the slope and change its sign. The perpendicular slope to 2/3 is −3/2.