Distance & Midpoint Calculator
Distance, midpoint and slope between two points (x₁,y₁) and (x₂,y₂).
Distance uses the Pythagorean formula. A vertical line (same x) has an undefined slope.
Three facts about two points
Give the calculator two points and it returns the straight-line distance between them, the midpoint that sits exactly between, and the slope of the line that joins them.
d = √((x₂−x₁)² + (y₂−y₁)²) · midpoint = ((x₁+x₂)/2, (y₁+y₂)/2)
The distance formula is the Pythagorean theorem in disguise: the horizontal and vertical gaps are the two legs, and the distance is the hypotenuse between the points.
From (0, 0) to (3, 4) the distance is exactly 5, the midpoint is (1.5, 2) and the slope is 4⁄3 ≈ 1.333 — the familiar 3-4-5 right triangle in disguise.
From geometry to the real world
Distance and midpoint calculations underpin mapping, computer graphics, navigation and design. Anywhere positions are given as coordinates, these formulas turn them into lengths and centre points you can actually use.
Quick checks
- Distance is never negative. Squaring removes the direction.
- Midpoint lies between. Its coordinates sit between the two points’.
- Vertical means undefined. Equal x-values give no finite slope.