geoprimsField-grade geospatial math

Great-circle distance and course (spherical)

Distance and initial and final courses along the great circle on a sphere, with the difference from the ellipsoidal geodesic shown.

Go the other way: Great-circle destination (spherical) →

Planning and education aid. Not for primary navigation. Full disclaimer

Works on a sphere, not on the ellipsoid the Earth actually is. Use the geodesic tools for anything you act on: they are exact on WGS 84, and this tool reports how far the sphere puts it wrong for your inputs. Karney (2013), the geodesic algorithm the geodesic tools use.

5,540.019km

The great circle is 5,540.019 km long, starting on 51.3525209°; the ellipsoid differs by 14,890 m.

Initial course
Final course
Ellipsoidal distance
Distance difference
Initial course difference
Provenance
Computed by
navigation.geodesic.spherical-inverse 1.0.1, core 0.1.0
Model
Central angle σ = atan2(√((cos φ₂ sin Δλ)² + (cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ)²), sin φ₁ sin φ₂ + cos φ₁ cos φ₂ cos Δλ), distance R·σ; initial course atan2(sin Δλ cos φ₂, cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ), and the final course from the reverse course plus 180°. Compared with Karney (2013) on WGS 84
Accuracy
Exact on the sphere, at every distance (the atan2 form keeps full precision near 0 and 180°). On the Earth the sphere is off by up to about 0.5% in distance and a few tenths of a degree in course; both are reported
Notes
None
Cites
Moritz, H., International Association of Geodesy, Geodetic Reference System 1980 (mean radius R1 = (2a + b)/3); Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics

Something look off?

Your values

Showing an example. Change anything.
More options 1
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: Central angle σ = atan2(√((cos φ₂ sin Δλ)² + (cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ)²), sin φ₁ sin φ₂ + cos φ₁ cos φ₂ cos Δλ), distance R·σ; initial course atan2(sin Δλ cos φ₂, cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ), and the final course from the reverse course plus 180°. Compared with Karney (2013) on WGS 84

Show your work

  1. Central angle

    σ = atan2(√(…), sin φ₁ sin φ₂ + cos φ₁ cos φ₂ cos Δλ)

    from 40.6413°, -73.7781° to 51.47°, -0.4543° = 0.869566994 rad

  2. Distance

    R×σ

    6,371,008.771 m × 0.869566994 = 5,540.019 km

The same steps an agent gets from the MCP server with explain: true.

Accuracy: Exact on the sphere, at every distance (the atan2 form keeps full precision near 0 and 180°). On the Earth the sphere is off by up to about 0.5% in distance and a few tenths of a degree in course; both are reported

When to use this: Use this when you need the great-circle answer specifically: checking a figure from navigation software, a spreadsheet or a textbook, all of which use the spherical formulas. It reports the ellipsoidal distance beside its own and the gap between them, so you can see whether a discrepancy you are chasing is the sphere or a mistake.

Limitations: The sphere is the approximation and it is deliberate. Against the ellipsoid the distance is out by up to about half a percent, which on a transatlantic route is some fifteen kilometres, and the course by a few tenths of a degree; both are reported rather than described. For the real distance use the geodesic tool. Antipodal points have no unique great circle and coincident points no course.

Worked example: JFK to Heathrow on the mean-radius sphere. Source: Worked from the spherical formulas; the distance equals the haversine scenario's 5,540,019 m. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Start latitude
40.6413 deg
End latitude
51.47 deg
Start longitude
-73.7781 deg
End longitude
-0.4543 deg

You get

Great-circle distance
5,540.019 km
Initial course
51.3525209°
Final course
107.9431876°
Ellipsoidal distance
5,554.909 km
Distance difference
14,890 m
Initial course difference
-0.0291°

Review: Not yet independently reviewed by a geodesist.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.1, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

Terms

IUGG: International Union of Geodesy and Geophysics
The scientific union that adopted GRS 80 and the mean Earth radius R1. Source: Geodetic Reference System 1980
R1: IUGG mean Earth radius
The radius of a sphere the size of the Earth on average, (2a + b) ÷ 3 = 6,371,008.771 m for WGS 84. Spherical formulas use it when they treat the Earth as a ball. Source: Geodetic Reference System 1980