Skip to main content

Distance Calculator

Distance between two GPS coordinates or cities (haversine great-circle), with travel time estimates, halfway midpoint, and initial bearing. 100% client-side.

Point A
Point B
haversine: a = sin^2(dLat/2) + cos(lat1)*cos(lat2)*sin^2(dLon/2); d = 2*R*asin(sqrt(a)), R = 6371.0088 km
bearing: b = atan2(sin(dLon)*cos(lat2), cos(lat1)*sin(lat2) - sin(lat1)*cos(lat2)*cos(dLon))

Worked examples

RouteDistanceBearingFlight 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%.

RouteGreat-circleTypical drivingRatio
New York - Los Angeles3,935.75 km~4,500 km1.14x
London - Paris343.56 km~460 km1.34x
Singapore - Jakarta905.36 kmno 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

Related calculators

Free tool by NRTechStudio