Distance Between Coordinates Calculator
Our free geography & distance converter handles distance between coordinates conversions. See tables, ratios, and examples for quick reference.
Distance Between Coordinates Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: d = R * 2 * atan2(sqrt(a), sqrt(1-a)) where a = sin(dLat/2)^2 + cos(lat1)*cos(lat2)*sin(dLon/2)^2
Worked example โ ~3,944 km (2,451 mi) great circle distance
Formula
d = R * 2 * atan2(sqrt(a), sqrt(1-a)) where a = sin(dLat/2)^2 + cos(lat1)*cos(lat2)*sin(dLon/2)^2
The Haversine formula computes the great-circle distance (shortest path on a sphere) between two points given their latitude and longitude. It first calculates a central angle using half-angle sines to maintain numerical stability, then multiplies by Earth's mean radius to get the arc length in kilometers.
Worked Examples
Example 1: New York to Los Angeles
Problem:Calculate the distance from New York (40.7128N, 74.006W) to Los Angeles (34.0522N, 118.2437W).
Solution:Using Haversine formula: dPhi = -6.6606 deg, dLambda = -44.2377 deg a = sin(-3.3303)^2 + cos(40.7128)*cos(34.0522)*sin(-22.1189)^2 a = 0.003378 + 0.6302 * 0.8288 * 0.1417 = 0.07741 c = 2 * atan2(sqrt(0.07741), sqrt(0.92259)) = 0.5624 rad Distance = 6371 * 0.5624 = 3,583 km
Result:~3,944 km (2,451 mi) great circle distance
Example 2: London to Paris
Problem:Calculate the distance from London (51.5074N, 0.1278W) to Paris (48.8566N, 2.3522E).
Solution:dPhi = -2.6508 deg, dLambda = 2.4800 deg Short distance, so both Haversine and flat-earth give similar results. Distance = 6371 * c = ~341 km
Result:~341 km (212 mi) great circle distance
Frequently Asked Questions
How does the Haversine formula calculate distance between coordinates?
The Haversine formula calculates the great-circle distance between two points on a sphere. It uses the half-versine function (haversine) to avoid floating-point errors that occur with the simpler spherical law of cosines at small distances. The formula accounts for Earth's curvature by computing the central angle between the two points and multiplying by Earth's radius (6,371 km). It is accurate to within about 0.3% because it assumes a perfect sphere rather than Earth's actual oblate spheroid shape.
What is the difference between Haversine and Vincenty distance?
The Haversine formula treats Earth as a perfect sphere and provides accuracy within about 0.3% for most distances. The Vincenty formula can model Earth as an oblate spheroid (ellipsoid) and is accurate to within 0.5 millimeters. The spherical Vincenty shown here is numerically more stable than Haversine for antipodal points but assumes a sphere. For surveying and geodetic applications requiring sub-meter precision, the full ellipsoidal Vincenty or Karney algorithm should be used instead.
When should I use Euclidean distance instead of Haversine?
Euclidean (flat-earth) approximation is suitable only for very short distances, typically under 10 kilometers, where Earth's curvature has negligible effect. It uses a simple Pythagorean calculation after scaling longitude by the cosine of latitude. For distances over 100 km, the error becomes significant and Haversine should be used. For example, at a 1000 km distance, the flat-earth approximation can err by several percent. The Euclidean method is useful for quick calculations in small areas like city-level distances.
How accurate is the great circle distance for real-world travel?
Great circle distance represents the shortest possible path over Earth's surface and is the theoretical minimum distance between two points. Actual travel distances are always longer because roads, rail, and even aircraft routes must account for terrain, airspace restrictions, weather, and infrastructure. Road distance is typically 20-40% longer than great circle distance. Flight paths are usually 5-15% longer due to air traffic routes and wind optimization. Ships follow great circle routes more closely but must navigate around land masses.
What is the initial bearing and why does it change along a great circle?
The bearing reported here is the initial bearing, the compass heading in degrees from true north at the departure point. Along a great circle the heading changes continuously, because the route crosses successive meridians at different angles. Only routes along the equator or directly along a meridian keep a constant heading. A rhumb line, which does hold a fixed bearing, is easier to steer but is always longer than the great circle for any route with an east-west component.
How should latitude and longitude signs be entered?
Use signed decimal degrees: latitude is positive north of the equator and negative south, longitude is positive east of the prime meridian and negative west. New York is 40.7128, -74.0060 and Sydney is -33.8688, 151.2093. Coordinates written in degrees, minutes and seconds convert to decimal by adding minutes divided by 60 and seconds divided by 3600, then applying the hemisphere sign. A dropped minus sign is the usual explanation for a distance that lands thousands of kilometres off.
Why is the geographic midpoint not the average of the two coordinates?
Averaging latitude and longitude treats the coordinate grid as flat, which fails in two ways. Meridians converge toward the poles, so equal longitude steps cover shrinking ground distances, and the average breaks entirely across the antimeridian, where 179 degrees east and 179 degrees west average to zero instead of 180. The correct method converts both points into three-dimensional unit vectors, averages those vectors, and projects the result back onto the sphere, which is what the midpoint shown here does.
How is a nautical mile related to a degree of latitude?
The nautical mile was historically defined as one minute of arc of latitude along a meridian and is now fixed at exactly 1852 metres. Because one degree contains 60 minutes, one degree of latitude spans about 60 nautical miles, or roughly 111 kilometres on a spherical Earth of radius 6371 km. This is why marine and aviation charts report distances in nautical miles: the unit maps directly onto the latitude scale printed on the chart margin.
Why does a degree of longitude cover less ground away from the equator?
Meridians converge toward the poles, so the east-west ground distance spanned by one degree of longitude scales with the cosine of latitude. At the equator a degree covers roughly 111 kilometres, at 60 degrees latitude the cosine is 0.5 so the same degree covers about 55.6 kilometres, and at the pole it collapses to zero. The Haversine formula handles this automatically through its cosine terms, whereas a naive flat-grid calculation systematically overstates east-west distances at high latitude.
Does the geodetic datum affect a distance calculation?
GPS receivers report coordinates on the WGS84 datum, and web mapping services use the same reference frame. Coordinates taken from an older national datum can differ from WGS84 by tens or even hundreds of metres for the same physical point, so mixing datums shifts each endpoint. The effect on the distance between two nearby points is largely cancelled when both are shifted the same way, but for survey-grade work both coordinates must be expressed in the same datum before any distance is computed.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎFeet to Meters Converter
Convert between feet, meters, yards, and miles for distance and height.
๐งฎMiles to Kilometers Converter
Convert distance between miles, kilometers, nautical miles, and meters.
๐งฎCoordinates Converter
Calculate coordinates converter with inputs, formulas, and instant results.
๐งฎHaversine Distance Calculator
Calculate haversine distance with inputs, formulas, and instant results.
๐งฎDistance on MAP Calculator
Calculate distance on map with inputs, formulas, and instant results.
๐งฎGreat Circle Distance Calculator
Calculate great circle distance with inputs, formulas, and instant results.
๐งฎMAP Scale to Distance Calculator
Calculate map scale to distance with inputs, formulas, and instant results.
๐งฎStep Length to Distance Converter
Calculate step length to distance converter with inputs, formulas, and instant results.