Date & Time
Great Circle / Haversine Distance Calculator
Calculate the great-circle distance between two points on Earth using the Haversine formula. Returns distance in km and miles, initial bearing, and the geographic midpoint.
Point A
Point B
Distance
5570.2
km
Distance
3461.2
miles
Initial Bearing
51.2°
NE
Midpoint
52.3684°
-41.2901°
Great-circle path
Approximate equirectangular projection - for illustration only.
What is the haversine formula?
The haversine formula calculates the great-circle distance between two points on a sphere given their latitude and longitude. The "great-circle" distance is the shortest path between two points on the surface of a sphere - the path a plane or ship takes.
a = sin²(Δlat/2) + cos(lat₁) × cos(lat₂) × sin²(Δlon/2)
c = 2 × atan2(√a, √(1-a))
d = R × c
where R = 6,371 km (Earth's mean radius) Why not simple Pythagorean distance?
Earth is a sphere (technically an oblate spheroid). Treating latitude and longitude as flat x/y coordinates introduces significant error over long distances. For example, 1 degree of longitude near the poles represents a much shorter distance than 1 degree near the equator. The haversine formula accounts for this by working in spherical geometry.
Earth's radius note
This calculator uses Earth's mean radius of 6,371 km (WGS-84). Earth is actually an oblate spheroid - the equatorial radius is 6,378 km and the polar radius is 6,357 km, a difference of about 21 km. Using the mean radius introduces an error of up to ~0.5% in calculated distances. For surveying and navigation requiring higher precision, use the WGS-84 ellipsoid model (Vincenty formula).
Great-circle vs. straight-line distance
The haversine formula calculates the great-circle distance - the shortest path along Earth's surface. A straight-line (chord) distance through the Earth's interior would be shorter but is not a usable travel path. Aircraft follow great-circle routes (or near-great-circle routes adjusted for jet streams) because they represent the shortest surface path between two points.
Practical examples
| Route | Great-circle distance |
|---|---|
| New York -> London | ~5,540 km (3,442 mi) |
| San Francisco -> Tokyo | ~8,280 km (5,143 mi) |
| Sydney -> Cape Town | ~11,000 km (6,835 mi) |
| Los Angeles -> Miami | ~3,755 km (2,334 mi) |