Distance Between Two Points (Coordinates & Addresses)
Enter two addresses or coordinates, use your location or click the map. You get the straight-line distance as the crow flies in km, miles, nautical miles and metres, with the Haversine and the precise WGS 84 ellipsoid results, bearing and midpoint.
Or coordinates in any format: 56.9496, 24.1052 · 56°56′58.6″N · N 56° 56.976′
40.712800, -74.006000 — New York
Or coordinates in any format: 56.9496, 24.1052 · 56°56′58.6″N · N 56° 56.976′
51.507400, -0.127800 — London
Distance between the points: New York → London
3,470.50 mi
Ellipsoidal (WGS 84, Karney/Vincenty) · Most accurate value, on the WGS 84 ellipsoid used by GPS.
✈️ Straight-line distance “as the crow flies” over the Earth's surface — not the road, rail or driving distance, which is usually 20–40 % longer.
| Unit | Ellipsoidal (WGS 84, Karney/Vincenty) | Great-circle (Haversine, sphere) |
|---|---|---|
| kilometres | 5,585.23 km | 5,570.23 km |
| miles | 3,470.50 mi | 3,461.18 mi |
| nautical miles | 3,015.78 NM | 3,007.68 NM |
| metres | 5,585,234 m | 5,570,230 m |
| Difference | 9.32 mi (0.269 %) | |
- Initial bearing (A → B)
- 51.2° (north-east, NE)
- Final bearing (on arrival at B)
- 108.4° (east, ESE)
- Midpoint
- 52.389474, -41.277901
52°23′22.1″N 41°16′40.4″W
How it is calculated (with your numbers)
- Convert degrees to radians (× π/180): φ₁ = 40.712800° = 0.710572 rad; φ₂ = 51.507400° = 0.898974 rad; Δφ = 0.188401 rad; Δλ = -0.127800° − (-74.006000°) = 1.289418 rad
- a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) = 0.094061² + 0.757989 · 0.622414 · 0.600966² = 0.179236434
- c = 2 · atan2(√a, √(1 − a)) = 2 · atan2(0.423363, 0.905960) = 0.874308928 rad
- d = R · c = 6,371.0088 km × 0.874308928 = 5570.230 km (Great-circle (Haversine, sphere))
- WGS 84 ellipsoid (a = 6 378 137 m, f = 1/298.257223563), geodesic by Karney's method: s = 5585.234 km; s − d = 15.004 km
- Initial bearing: θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ) = 51.21° (sphere); α₁ = 51.24° (WGS 84)
Map
Search and addresses: Nominatim. Map data © OpenStreetMap contributors (ODbL). Queries are sent from your browser only when you press a button or click the map. © OpenStreetMap · GeographicLib (Karney)
About this tool
Distance between coordinates: Haversine formula
The Haversine formula gives the great-circle distance on a sphere: a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2), c = 2 · atan2(√a, √(1 − a)), d = R · c, with latitude φ and longitude λ in radians and the mean Earth radius R = 6 371.0088 km. It is simple, stable for short distances and accurate to about 0.5 %, because the Earth is not a perfect sphere.
Precise distance on the WGS 84 ellipsoid (Vincenty / Karney)
GPS uses the WGS 84 ellipsoid, flattened at the poles (a = 6 378 137 m, f = 1/298.257223563). The calculator solves the geodesic on that ellipsoid with Karney's algorithm, the modern successor of Vincenty's formulae: it agrees with Vincenty to a fraction of a millimetre and also works for nearly antipodal points where Vincenty fails. Riga to Tallinn, for example, is 279.66 km on the ellipsoid and 279.18 km by Haversine; New York JFK to London Heathrow is 5 554.9 km.
As the crow flies, not road distance
The result is the shortest path over the Earth's surface, the distance a plane or a crow would fly. Driving, walking or rail routes follow roads and are usually 20–40 % longer. The initial bearing tells you which way to set off (0° = north, 90° = east); on a long route the bearing changes along the way, which is why flight paths look curved on flat maps.
Related tools
Find the coordinates of an address with the coordinates finder, the centre between several places with the geographic midpoint calculator, convert the result with the length converter, estimate travel time with the speed converter, or check the local time there with the time zone converter.
Formula
a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2)c = 2 · atan2(√a, √(1 − a))d = R · c, R = 6 371.0088 km (mean Earth radius)WGS 84: a = 6 378 137 m, f = 1/298.257223563 (Karney/Vincenty geodesic)θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ)1 mi = 1.609344 km · 1 NM = 1.852 km
How it is calculated
- Enter point A: an address or place, coordinates in any format (DD, DMS, DDM), or press “Use my location”.
- Enter point B the same way, or open the map and click to set A and B.
- Choose the unit: kilometres, miles, nautical miles or metres.
- Read the precise WGS 84 distance and the Haversine great-circle distance side by side.
- Check the initial bearing, compass direction and the midpoint between the two points.
- Open “How it is calculated” to see the Haversine formula with your numbers, and copy the shareable link.
Questions
What is the difference between Haversine and Vincenty distance?
Haversine treats the Earth as a sphere (R = 6 371 km), so it can be off by up to about 0.5 %. Vincenty and Karney use the WGS 84 ellipsoid, flattened at the poles, and are accurate to well under a millimetre. Riga–Tallinn: 279.18 km by Haversine, 279.66 km on WGS 84.
Is this the driving distance?
No. It is the straight-line distance as the crow flies, the shortest path over the Earth's surface. Roads bend around terrain and towns, so the driving distance is usually 20–40 % longer; use a route planner for that.
How do I calculate the distance between two coordinates by hand?
Convert latitudes and longitudes to radians, compute a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2), then c = 2 · atan2(√a, √(1 − a)) and d = 6 371.0088 km × c. In Excel or Google Sheets: =6371*ACOS(SIN(RADIANS(lat1))*SIN(RADIANS(lat2))+COS(RADIANS(lat1))*COS(RADIANS(lat2))*COS(RADIANS(lon2-lon1))).
What does the initial bearing mean?
It is the compass direction you start in from A to follow the shortest path to B, measured clockwise from true north (0° north, 90° east, 180° south, 270° west). On long routes the direction changes along the way, so the final bearing on arrival differs. New York to London starts at about 51° (north-east).