Distance Between Coordinates Calculator
Our free geography & distance converter handles distance between coordinates conversions. See tables, ratios, and examples for quick reference.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
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.
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.