Enter two points to get the straight-line (Euclidean) distance between them.
The distance formula is the Pythagorean theorem applied to coordinates: d = √((x2 - x1)² + (y2 - y1)²). The horizontal gap and the vertical gap are the two legs of a right triangle, and the distance is its hypotenuse. For example, from (1, 1) to (4, 5) the gaps are 3 and 4, so d = √(9 + 16) = √25 = 5.
| Point 1 | Point 2 | Distance |
|---|---|---|
| (0, 0) | (3, 4) | 5 |
| (1, 1) | (4, 5) | 5 |
| (0, 0) | (5, 12) | 13 |
| (-2, 3) | (4, -5) | 10 |
| (2, 2) | (5, 6) | 5 |
d = √((x2 - x1)² + (y2 - y1)²). It gives the straight-line distance between two points on a plane.
It is the same thing. The differences in x and y are the two legs of a right triangle, and the distance between the points is the hypotenuse c in a² + b² = c².
No. Squaring removes the sign, so the distance from A to B equals the distance from B to A.
Not accurately over long distances. The Earth is curved, so GPS coordinates need the haversine formula; the flat distance formula is only a rough guess over a few kilometres.
See also: slope calculator · midpoint calculator · pythagorean theorem calculator · all tools