Distance between two points (geodesic)
The shortest distance and the start and end courses between two points on the WGS 84 ellipsoid (or any ellipsoid), exact to nanometers with Karney's algorithm.
Go the other way: Destination from a start, course, and distance (geodesic) →
Planning and education aid. Not for primary navigation. Full disclaimer
The shortest distance is 5,554.909 km, leaving on a course of 51.3816479° and arriving on 107.9828291°.
- Initial course
- Final course
- Arc length
- Reduced length m12
- Geodesic scale M12
- Geodesic scale M21
Provenance
- Computed by
- navigation.geodesic.inverse 1.0.1, core 0.1.0
- Model
- Karney (2013) geodesic on WGS 84
- Accuracy
- About 15 nanometers on WGS 84; converges for every pair, including antipodal and polar points
- Notes
- None
- Cites
- Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics; Karney, C. F. F., GeographicLib, GeographicLib geodesic test data (GeodTest.dat) and GeodSolve
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: Karney (2013) geodesic on WGS 84
Show your work
Arc between the points
σ12, the angle the geodesic subtends on the auxiliary sphere40.6413°, -73.7781° to 51.47°, -0.4543°= 49.969752°Courses at each end
α1 leaving and α2 arriving, which differ because the meridians converge51.3816° and 107.9828°= 51.3816°Distance
s12 along the ellipsoid, from the arc and the ellipsoid's shape49.969752° of arc on WGS 84= 5,554.909 km
The same steps an agent gets from the MCP server with explain: true.
Accuracy: About 15 nanometers on WGS 84; converges for every pair, including antipodal and polar points
When to use this: Use this when you need the distance between two coordinates and the courses to fly or walk between them: the shortest path on the ellipsoid, with the azimuth at each end. This is the tool behind leg distances, ranges, and any comparison of one route against another, and it holds for pairs that defeat simpler formulas, including nearly antipodal ones.
Limitations: The distance is along the surface of the ellipsoid: it is not a road or track distance, it takes no account of terrain or height, and it is not the length of a constant-heading course, which is a rhumb line. The azimuths are true and they differ at the two ends, because a geodesic changes direction as it goes.
Worked example: New York JFK to London Heathrow. Source: add-navigation-and-geometry geodesic scenario: 5,554,908.791 m, 51.3816479°, 107.9828291°. 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
- Distance
- 5,554.909 km
- Initial course
- 51.3816479°
- Final course
- 107.9828291°
- Arc length
- 49.969751557°
- Reduced length m12
- 4,879,709.633 m
- Geodesic scale M12
- 0.6443517537
- Geodesic scale M21
- 0.6446632441
- Area under the geodesic S12
- 40,025,844,740,000 m²
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
- 2026-09-23, fixed: Short distances lost their meaning: a 0.859 m geodesic showed as 0.001 km. Distances in the navigation tools (version 1.0.1) still show to the meter in kilometers, but a short one now keeps three significant digits, down to the millimeter, so it shows as 0.000859 km. Differences such as the rhumb line's extra distance keep fixed decimals. Values are unchanged. Changelog
- 2026-09-22, changed: Geodesic distance and destination now work on strongly flattened ellipsoids (|f| from 0.02 up to 0.5) by the exact method, where they used to refuse. On 480 geodesics at six flattenings they match GeographicLib's GeodesicExact to rounding. Results on WGS 84 and other catalog ellipsoids are unchanged. Changelog
- 2026-09-19, changed: Five more tools passed the stable verification bar: geodesic distance and destination (checked against GeographicLib's GeodTest), UTM forward and inverse (checked against exact transverse Mercator values), and the standard atmosphere (checked against a separately written implementation). Changelog
Checked against: 31 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- Algorithms for geodesics, Karney, C. F. F., Journal of Geodesy, Vol. 87, No. 1. pp. 43-55.
- GeographicLib geodesic test data (GeodTest.dat) and GeodSolve, Karney, C. F. F., GeographicLib, GeographicLib 2.x. Geodesic test data, 500,000 geodesics on WGS 84. Read free.
Learn the concept: Haversine vs. geodesic distance explained