The short answer

Take the latitude and longitude of the two airports, treat the Earth as a sphere, and measure the shortest curve between the points. That curve is part of a great circle, the biggest circle you can draw on a sphere, like the equator or a line of longitude. Flat maps stretch this curve into an arc, which is why a flight from New York to London looks like it bends north.

The haversine formula

The haversine formula gives the angle between two points from their latitudes and the difference in longitude, and multiplying that angle by the radius of the Earth gives a distance. This site uses a mean Earth radius of 6,371.0088 km. Kilometres become miles by multiplying by 0.621371, and nautical miles come from dividing kilometres by 1.852.

Two worked examples

New York JFK to London Heathrow comes to 5,540 km, or 3,442 miles. Los Angeles to Sydney comes to 12,061 km, or 7,494 miles. Both are rounded to the whole unit for display, and totals are added up from the unrounded values so rounding never piles up.

Why it differs from an airline's miles

Great-circle distance between the two airports. Airlines and loyalty programmes measure differently. An aircraft follows airways, avoids weather and restricted airspace, and uses winds, so the distance flown is often a few percent longer. A loyalty programme may credit miles from its own table, per fare class, per partner or with a minimum per flight. None of that is in a great-circle figure, which is why this site does not call its numbers official or use them for miles or status.

Why the Earth is treated as a sphere

The Earth is slightly flattened, so a more exact method treats it as an ellipsoid. The difference from a sphere is at most about half of one percent, smaller than the gap between any airline's figure and the route flown, so a sphere is the simple and honest choice for a personal log.

Flights over the date line

A great circle can cross the 180 degree line of longitude. The distance is unaffected, but a map must cut the route there and continue from the other edge. A flight from Honolulu to Tokyo is the usual example.

Try it on your own flights

The flight log works out the distance for you, draws the route on a map and keeps the airports and countries in a running total. Nothing you add leaves your browser.

Boardedlog is not affiliated with any airline, airport, flight tracking service or travel app.