What does this calculator do?
The straight-line (Euclidean) distance between two points in the plane, computed with the distance formula — which is the Pythagorean theorem applied to the horizontal and vertical differences. The midpoint (the coordinate-wise average) comes free with the same inputs. Coordinates may be negative or decimal, and the distance comes out in the same unit as the coordinates.
Formula
A right triangle with legs Δx and Δy:
d = √((x₂ − x₁)² + (y₂ − y₁)²) midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
How to use it
Enter the coordinates of both points. Order does not affect the distance (the differences are squared); it only flips the sign of Δx and Δy shown in the steps.
Worked example
From (1, 2) to (4, 6): Δx = 3, Δy = 4, d = √(9 + 16) = 5. The midpoint is (2.5, 4).
Frequently asked questions
Does the order of the points matter?
Not for the distance or the midpoint. Swapping the points negates Δx and Δy, but squaring removes the sign, and the average is symmetric.
Can coordinates be negative?
Yes — the formula handles any real coordinates. From (−2, −3) to (1, 1) the distance is √(9 + 16) = 5.
Does this work on a map?
Only for flat, projected coordinates in the same unit. Latitude/longitude pairs live on a sphere and need great-circle formulas instead — this tool is for plane geometry.
Sources
- Coordinate geometry in the Euclidean plane: the distance formula follows from the Pythagorean theorem; the midpoint is the coordinate-wise average of the endpoints.
- OpenStax — Algebra and Trigonometry 2e (the rectangular coordinate system, distance and midpoint formulas)
- Khan Academy — Distance and midpoints (accessible explainer)
- Reviewed: 2026-07-31
Related calculators
Last updated: 2026-07-31 · v1.0.0 · Report an error