Skip to content
Calculator Collection

Distance Between Coordinates Calculator

Compute the distance between two latitude/longitude points using Haversine (great-circle), Euclidean (flat-Earth approximation), or Manhattan (city-block) formulas. Returns kilometres on a spherical Earth model — accurate to within ~0.5% for most use cases.

Last updated: May 2026

Compare with similar

About this calculator

For two points on a sphere with latitudes (φ₁, φ₂) and longitudes (λ₁, λ₂), the great-circle distance — the shortest path along the surface — is given by the Haversine formula: d = R · arccos(sin φ₁ · sin φ₂ + cos φ₁ · cos φ₂ · cos(λ₂ − λ₁)), where R is Earth's mean radius (~6371 km) and all angles are in radians. The calculator also offers two simplifications: (1) Euclidean — treats lat/lon as flat 2D coordinates with the longitude axis scaled by cos((φ₁+φ₂)/2) to account for meridian convergence; (2) Manhattan — sum of absolute coordinate differences with the same scaling. Variables: lat1, lon1, lat2, lon2 in degrees (positive = N/E, negative = S/W); method as a selector. Edge cases: Haversine is accurate for any pair of points to within ~0.5% (the residual error comes from Earth not being a perfect sphere — it's an oblate spheroid, 21 km larger at the equator than pole-to-pole). At very short distances (under 1 km) accumulated floating-point error in the trig functions becomes significant; for sub-metre accuracy use the more complex Vincenty formula on the WGS84 ellipsoid. At very long distances (antipodal points, ~20,000 km apart) all formulas degrade — the great-circle from London to Wellington crosses the planet, so direction conventions matter. Euclidean approximation works well at high latitudes where meridian convergence is large; the cosine correction handles most of the error but breaks down near the poles. Manhattan distance has no real physical interpretation on a globe; it's included for taxi-cab-style routing in gridded city areas. Reference values: New York → Los Angeles ≈ 3940 km (Haversine); Sydney → London ≈ 17,000 km; one degree of latitude is always 111.32 km; one degree of longitude varies from 111.32 km at the equator to 0 km at the poles.

How to use

Example 1 — Cross-country flight distance. New York (40.7128°N, 74.006°W) to Los Angeles (34.0522°N, 118.244°W). Enter Starting Latitude = 40.7128, Starting Longitude = -74.006, Destination Latitude = 34.0522, Destination Longitude = -118.244, Method = Haversine. Result ≈ 3935 km. ✓ Slightly different by method: Haversine gives the great-circle 3935 km; Euclidean gives ~3940 km (similar at moderate latitudes); Manhattan gives much larger (~5500 km) because it counts north-south plus east-west separately. The actual flight distance is ~3970 km because aircraft don't fly perfect great circles; the great-circle is the lower bound. Example 2 — Local urban distance. Two restaurants in Manhattan: 40.7580°N, 73.9855°W (Times Square) and 40.7484°N, 73.9857°W (Empire State Building). Enter 40.7580, -73.9855, 40.7484, -73.9857, Haversine. Result ≈ 1.07 km. ✓ All three methods agree within a few metres at this scale because curvature is negligible over kilometre-scale distances. Manhattan distance — counting north-south and east-west separately — is ~1.07 km here because the two points lie almost along a single meridian; for points at a 45° diagonal it would be √2 ≈ 1.41× the straight-line distance.

Frequently asked questions

When should I use Haversine vs Vincenty vs other methods?

Haversine (great-circle on a spherical Earth) is the standard for most applications: navigation, mapping, distance calculation between cities, geocoding. It's accurate to ~0.5% — the residual error comes from Earth being an oblate spheroid, not a perfect sphere. For most uses (transportation routes, flight distances, regional comparisons) this is more than enough. Vincenty's formula uses the WGS84 ellipsoid and is accurate to ~0.5 mm — needed for surveying, geodesy, and any application where sub-metre accuracy matters. It's also more computationally expensive and can fail to converge for nearly-antipodal points. Karney's algorithm (2013) is a modern alternative that's as accurate as Vincenty and more numerically stable. Equirectangular (the calculator's Euclidean option) is the simplest: just Pythagorean distance on lat/lon with cosine-of-latitude correction; accurate to ~1% at moderate latitudes and useful as a quick approximation. Manhattan distance has no geodetic interpretation but is useful for taxi-cab routing in grid-pattern cities.

Why is one degree of longitude not 111 km everywhere?

Because the Earth's circumference around any line of longitude (a meridian) is fixed at ~40,008 km (pole to pole and back), so each degree of latitude is 40,008/360 = 111.13 km consistently. But the Earth's circumference around lines of latitude shrinks as you move away from the equator, going from ~40,075 km at the equator to zero at the poles. The exact relation: one degree of longitude at latitude φ corresponds to 111.32 · cos(φ) km. At 45° latitude, one degree of longitude = 78.7 km; at 60° latitude, 55.7 km; at 80° latitude, 19.3 km. This is why "flat-Earth" distance approximations need a cos(latitude) correction to the longitude difference — without it, distance calculations near the poles can be off by orders of magnitude. The Haversine formula handles this naturally through the trigonometric identities; the calculator's Euclidean option applies the correction explicitly.

What's the difference between great-circle distance and rhumb line?

A great-circle is the shortest path between two points on a sphere — the intersection of a plane through the centre and the sphere's surface. On a Mercator map, great-circles appear as curved lines (except equator and meridians). A rhumb line (loxodrome) is a path of constant compass bearing — on a Mercator map it's a straight line, but in 3D it spirals toward the pole. Rhumb lines are easier to navigate (constant heading) but longer than great-circles for long-distance routes — a transatlantic rhumb-line route is ~5% longer than the great-circle. Modern flights and ships use great-circles for fuel efficiency, often broken into rhumb-line segments because aircraft turn between waypoints rather than continuously adjusting heading. The Haversine formula gives great-circle distance; rhumb-line distance has its own formula involving Mercator-projected coordinates.

What are the most common mistakes computing geographic distance?

The first is mixing degrees and radians — most trig functions expect radians; failing to convert latitude/longitude from degrees produces results off by a factor of 57 or more. The second is sign errors: positive latitude = north, positive longitude = east. Forgetting to make Western Hemisphere longitudes negative (or Southern Hemisphere latitudes) reverses the calculation. The third is using a wrong Earth radius — 6371 km (mean), 6378 km (equatorial), 6356 km (polar) differ by less than 0.5% but compound for long distances. The fourth is using Euclidean distance on lat/lon coordinates directly without latitude correction; at high latitudes this can produce 50%+ errors. The fifth is choosing inappropriate precision: GPS coordinates often have 6+ decimal places (~10 cm resolution), but Earth-radius approximation limits distance accuracy to ~30 m anyway. Finally, for sub-metre work the WGS84 ellipsoid (Vincenty/Karney) is necessary; spherical formulas always have residual error.

When should I not use this calculator?

Skip it for surveying or land-boundary calculations requiring sub-metre accuracy — use Vincenty's formula on WGS84 (or Karney's algorithm) instead. Don't use it for very short distances (under ~10 metres) where GPS measurement error dominates and floating-point precision in trig functions matters. It's the wrong tool for road-network distance — actual driving distance follows roads, not great-circle; use a routing API (Google Maps, OSRM, Mapbox) that computes road distance. Avoid it for nautical or aviation routes that account for currents, winds, and restricted airspace; specialised mission-planning tools are needed. It's also wrong for distance on the Moon, Mars, or other bodies — change the radius. Finally, don't use Manhattan distance as a "real" geographic metric; it has no physical interpretation on a sphere and overestimates by up to √2× the great-circle distance for diagonal moves.

Sources & references