About the Latitude Longitude Distance Calculator
This tool finds the great-circle distance between two points on Earth given their latitude and longitude, using the Haversine formula — the standard, well-established method for this calculation. It also reports the initial compass bearing you would follow at the start point and the midpoint of the great-circle path, so you can see not just how far apart two places are but which direction connects them.
The Haversine formula
The Haversine formula computes the shortest distance between two points on the surface of a sphere, measured along the surface (not through the Earth). For points 1 and 2 with latitude φ and longitude λ in radians:
- a = sin²(Δφ/2) + cos(φ1) · cos(φ2) · sin²(Δλ/2)
- c = 2 · atan2(√a, √(1−a))
- distance = R · c
where Δφ is the difference in latitude, Δλ is the difference in longitude, and R is the Earth's mean radius, taken here as 6,371.0088 km. The formula assumes a perfectly spherical Earth, which keeps the math simple and fast while staying accurate to within about 0.5% of ellipsoidal models such as Vincenty's formulae, which account for the Earth's slight equatorial bulge.
Initial bearing and midpoint
Because a great-circle route curves relative to straight lines on a flat map, the compass heading needed to follow it changes along the way — except when traveling due north-south or along the equator. The initial bearing reported here is the heading (measured clockwise from true north, 0° to 360°) at the starting point only. The midpoint is the coordinate exactly halfway along that curved path, computed from the same spherical geometry, and is not simply the arithmetic average of the two latitude/longitude pairs.
Reading the coordinates
- Latitude runs from −90° (South Pole) to 90° (North Pole); positive values are north of the equator, negative values south.
- Longitude runs from −180° to 180°; positive values are east of the Prime Meridian, negative values west.
- Decimal degrees (e.g. 40.7128) are used throughout — if you have degrees/minutes/seconds, convert first (degrees + minutes/60 + seconds/3600, keeping the sign for direction).
Practical context
Great-circle distance is the theoretical shortest path "as the crow flies" and is what airlines and ships approximate when planning long routes. It does not account for actual road networks, terrain, or air traffic corridors, so a driving or flight-plan distance will usually be longer. For everyday geography, travel-time estimates, and mapping, the Haversine result is an excellent and widely used approximation.