Distance & midpoint formulas
The distance between (x₁, y₁) and (x₂, y₂) is d = √[(x₂ − x₁)² + (y₂ − y₁)²], which is the Pythagorean theorem on a grid. The midpoint averages the coordinates: M = ((x₁ + x₂)/2, (y₁ + y₂)/2).
| Use it to | Formula |
|---|---|
| Distance | d = √[(x₂ − x₁)² + (y₂ − y₁)²] |
| Midpoint | M = ((x₁ + x₂)/2, (y₁ + y₂)/2) |
Distance & midpoint formulas calculator
Pythagoras meets the coordinate plane. Change a value and the diagram, result, and working update together.
Your measurements
Drag either point on the grid, or enter its coordinates. Coincident points have no unique line.
Why it works
The idea
The horizontal and vertical differences between two points form the legs of a right triangle. Their straight-line separation is its hypotenuse. To find the midpoint, average the two x-coordinates and the two y-coordinates separately.
Work through an example
1Work through an example
- For A(−3, −2) and B(4, 5), Δx = 7 and Δy = 7, giving distance √98 = 7√2 ≈ 9.899. The midpoint is ((−3 + 4)/2, (−2 + 5)/2) = (0.5, 1.5).
Common mistakes
- Keep subtraction order consistent for both coordinate differences. Negative coordinates are valid; squared differences still contribute positively to distance.
Make the formula move.
Open the full tool for a larger workspace.