The straight-line (“as the crow flies”) distance between two points on a coordinate plane.
How it works
The difference between the x-coordinates and between the y-coordinates are each squared, added together, and the square root gives the distance — a direct application of the Pythagorean theorem.
What this does not include
This does not include 3D coordinates — this calculator works specifically on a 2D plane.
How to use this calculator
- Enter both points’ x and y coordinates.
A worked example
Points (2, 3) and (7, 15): the horizontal difference is 5, the vertical difference is 12. Distance = √(5² + 12²) = √169 = 13 — a classic 5-12-13 right triangle.
What the variables mean
| Variable | Meaning |
|---|---|
| (x₁, y₁), (x₂, y₂) | The two points’ coordinates |
| Horizontal / vertical difference | The two legs of the right triangle formed between the points |
Edge cases worth knowing
Identical points give a distance of exactly zero, since there’s no horizontal or vertical difference to measure.
The formula works the same regardless of quadrant or sign — negative coordinates square to positive values just like positive ones, so the distance is never affected by which side of the axes the points fall on.
Frequently asked questions
Why does this use the Pythagorean theorem?
The horizontal and vertical differences between two points form the two legs of a right triangle, and the straight-line distance between them is the hypotenuse.
Does the order of the two points matter?
No — the distance is the same regardless of which point is labeled first, since squaring removes the sign of the difference either way.
What’s a practical use for this?
Graphics and game programming, geometry homework, and any situation requiring a straight-line distance between two mapped or plotted points.