Dev tools

Haversine distance

Great-circle distance between two lat/lon points on a spherical Earth model. Runs on your device.

Runs on your device. The file is never uploaded.

Haversine distance measures the great-circle line between two lat/lon points, printed in km, mi or nmi to three decimals. The sphere uses the IUGG mean radius of 6371.0088 km, and nmi divides by 1852 metres. Roads, terrain, airspace and the flattening of the Earth are all ignored, so the true journey is longer.

Options

Questions

What does it calculate?

The great-circle distance between two lat/lon points, using the haversine formula on a spherical Earth. The radius is 6371.0088 km, the IUGG mean radius. You get one line: the distance in your chosen unit, printed to three decimal places. There are no waypoints and no route, only the two points you give it.

How accurate is a spherical model?

It ignores the flattening of the Earth, so it approximates a true ellipsoidal distance. Formulas such as Vincenty model the ellipsoid and land closer, at the cost of an iterative solve. For flight distances, route sanity checks and nearest-point work the spherical answer is normally close enough; for surveying it is not.

Which units can I get?

Kilometers, miles or nautical miles. The conversions come from each unit's defining relationship rather than a truncated decimal: a mile is 1609.344 meters and a nautical mile is 1852 meters, and the tool divides by those. Output is always three decimal places, so nautical miles land at roughly meter resolution.

Is this the driving distance?

No. It is the straight line across the surface of the globe, ignoring roads, terrain, airspace and altitude, so a real journey is always longer. The tool holds no map data of any kind; it sees only the four numbers you type and the radius constant.

Why did it refuse my input?

One of the four coordinate fields was not a number, and the message is "lat1/lon1/lat2/lon2 must all be numbers". Give plain decimal degrees, with a minus sign for south and west. Degrees-minutes-seconds text is not parsed here; convert it first with the coordinate format converter, then paste the decimal values in.

Related Dev tools