About this tool
Enter two points as decimal-degree latitude and longitude and get the great-circle (shortest over-the-globe) distance between them, plus the initial compass bearing from the first point to the second. It all runs in your browser with no map tiles and no network requests.
Distance uses the haversine formula on a sphere of mean Earth radius R = 6371.0088 km: a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2), then c = 2 · atan2(√a, √(1−a)), and distance d = R · c, where φ is latitude and λ is longitude in radians. The initial bearing is atan2(sin Δλ · cos φ2, cos φ1 · sin φ2 − sin φ1 · cos φ2 · cos Δλ), normalized to 0–360°. Miles are km ÷ 1.609344 and nautical miles are km ÷ 1.852.
Results show kilometres (primary), miles, nautical miles and the initial bearing with a 16-point compass direction. As a sanity check, New York (40.7128, −74.0060) to London (51.5074, −0.1278) is about 5570 km.
Frequently asked questions
What formula is used?
The haversine formula on a sphere of radius 6371.0088 km. It gives the great-circle distance — the shortest path over the Earth's surface — which is accurate to well within a percent for most journeys.
In what format do I enter coordinates?
Decimal degrees. North latitude and east longitude are positive; south and west are negative (for example New York is 40.7128, −74.0060). Latitude must be −90 to 90 and longitude −180 to 180.
What is the bearing shown?
The initial great-circle bearing from point 1 to point 2, in degrees clockwise from true north (0–360°), plus the nearest 16-point compass direction such as NE or WSW. Along a great circle the bearing changes as you travel.
Why does distance differ slightly from other tools?
The Earth is not a perfect sphere. Haversine treats it as one, so results can differ by a fraction of a percent from ellipsoidal (Vincenty) methods, and depend on the exact Earth radius chosen.
More tools