Guide
Distance and bearing between two points: haversine, Vincenty and great circles
How far is it from one place to another in a straight line? On a flat map the answer would come from Pythagoras, but the Earth is round, so the shortest path curves over its surface. This calculator measures that path between two latitude and longitude points, tells you the direction to start in, and can also find the midpoint or a point reached by travelling in a given direction.
The great-circle distance
The shortest path between two points on a sphere is an arc of a great circle, the circle you get by cutting the sphere through its centre. The haversine formula gives the length of that arc from the two latitudes and longitudes. It is numerically stable for short distances, which is why programmers prefer it. The tool uses an Earth radius of 6,371.0088 kilometres, the mean radius, and reports the distance in kilometres, miles and nautical miles.
The ellipsoid and Vincenty’s method
The Earth is slightly flattened, wider at the equator than between the poles, so a sphere is only an approximation. Vincenty’s inverse formula works on the WGS 84 ellipsoid, the shape used by GPS, and gives the distance to a fraction of a millimetre. For some pairs of nearly opposite points it fails to converge, and the tool then says so and relies on the great-circle figure. The difference between the two is usually a few tenths of a percent.
Bearings
The initial bearing is the compass direction, in degrees clockwise from north, in which you start out along the great circle. Because the path curves, the direction changes as you go, and the final bearing is the direction you face on arrival. The tool gives both, with the nearest of 16 compass points. A constant-bearing path (a rhumb line) is longer and is not what this tool computes.
Midpoint and destination
The midpoint is the point halfway along the great circle, and it is not the average of the latitudes and longitudes. In the other mode, give a start, a bearing and a distance in kilometres, and the tool finds where you end up. This is useful to find a point 5 km due east of a place or to plot a search area.
Worked examples
Press the first sample: John F. Kennedy Airport in New York to London Heathrow. The haversine distance is 5,540.019 km, which is 3,442.408 miles or 2,991.371 nautical miles. Vincenty’s method gives 5,554.9088 km, 0.269 percent more. You leave on a bearing of 51.353° (north-east) and arrive facing 107.94° (east-south-east), and the midpoint is at 52.216674, −41.302671 over the north Atlantic. The second sample, Sydney to Auckland, is 2,155.901 km by haversine and 2,160.5088 km by Vincenty. The third finds the point 1,000 km from New York on a bearing of 45°: 46.651108, −64.511775.
Entering positions
Both points can be written in any of the usual ways: decimal degrees, degrees and minutes, or with N, S, E and W. The tool shows the destination in decimal degrees and degrees-minutes-seconds. If one of your points is a locator or a grid reference, convert it first with the grid square or MGRS tools.
Limits
The distances are straight lines over the surface, at sea level. They are not road distances or flight routes, which are longer, and they do not account for height. Haversine assumes a sphere, so it can be wrong by up to about half a percent, and Vincenty may not converge for nearly antipodal points.
Related tools
- Lat Long Converter writes a position in any coordinate format.
- Degrees to Compass Direction turns a bearing into a compass point.
- GPX Analyzer measures the length of a whole recorded track.
- ETA Calculator turns a distance into a time at a given speed.
Checked against the current version of the Distance Between Coordinates Calculator on .

