How to use it
- Type the latitude and longitude of point A and of point B. Decimal degrees and degrees-minutes-seconds both work.
- Read the distance, the initial bearing from A and the midpoint of the route.
- Use the swap button to reverse the direction.
Formulas
With latitudes φ₁, φ₂ and the longitude difference Δλ, the haversine formula is:
a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2), d = 2R · atan2(√a, √(1−a))
with R = 6371.0088 km, the mean Earth radius of the IUGG. Vincenty’s inverse method solves the same problem on the WGS84 ellipsoid with a = 6378137 m and flattening 1/298.257223563. Miles use 1 mi = 1.609344 km and nautical miles 1 nmi = 1.852 km.
Worked example
From New York (40.7128, −74.0060) to London (51.5074, −0.1278) the great-circle distance is about 5,570 km (3,461 miles), and the initial bearing from New York is about 51° north-east. Along the equator, one degree of longitude is 111.19 km by haversine and 111.32 km on the WGS84 ellipsoid.
Notes
Points that are almost exactly opposite on the globe can make Vincenty’s iteration fail; the tool then shows no ellipsoid figure and the haversine distance still applies. Coordinates are not checked against any map.