Distance Calculator
Distance between two GPS coordinates or cities (haversine great-circle), with travel time estimates, halfway midpoint, and initial bearing. 100% client-side.
| Mode | Typical speed | Time |
|---|
bearing: b = atan2(sin(dLon)*cos(lat2), cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dLon))
Worked examples
| Route | Distance | Bearing | Flight time* |
|---|
*Flight time estimated at 900 km/h cruise from great-circle distance; actual flights vary with routing and wind.
Great-circle vs driving distance
The haversine formula computes the great-circle distance: the shortest path over the surface of a sphere between two points. This is the "as the crow flies" distance. Driving distance follows real roads and is always longer, typically by 15-40%.
| Route | Great-circle | Typical driving | Ratio |
|---|---|---|---|
| New York - Los Angeles | 3,935.75 km | ~4,500 km | 1.14x |
| London - Paris | 343.56 km | ~460 km | 1.34x |
| Singapore - Jakarta | 905.36 km | no road (sea crossing) | - |
Use this calculator for straight-line distance questions ("how far apart are these cities?"). For trip planning with actual routes, use a routing or maps tool.
About this method
The haversine formula computes the great-circle distance between two points from their latitudes and longitudes. This calculator uses the mean Earth radius R = 6371.0088 km (IUGG value). The initial bearing is the compass heading at departure along that path (0 deg = North, 90 deg = East).
Note: the Earth is an oblate ellipsoid, not a perfect sphere. For distances beyond ~1,000 km, haversine can differ from ellipsoidal (Vincenty) results by up to ~0.5%. The midpoint shown is the geographic halfway point along the great-circle path, computed with spherical trigonometry.
Frequently asked questions
Free tool by NRTechStudio