Great-Circle Distance
Great-circle distance — haversine on a sphere vs Vincenty/Karney on the WGS-84 ellipsoid, the 0.5% accuracy gap, and the JFK-LHR worked example (~5,541 km).
By Steve K.. Published . Last updated .
Great-circle distance is the shortest path between two points on a sphere — the arc of the unique great circle through them. On the WGS-84 ellipsoid the analogous shortest path is the geodesic, computed by Vincenty's (1975) or Karney's (2013) algorithm; it differs from the spherical haversine by up to 0.5%.
The great-circle distance is the foundation of every long-haul navigation calculation and the answer to questions like "how far is it from here to there." Yet on a curved Earth the answer is non-trivial: there are multiple defensible formulas, multiple reference surfaces (sphere versus ellipsoid), and multiple non-obvious choices (which surface? at which epoch? for what use case?). This article runs the math, compares the haversine, Vincenty and Karney algorithms with worked numbers, explains when great-circle differs from rhumb-line, and shows why Vincenty-on-WGS-84 is the modern operational default. The companion supports /learn/haversine-formula-explained, /learn/vincenty-formula-explained, and /learn/great-circle-vs-rhumb-line go deeper.
Great circle, geodesic, rhumb line: three different things
The "shortest path" question has three plausible answers depending on whether the Earth is treated as a sphere or an ellipsoid and whether the path is constrained to a constant compass bearing.
| Path | Earth model | Definition | Constant bearing? |
|---|---|---|---|
| Great circle | Sphere | Arc of the unique great circle through the two points | No — bearing changes continuously |
| Geodesic (ellipsoidal) | WGS-84 ellipsoid | Shortest path on the ellipsoid; reduces to great circle if ellipsoid → sphere | No — bearing changes continuously |
| Rhumb line / loxodrome | Either | Path of constant compass bearing | Yes — by definition |
On the sphere, the great-circle is the shortest path. On the ellipsoid, the geodesic is the shortest path; it differs from a "great circle on the average sphere" by up to 0.5%. The rhumb-line is never the shortest path between two distant points (except along a meridian or along the equator) — it appears straight on a Mercator chart, but it spirals around the globe and is significantly longer than the geodesic for long routes.
The haversine formula: spherical great-circle distance
The haversine formula gives the great-circle distance between two points on a sphere of radius R, using the latitude (φ) and longitude (λ) of each point:
a = sin²((φ₂ − φ₁)/2) + cos(φ₁) × cos(φ₂) × sin²((λ₂ − λ₁)/2)
c = 2 × atan2(√a, √(1 − a))
d = R × c
The formula is numerically stable for small distances (unlike the spherical-cosine formula, which loses precision when the distance is small) and computationally cheap (six trig calls, one square root).
| Property | Value | Note |
|---|---|---|
| Computational cost | ~6 trig + 1 sqrt | Cheap; runs in microseconds |
| Accuracy vs WGS-84 ellipsoid | Up to ~0.5% (~25 km on a 5,000 km path) | Depends on which R is used |
| Standard R for civil engineering | R = 6,371.0088 km (IUGG mean R₁) | (a+a+b)/3 for WGS-84 |
| Standard R for aviation | R = 6,371.0 km (rounded) | ICAO Annex 5 |
| Best case (along equator or meridian) | Exact on sphere; ~0.34% off on ellipsoid | Spherical assumption breaks at the ellipsoid's flattening |
| Worst case (mid-latitude E-W route) | Largest deviation from ellipsoidal | ~0.5% on long routes |
Most web-mapping APIs, fitness trackers, and "distance between two GPS points" implementations use haversine because it's fast and the ~0.5% error is invisible at consumer scale (a 5 km hike is within 25 m of the truth). For scientific or operational navigation, Vincenty or Karney is required.
Vincenty's formula: ellipsoidal geodesic
Vincenty (1975) published an iterative algorithm that solves the inverse geodesic problem on an ellipsoid — given two latitudes and longitudes, return the geodesic distance and initial/final bearings. The algorithm uses nested loops with corrections for ellipsoidal flattening and converges to sub-millimetre accuracy in 1-3 iterations for non-antipodal pairs.
| Property | Vincenty | Karney | Haversine |
|---|---|---|---|
| Earth model | WGS-84 ellipsoid | WGS-84 ellipsoid | Sphere |
| Accuracy (typical) | Sub-millimetre | Sub-nanometre | ~0.5% (large distances) |
| Computational cost | 1-3 iterations × ~15 trig per iter | Closed-form series; faster than Vincenty in practice | 6 trig + 1 sqrt |
| Fails for nearly antipodal points | Yes (Vincenty fails to converge) | No (Karney handles all cases) | Exact (no convergence issues; just ~0.5% off) |
| Published in | Survey Review 23 (1975) | J. Geodesy 87 (2013) | 17th-century formula; modern textbook |
| Used by | NGS Geodetic Tools (Inverse), older GIS, this site's distance calculator | PROJ ≥6.0, modern surveying software | Most web mapping APIs, fitness apps |
Karney (2013) published a closed-form series that supersedes Vincenty for new code: it handles all cases including nearly antipodal points (where Vincenty fails to converge), runs faster, and reaches sub-nanometre accuracy. The PROJ library and most modern geodesy software use Karney internally.
The JFK-to-London worked example
A standard worked example: the great-circle distance from John F. Kennedy International Airport, New York to London Heathrow.
| Quantity | JFK | LHR | Source |
|---|---|---|---|
| Latitude | 40.6413° N | 51.4775° N | OurAirports / IATA |
| Longitude | −73.7781° W | −0.4614° W | OurAirports / IATA |
| Distance (haversine, R = 6,371 km) | ~5,571 km | — | Spherical formula |
| Distance (Vincenty, WGS-84) | ~5,541 km | — | Ellipsoidal |
| Distance (Karney, WGS-84) | ~5,541 km | — | Ellipsoidal, exact |
| Difference haversine vs Vincenty | ~30 km (~0.54%) | — | Ellipsoidal flattening |
| Rhumb-line distance (constant bearing) | ~7,196 km | — | ~30% longer than geodesic |
| Initial bearing (Vincenty) | ~051° (northeast) | — | Forward azimuth |
| Final bearing at LHR (Vincenty) | ~106° (just south of east) | — | Reverse azimuth + 180° |
| Time difference | 5 h 0 min (EST−GMT) | — | Standard time |
A long-haul JFK−LHR flight follows close to the geodesic route — New York to London by great circle passes over Greenland and crosses the North Atlantic at ~58° N (well north of the rhumb-line course at ~45° N). The geodesic saves about 1,655 km (~30%) over the rhumb-line; in fuel terms, that's ~10 tonnes of jet fuel per flight.
Why flight paths look curved on web maps
A great-circle route is straight on the globe but curved on most flat-map projections. The "curve" is the projection's response to flattening a 3D arc onto a plane.
| Map projection | Great-circle appearance | Rhumb-line appearance |
|---|---|---|
| Globe (3D) | Straight line on the surface | Spiral toward the pole |
| Mercator | Curved arc (concave toward equator in N hemisphere) | Straight line |
| Web Mercator (Google Maps) | Curved arc | Straight line |
| Gnomonic | Straight line | Curved arc |
| Equirectangular (plate carrée) | Curved (varies with route) | Curved |
| Azimuthal equidistant (centred on JFK) | Straight radial line from JFK | Curved |
The gnomonic projection has the special property that all great circles are straight lines — useful for plotting initial trans-oceanic routes. Marine and aviation practice plots the great circle on a gnomonic chart, reads off waypoints at convenient intervals (every 5° or 10° of longitude), then sails or flies short rhumb-line legs between waypoints on a Mercator chart.
When the formula choice matters
| Use case | Required accuracy | Recommended algorithm |
|---|---|---|
| Distance between two cities on a webpage | ~1% acceptable | Haversine on sphere (R = 6,371 km) |
| Fitness app step / route distance | ~1-2% acceptable | Haversine |
| Marine voyage planning | < 1% required | Vincenty or Karney on WGS-84 |
| Aviation flight planning | Centimetres on long routes | Karney on WGS-84 |
| Surveying baseline measurement | Sub-millimetre | Karney + post-processed GPS |
| Plate tectonics / geodynamics | Millimetres over years | Karney + ITRF realizations + time-dependent transformations |
The Coordinately distance calculator uses Vincenty on WGS-84 by default, with haversine available as a comparison option. For the JFK-LHR example, the difference is ~30 km — visible in the answer.
Common misconceptions
Related pillars
The other seven pillar concepts on Coordinately:
- What is latitude and longitude? — the angular coordinates a distance is computed between
- Coordinate formats explained — format choice affects whether distance is direct or computed
- How GPS works — produces the coordinates these formulas consume
- What is a map projection? — why the great-circle path looks curved on most maps
- What is a geodetic datum? — the WGS-84 ellipsoid Vincenty and Karney run on
- Time zones explained — the time-difference half of "how far is it?"
- History of latitude and longitude — from Eratosthenes to Vincenty
Related
- Haversine Formula Explained— The classical spherical great-circle formula (when shipped)
- Vincenty Formula Explained— The ellipsoidal upgrade to great-circle (when shipped)
- What Is a Rhumb Line?— The constant-bearing alternative (when shipped)
- Distance Calculator— Vincenty on WGS 84 with haversine fallback
- Methodology— How content is sourced and verified
Frequently asked questions
What is the great-circle distance?
The great-circle distance is the shortest path between two points on the surface of a sphere — the arc of the unique great circle (a circle whose plane passes through the sphere's centre) that joins them. On Earth, it's the path a plane would fly if there were no winds, no airspace restrictions, and the Earth were a perfect sphere. The haversine and spherical-law-of-cosines formulas both compute great-circle distance on a sphere; Vincenty's formula upgrades the calculation to the WGS 84 ellipsoid for sub-metre accuracy.
How accurate is great-circle distance vs Vincenty?
Great-circle distance on a sphere of mean Earth radius is typically accurate to about 0.5% — usually within a few hundred metres for continental-scale paths. Vincenty's iterative geodesic formula on the WGS 84 ellipsoid achieves millimetre accuracy globally for most paths, but fails to converge in the rare case of near-antipodal endpoints (within ~50 km of being exactly opposite). The Coordinately /tools/distance-calculator uses Vincenty by default and falls back to haversine when Vincenty doesn't converge.
What is the haversine formula?
The haversine formula computes great-circle distance on a sphere using a particular trigonometric identity (the haversine = (1 − cos)/2) that is numerically stable for small distances. It's the standard choice for distance calculations in geographic information systems, web mapping, and consumer GPS where ~0.5% accuracy is sufficient. The formula is fast (a single trig evaluation), well-known, and the input is straightforward (latitude and longitude in radians).
What is the difference between a great circle and a rhumb line?
A great circle is the shortest path between two points on a sphere — a curved path on a Mercator map. A rhumb line (loxodrome) is a path of constant bearing — a straight line on a Mercator map but a spiral path on a globe. The two coincide only along meridians, the equator, and very short distances. For long flights, the great-circle path can be hundreds of kilometres shorter than the rhumb line; for short legs, the difference is negligible.
Do I need ellipsoidal distance for everyday use?
Probably not. For distances under a few hundred km, the sphere-vs-ellipsoid difference is below 0.1%. For continental distances, it's ~0.5%. For navigation and consumer applications, the haversine formula on a sphere is usually adequate. Use Vincenty when you need sub-metre accuracy (surveying, aviation route optimisation, science) or when you want to be uniformly accurate across long paths. Most modern libraries (PROJ, GeographicLib) implement both and let you choose.
How far is it from New York to London?
The great-circle (geodesic) distance from JFK (40.6413° N, −73.7781° W) to London Heathrow (51.4775° N, −0.4614° W) is about 5,541 km using Vincenty on WGS-84, or 5,571 km using the spherical haversine formula. The rhumb-line distance (constant compass bearing) is about 7,196 km — nearly 30% longer. Commercial flights follow close to the geodesic route, which passes over Greenland and crosses the North Atlantic at ~58° N.
Why do flight paths look curved on maps?
A great-circle path is straight on a globe but curved on most flat-map projections. On Mercator (used by web maps), the great-circle JFK-to-London route bows northward over Greenland because the projection flattens convergent meridians by stretching them apart. On a gnomonic projection (used for plotting great circles), the path appears straight; on an equidistant azimuthal projection centred on JFK, it also appears straight. The route is the same on the ground; the appearance is the projection's choice.
What is the Vincenty formula?
Vincenty's formula (Thaddeus Vincenty, 1975) is an iterative algorithm for solving the inverse geodesic problem on an ellipsoid — given two latitudes and longitudes, return the geodesic distance and initial/final bearings. It converges to sub-millimetre accuracy in 1-3 iterations for non-antipodal pairs on WGS-84. Karney (2013) published a closed-form series that supersedes Vincenty: it handles all cases including nearly antipodal points and reaches sub-nanometre accuracy.
Sources
- NIST — NIST Digital Library of Mathematical Functions · https://dlmf.nist.gov/ · Accessed .
- NGA — Bowditch — American Practical Navigator (NGA Pub. 9) · https://msi.nga.mil/Publications/APN · Accessed .
- IHO — International Hydrographic Organization — navigation standards · https://iho.int/en/standards-and-specifications · Accessed .
- Survey Review — T. Vincenty (1975) — Direct and Inverse Solutions of Geodesics on the Ellipsoid · https://en.wikipedia.org/wiki/Vincenty%27s_formulae · Accessed .
- NOAA NGS — NGS — geodetic distance computation references · https://geodesy.noaa.gov/ · Accessed .
Cite this article
APA format:
Steve K. (2026). Great-Circle Distance. Coordinately. https://coordinately.org/learn/great-circle-distance
BibTeX:
@misc{coordinately_greatcircledistance_2026,
author = {K., Steve},
title = {Great-Circle Distance},
year = {2026},
publisher = {Coordinately},
url = {https://coordinately.org/learn/great-circle-distance},
note = {Accessed: 2026-06-05}
}