Latitude Longitude Distance Calculator

–great-circle distance on a sphere (haversine formula)
RouteDistance (km)Distance (mi)
NYC → LA3,9442,451
London → Paris344214
Tokyo → Sydney7,8234,862
The haversine formula computes the great-circle distance between two points on a sphere of radius 6,371 km (Earth’s mean radius). It assumes a perfect sphere; the real Earth is an oblate spheroid flattened at the poles, so results can vary by up to 0.5% from geodesic calculations. Bottom line: the NYC-to-LA great-circle distance of ~3,944 km is shorter than the driving distance of ~4,500 km because roads follow terrain and state borders, not great circles. The formula is used by every flight-tracking and mapping application. Precision tools: sunrise sunset calculator for the same coordinate system applied to solar position, planets fact table for other spheres, speed distance time.

The shortest distance between two points on Earth is not a straight line - it is an arc along the great circle that passes through both points. This calculator uses the haversine formula, the standard spherical-trigonometry approach, to compute that arc length from four inputs: two latitudes and two longitudes.

The formula assumes a perfect sphere of radius 6,371 km. The real Earth is slightly flattened, so the result can differ from geodesic (ellipsoidal) calculations by up to 0.5% - close enough for flight planning and route estimation, not for surveying.

How to use

  1. Enter two sets of coordinates in decimal degrees (south and west are negative); the chips load reference routes.
  2. The distance appears in both kilometres and miles on the great circle between the points.
  3. Compare with the driving distance: the great circle is always shorter because it ignores terrain and borders.

Frequently asked questions

What is the haversine formula?

It computes the great-circle arc between two points on a sphere: a = sin²(Δlat/2) + cos(lat₁) · cos(lat₂) · sin²(Δlon/2), then d = 2R · atan2(√a, √(1−a)) where R is Earth’s mean radius. The name comes from the haversine function, hav(θ) = sin²(θ/2), designed to simplify logarithmic calculations before computers.

Why is the result different from Google Maps?

Google Maps uses geodesic (ellipsoidal) distance on the WGS-84 ellipsoid and follows roads. The haversine formula uses a perfect sphere and follows the great circle - so it is shorter than driving and up to 0.5% different from professional geodesic tools.

What are the reference route distances?

NYC to LA is about 3,944 km (2,451 mi) great circle. London to Paris is about 344 km (214 mi). Tokyo to Sydney is about 7,823 km (4,862 mi). These are computed by the same formula and can be used to verify the tool against published figures.

Does the formula work at the poles?

Yes - the haversine formula is numerically stable at the poles, unlike some naive implementations that divide by cos(latitude). At the poles the longitude is meaningless, so any longitude will give the same distance as long as the latitude is ±90°.

Related tools