Lat/Lon Distance Calculator | Calculate Distance Between Coordinates

Latitude Longitude Distance Calculator

Calculate the distance between two latitude and longitude coordinates. This shows the great circle distance (shortest path over Earth’s surface) between point A and point B.

Finds the distance between two points on Earth using their coordinates.

Last updated: August 2026 | By Summa Calculator

Great circle distance · shortest path over Earth’s surface
Enter two latitude and longitude coordinates to calculate spherical great-circle distance
Point A
Point B
Enter latitude and longitude for both points.

What this distance represents

The result is the length of the shorter great-circle arcbetween the two coordinates on a spherical Earth model. It is not driving distance, flight-plan distance, terrain distance, or the length of a straight tunnel through Earth.

Swapping Point A and Point B leaves the distance unchanged. Identical coordinates correctly produce 0.

The haversine calculation used here

For latitudes φ₁ and φ₂ and coordinate differences Δφ and Δλ, all expressed in radians:

a = sin²(Δφ / 2) + cos(φ₁) cos(φ₂) sin²(Δλ / 2)
c = 2 atan2(√a, √(1 − a))
distance = 6,371.0088 km × c

The implementation clamps the intermediate value a to the interval 0–1 before taking square roots. That prevents tiny floating-point errors near coincident or antipodal points from creating a NaN result.

Check case: New York City → London

New York City
40.7128°, −74.0060°
London
51.5074°, −0.1278°

With the exact spherical model used by this calculator, the great-circle distance is approximately 5,570.230 km. A result from an ellipsoidal geodesic solver will differ slightly because it is solving a different Earth model.

Kilometers, statute miles, and nautical miles

Unit selection changes only how the same calculated distance is displayed. This converter uses the exact international relationships 1 mi = 1.609344 km and 1 nmi = 1.852 km.

A nautical mile is especially useful in marine and aviation contexts because it is defined as exactly 1,852 meters.

When a spherical answer is not enough

Earth is not a perfect sphere. This calculator deliberately uses a mean-radius spherical approximation, which is useful for general geographic distance but is not a survey-grade ellipsoidal geodesic calculation.

For surveying, cadastral boundaries, engineering, or other precision geodesy, use the required coordinate reference system and an ellipsoidal inverse-geodesic method such as one based on WGS84. For road, rail, hiking, or flight routing, use a routing system that models the actual path rather than straight great-circle separation.

Related Tools