Distance Formula Calculator
Find the distance, midpoint, and slope between two points with the distance formula and step-by-step work.
Find distance between two points
Answer
d = 5
- Midpoint M = ((x1 + x2)/2, (y1 + y2)/2) = (2.5, 4)
- Slope m = (y2 - y1)/(x2 - x1) = 1.333333333
How to use the distance formula calculator
The distance formula is the Pythagorean theorem applied to two points on the coordinate plane. This page also reports the midpoint and slope so you get the full two-point toolkit at once.
- Enter two coordinate points.
- Subtract x-values and y-values.
- Square and add the differences, then take the square root for distance.
- Average the coordinates for the midpoint and divide rise by run for the slope.
Formula or method
d = sqrt((x2 - x1)^2 + (y2 - y1)^2); midpoint M = ((x1 + x2)/2, (y1 + y2)/2); slope m = (y2 - y1)/(x2 - x1).
Worked examples
Distance between points
Problem: (1, 2) and (4, 6)
Solution: d = sqrt(3^2 + 4^2) = 5.
Midpoint and slope
Problem: (1, 2) and (4, 6)
Solution: M = (2.5, 4); slope m = 4/3 ≈ 1.33.