Enrichment · Passion Projects · Maps

As the crow flies,
from coordinates
you can look up.

Type places by latitude and longitude. The calculator gives the distance and starting bearing of every leg over the curved Earth, the total along the route and the straight line from start to finish.

The distance calculator

The worked example is a made-up drive between four cities on a college visit trip. Nothing you type leaves this browser.

Loading the calculator. If nothing appears, turn on JavaScript.

What you get

Enrichment · Passion ProjectsFree

What you finish with
Each leg's distance and bearing, the total route, the straight-line distance and what the stops add, in miles, kilometres or nautical miles. It prints as a summary and downloads as a spreadsheet.
Who it is for
Geography, earth science and trigonometry students, and families or travellers comparing routes.
Format
Browser calculator for a phone, tablet or computer, by touch or keyboard. Up to 30 places. Prints a summary; downloads a spreadsheet (.csv); export and import a file.
Access
Free. No account, no sign-in and nothing to install. Everything you type stays in this browser; nothing is sent to Caveat.
Where it lives
The Passion Projects space in Caveat Enrichment.
Support
Questions, a correction or a request: team@caveatacademic.com.

How to use it

  1. Choose miles, kilometres or nautical miles.
  2. Add each place in order with its latitude and longitude in decimal degrees (a map app shows them when you press and hold a spot).
  3. Read each leg and the total.
  4. Compare the route with the straight line to see what the stops cost.
  5. Print or download the legs.

Measure the route

How the distance is worked out

The haversine formula on a round Earth.

The worked example: the first legChicago41.8781, −87.6298to Indianapolis 39.7684, −86.1581Haversine asin² + cos·cos·sin²half-angle differencesCentral angle2.386°2 asin √aDistance265.3 km164.8 mi, bearing 152°The worked example: the first legChicago41.8781, −87.6298to Indianapolis 39.7684, −86.1581Haversine asin² + cos·cos·sin²half-angle differencesCentral angle2.386°2 asin √aDistance265.3 km164.8 mi, bearing 152°
The haversine formula finds the angle between two points at the Earth’s centre; multiplying by the radius turns it into a distance along the surface.

The formula

Latitudes φ and longitudes λ are turned into radians. a = sin²(Δφ ÷ 2) + cos φ₁ × cos φ₂ × sin²(Δλ ÷ 2), and the central angle is 2 × asin(√a). Multiplied by the Earth's mean radius, 6,371.0088 km, it is the shortest distance over the surface. The starting bearing is atan2(sin Δλ cos φ₂, cos φ₁ sin φ₂ − sin φ₁ cos φ₂ cos Δλ).

How exact it is

The Earth is slightly flattened, so a sphere is off by up to about 0.5%, a few miles on a long leg; surveyors use ellipsoid formulas for that last bit. A great circle is not a constant compass heading, which is why flights from the United States to Europe arc north. Road distances are longer still.

Sources

  1. National Geodetic Survey, NOAA. Inverse and forward geodetic calculations and the shape of the Earth (geodesy.noaa.gov).
  2. Moritz, H. (2000). Geodetic Reference System 1980. Journal of Geodesy 74: mean Earth radius 6,371.0088 km.
  3. National Institute of Standards and Technology. Handbook 44, appendix C: the international mile (1.609344 km) and nautical mile (1.852 km).
  4. Sinnott, R. W. (1984). Virtues of the haversine. Sky and Telescope 68(2), 159.

The worked example is made up. Distances are over the Earth's surface, not by road. Your places stay in this browser. Support: team@caveatacademic.com.