How this instrument works
This instrument computes the great-circle distance between two points given as latitude and longitude, using the Haversine formula. 'Great-circle' means the shortest possible path between two points on a sphere — the route a plane or ship would follow if it ignored wind, terrain, and airspace and simply cut the shortest arc over the globe. It is always shorter than, or equal to, a straight line drawn on a flat map projection.
The Haversine formula works by converting the latitude and longitude difference between the two points into a central angle — the angle, measured from the Earth's center, that separates them — and then multiplying that angle by the Earth's radius. It treats the Earth as a perfect sphere rather than the slightly flattened ellipsoid it actually is, which introduces a small error, typically well under half a percent, that is negligible for most navigation, logistics, and mapping purposes.
The Earth radius field lets you trade off which sphere you're measuring against. The default, 6,371 km, is the IUGG mean radius used in most general-purpose distance calculations. Swapping in the WGS84 equatorial radius (6,378.137 km) or a local radius of curvature will scale the result proportionally, since distance is just the central angle times whatever radius you supply.
- Enter Point 1 latitude and Point 1 longitude in decimal degrees — north and east are positive, south and west are negative.
- Enter Point 2 latitude and Point 2 longitude the same way for the destination point.
- Leave Earth radius at the default 6,371 km for a standard great-circle estimate, or swap in a different radius if your application needs one.
- Read Great-circle distance in kilometers — this is the shortest path over the Earth's curved surface, not a straight line on a flat map.
- Latitude must stay between -90 and 90; the instrument will flag values outside that range instead of returning a distance.
Worked example — New York City to Los Angeles
Enter Point 1 as 40.7128 latitude, -74.006 longitude (New York City) and Point 2 as 34.0522 latitude, -118.2437 longitude (Los Angeles), with Earth radius left at 6,371 km. The instrument converts both points to radians, computes the haversine intermediate a, then the central angle c, and multiplies c by the Earth radius. Great-circle distance reads 3935.75 km.
That figure is the shortest arc a great-circle route would trace between the two cities — noticeably different from the roughly 4,500 km you'd drive along interstate highways, because the great-circle path curves north across the continent rather than following any road network. Swapping Earth radius to the WGS84 equatorial value of 6,378.137 km nudges the answer up slightly, to 3940.16 km, since the distance scales directly with whatever radius you supply.
Questions
What does 'great-circle distance' actually mean?
It's the shortest possible distance between two points measured along the surface of a sphere, rather than through it or across a flat map. Picture a giant circle that slices through the Earth's center and passes through both points — the great-circle distance is the length of the shorter arc of that circle between them. Commercial flight paths approximate great-circle routes for exactly this reason: they're the shortest surface path.
Why does this calculator use the Haversine formula specifically?
The Haversine formula is numerically well-behaved for small angular separations, where a naive spherical law-of-cosines calculation can lose precision due to rounding. It's the standard, widely implemented approach for computing great-circle distance from latitude/longitude pairs in navigation and mapping software, and it needs only latitude, longitude, and a sphere radius as inputs.
How accurate is this compared to the real, non-spherical Earth?
The Haversine formula assumes a perfect sphere, but the Earth is an oblate spheroid, slightly flattened at the poles. This introduces an error of roughly 0.1% to 0.5% depending on the route's latitude and orientation — small enough for navigation, logistics routing, and mapping, but not precise enough for geodetic surveying, which uses ellipsoidal formulas like Vincenty's instead.
Why is the distance different from what my car GPS shows for the same two cities?
A GPS driving distance follows actual roads, which curve around obstacles, cities, and terrain, and it's constrained to the routes that exist. Great-circle distance ignores all of that and measures the shortest theoretical path over the Earth's surface, so it's almost always shorter than any real driving or even flying route, which must account for airspace, wind, and airport locations.
What Earth radius should I use, and does it matter much?
For most everyday purposes, the default mean radius of 6,371 km is the standard choice and matches what most online distance tools use. If you need to match a specific standard, such as GPS-grade WGS84 calculations, use the equatorial radius of 6,378.137 km instead — the effect on the final distance is proportional and typically under a tenth of a percent for most routes.
Can I use this for latitude/longitude points that cross the antimeridian, near 180°?
Yes. The formula works with the signed difference between the two longitudes regardless of whether that difference crosses 180°, because it only depends on the sine and cosine of half that difference, both of which are well-defined and continuous at the antimeridian. Just enter each longitude in its normal -180 to 180 range and the trigonometry handles the wraparound correctly.