Measure the shortest surface distance between two latitude/longitude points on Earth.
Last updated: June 2026 | By Patchworkr Team
Enter a real number.
This calculator uses the spherical law of cosines, not the haversine formula.
Angles are converted from degrees to radians first, and the cosine input is clamped to keep `Math.acos` numerically stable.
Enter both latitude and longitude pairs in degrees, choose the output unit, and read the surface distance on the sphere.
New York City to London is a classic great-circle pair: the shortest surface route is about 5,570 km.
That is the distance along Earth’s surface, not a straight line through space.
The old copy said haversine, but the implementation was actually the spherical law of cosines. This version aligns the text with the code.
Latitudes outside -90 to 90 and longitudes outside -180 to 180 are rejected before the distance is computed.