Coordinates · great-circle distance

Distance between two coordinates.

Enter two latitude and longitude points. Get the shortest distance over the earth's surface in kilometres, miles and nautical miles, with the initial bearing.

Haversine formulaDD, DMS or DDM inputkm, mi and nmi

Advertisement

Inputs

Decimal degrees, or 43°39′11″ N, or 43 39.2 N
Negative or W is west
Decimal degrees, or 43°39′11″ N, or 43 39.2 N
Negative or W is west

Result

Enter your coordinates.

How the distance between two coordinates is calculated

The shortest path between two points on a sphere is a great-circle arc. The haversine form of the formula avoids the rounding trouble that the plain cosine formula has for short distances: a = sin²(Δφ/2) + cos φ1 × cos φ2 × sin²(Δλ/2), then c = 2 × atan2(√a, √(1−a)) and distance = R × c. The Aviation Formulary gives the same great-circle distance in its asin form, and defines one nautical mile as one minute of arc of a great circle, now fixed at 1,852 metres.

Worked example. Toronto (43.6532, -79.3832) to London (51.5074, -0.1278) with R = 6371.0088 km: central angle 51.374°, distance 5,712 km (3,550 mi, 3,084 nmi). The coordinates are rounded city-centre values used only to illustrate the method.

This is distance over the surface, not driving or flying distance, and it treats the earth as a sphere. An ellipsoidal method such as Vincenty or Karney can differ by up to roughly 0.3%, which matters for surveying but rarely for trip planning. To measure along a constant compass heading instead, use the rhumb line calculator.

Frequently asked questions

Which earth radius does this use?

The mean radius of the WGS 84 ellipsoid, 6371.0088 km. Treating the earth as a sphere can differ from an ellipsoidal calculation by up to about 0.3%, so it is right for planning and general use but not for surveying.

Can I type degrees, minutes and seconds?

Yes. Each box accepts decimal degrees (43.6532), degrees and decimal minutes (43 39.19 N) or degrees, minutes and seconds (43°39′11″ N). Use a minus sign or the letters S and W for south and west.

Is this the same as driving or flight distance?

No. It is the shortest distance over the earth's surface, a straight line on a globe. Roads, air corridors, wind and restricted airspace make real routes longer.

Why not use Pythagoras on latitude and longitude?

A degree of longitude shrinks towards the poles, so flat-map arithmetic overstates east-west distances away from the equator. The haversine formula accounts for the curvature.

Sources

Checked

Runs entirely in your browser. Nothing you type is sent or stored.

Scope

Spherical-earth estimate using the WGS 84 mean radius. Not for surveying, legal boundaries or navigation. Check real routes with a mapping or flight-planning service.

Advertisement
Advertisement