Distance Calculator
Find the great-circle distance and bearing between two sets of coordinates.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the distance calculator
- Fill in the fields — they start with a worked example.
- Read the answer, and the arithmetic shown beneath it.
- Copy the results, or adjust the inputs to compare scenarios.
About this tool
The distance between two points on the Earth is not the distance between them on a map. Maps are flat and the Earth is not, so a straight line drawn between two cities on a projection is longer than the route an aircraft flies — which is why the London to Tokyo flight path bends over the Arctic rather than crossing Asia in a straight line.
This uses the haversine formula, which measures along a great circle: the shortest path across the surface of a sphere. It is chosen over the simpler spherical law of cosines because that formula loses precision on short distances, where floating-point arithmetic subtracts two nearly equal numbers and most of the significant digits with them.
The Earth is not a perfect sphere either — it is about 21 kilometres wider at the equator than pole to pole — so a spherical calculation carries an error of up to roughly 0.5 per cent. That is a few kilometres on a transcontinental flight and a couple of metres across a city. Where it matters, Vincenty's formulae model the ellipsoid instead; for almost every practical purpose this is close enough, and saying which approximation is in use is more useful than implying there is none.
The bearing given is the initial one. Following a great circle means continuously changing heading, so the bearing at the halfway point is different from the one at the start — a constant-heading route is a rhumb line, which is longer but easier to steer, and is what a compass course actually describes.
Common uses
- Finding the direct distance between two cities or sites.
- Checking a distance quoted by a mapping service.
- Getting an initial bearing between two coordinates.
Frequently asked questions
- Why is this shorter than the driving distance?
- Because it is the straight-line distance across the surface, not a route. Roads follow terrain and existing corridors, so driving distance is typically 15 to 40 per cent longer.
- How accurate is the haversine formula?
- It treats the Earth as a sphere, giving up to about 0.5 per cent error. That is a few kilometres intercontinentally and a couple of metres across a city.
- Why does the bearing change along the route?
- A great circle is the shortest path, and following one means continuously turning. A constant heading is a rhumb line, which is longer but simpler to steer.
Related tools
Speed Calculator
Solve for speed, distance or time, with pace per kilometre and per mile alongside.
Fuel Cost Calculator
Estimate the fuel cost of a journey from distance, economy and fuel price.
Length Converter
Convert between millimetres, centimetres, metres, kilometres, inches, feet, yards and miles.
Trip Duration Calculator
Work out nights, days and the annual leave a trip actually costs, from departure and return dates.