Back to blog
Calculators4 min readby Narayana Peddakotla

Latitude and Longitude Distance: Haversine Formula and Limits

Estimate great-circle distance between coordinates, enter negative latitude and longitude correctly, and distinguish straight-line distance from a driving route.

Use the related XKit tool

Open Distance Calculator

The latitude and longitude distance calculator estimates the great-circle distance between two coordinate pairs using the Haversine formula and a spherical Earth radius of 6,371 km. It is not a driving-route or walking-route calculator.

Enter decimal coordinates with the correct signs

Latitude ranges from −90 to 90 degrees and longitude from −180 to 180 degrees. Use positive latitude for north and negative latitude for south; use positive longitude for east and negative longitude for west.

For example, New York is approximately 40.7128, −74.0060 and London is approximately 51.5074, −0.1278. Reversing latitude and longitude or dropping a minus sign changes the locations being compared.

Worked example: New York to London

Using those coordinate pairs and a radius of 6,371 km gives a distance of about 5,570.22 km, or 3,461.17 miles. The miles display converts the kilometer result rather than changing the underlying formula.

Entering the same coordinate pair for both points gives zero distance. This is a useful check before trying a longer-distance example.

Why road distance is different

Great-circle distance follows the shortest path over an idealized spherical surface. Roads, borders, bridges, terrain, and available transport routes can make a real trip longer.

The calculation does not include elevation or Earth's ellipsoidal shape. Use it for approximate geographical separation; use a routing or geodesic service when your task needs route distance or higher geodetic precision.

Frequently Asked Questions

Does this calculate driving distance?

No. It estimates great-circle distance from latitude and longitude. It does not use a road network or calculate a route.

Why should west longitudes be negative?

In signed decimal coordinates, west of the prime meridian is negative longitude and east is positive. The sign identifies which hemisphere contains the point.