geoprimsField-grade geospatial math

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

5,554.909km

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?

Your values

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

Loading…

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

Model: Karney (2013) geodesic on WGS 84

Show your work

  1. Arc between the points

    σ12, the angle the geodesic subtends on the auxiliary sphere

    40.6413°, -73.7781° to 51.47°, -0.4543° = 49.969752°

  2. Courses at each end

    α1 leaving and α2 arriving, which differ because the meridians converge

    51.3816° and 107.9828° = 51.3816°

  3. Distance

    s12 along the ellipsoid, from the arc and the ellipsoid's shape

    49.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

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