Distance Calculator
The straight-line (great-circle) distance between two places from their coordinates, in km, miles and nautical miles.
Two places
Filled in with example values. Replace them with your own.
Decimal degrees (51.5074, −0.1278) or degrees, minutes and seconds (51°30′26″N 0°7′39″W). South and west are negative. Map apps show a place’s coordinates when you tap or right-click it.
Results update as you type.
Result
Great-circle distance: 343.6 km (213.5 mi, 185.5 nmi), initial bearing 148.1° (SSE)
Straight-line distance
343.6km
- Miles
- 213.5
- Nautical miles
- 185.5
- Initial bearingCompass direction at the start
- 148.1° (SSE)
- Midpoint
- 50.19, 1.15
How it’s calculated
Haversine formula
2 × 6,371 km × asin(√(sin²(Δlat/2) + cos lat₁ · cos lat₂ · sin²(Δlon/2))) = 343.6 km
A straight line over the Earth’s surface, not a road, rail or flight route.
How the distance calculator works
Enter the latitude and longitude of two places. The calculator finds the great-circle distance between them, the shortest path over the surface of the Earth, in kilometres, miles and nautical miles, together with the initial compass bearing and the midpoint.
The formula
a = sin²(Δlat/2) + cos lat₁ · cos lat₂ · sin²(Δlon/2)
distance = 2R · asin(√a), R = 6,371.0088 km
1 mile = 1.609344 km; 1 nautical mile = 1.852 km.
Worked examples
- London (51.5074, −0.1278) to Paris (48.8566, 2.3522): about 343.6 km (213.5 miles), setting off south-south-east.
- New York (40.7128, −74.0060) to Los Angeles (34.0522, −118.2437): about 3,935.8 km.
- One degree of longitude along the equator is about 111.2 km.
City coordinates here are approximate city centres.
Frequently asked questions
Is this the driving distance?
No. It is the shortest distance between the two points over the Earth’s surface, as the crow flies. Roads, railways and flight paths are longer, so use a map or route planner for travel distances.
Where do I find coordinates?
Most map apps show a place’s latitude and longitude when you tap and hold, or right-click, on it. Copy them in as two numbers, such as 51.5074, −0.1278.
How accurate is it?
The haversine formula treats the Earth as a sphere with its mean radius of 6,371.0088 km. The Earth is slightly flattened at the poles, so the true distance can differ by a fraction of a percent. That is fine for planning, not for surveying.
What is the initial bearing?
The compass direction to set off in, measured clockwise from north. On a long great-circle route the direction changes along the way, which is why it is called the initial bearing.