How to use
- Pick what to measure: two points on a flat plane (2D), two points in space (3D), or two places on the Earth given by latitude and longitude.
- Enter the coordinates. For places on Earth you can pick a city to fill its coordinates, or type decimal degrees, or degrees, minutes and seconds with N/S and E/W.
- Read the distance, the steps and, in 2D, the slope, angle and line through the points with a small graph. For Earth distances you also get miles, nautical miles and the starting compass bearing.
Formula
Plane: d = √((x₂ − x₁)² + (y₂ − y₁)²). Space: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). Earth: Lambert's formula on the WGS 84 ellipsoid, d = a(σ − f/2 (X + Y)), where σ is the angle between the points as seen from the centre of the Earth.Example
(1, 1) and (4, 5) are 5 apart. (1, 1, 1) and (2, 2, 2) are √3 = 1.7320508076 apart. Delhi (28.6139, 77.209) to Mumbai (19.076, 72.8777) is about 1,144.5 km, or 711.2 miles, in a straight line.
The Earth distance is the shortest path over the surface, not a road or flight distance, and is accurate to roughly 10 m. Latitude must be between -90 and 90 and longitude between -180 and 180. This tool does not look up addresses or show a map, so nothing you type leaves your browser.