Latitude & Longitude Distance Calculator
Compute the great-circle distance between two locations on Earth.
Haversine great-circle distance
Enter two latitude/longitude pairs
Point 1 — From
−90…90
−180…180
Point 2 — To
−90…90
−180…180
What is great-circle (Haversine) distance?
Latitude and longitude are angular coordinates on a sphere, not Cartesian coordinates on a flat plane. The shortest distance between two points on the surface of a sphere is an arc of a great circle — a circle whose plane passes through the centre of the sphere. The Haversine formula gives the length of that arc directly from the latitudes, longitudes, and Earth's radius without first projecting onto a 2-D map.
Treating lat/lon as Cartesian coordinates and plugging into the 2-D distance formula gives badly wrong answers, especially over long distances or at high latitudes. One degree of longitude is about 111 km at the equator but only 78 km at 45°N and zero at the poles. The Haversine formula bakes this changing scale into the math so the distance is correct everywhere on the globe.
How the lat/lng calculator works
Enter both coordinate pairs
Type the latitude and longitude of both points in decimal degrees. South latitudes and west longitudes are negative.
Pick a unit
Switch between kilometres, statute miles, and nautical miles — the great-circle distance is converted instantly.
Read distance and bearings
The result card shows the great-circle distance, the through-the-Earth chord, and the initial and final compass bearings.
Inspect the route on the map
An SVG world map highlights both points and draws the straight-line arc between them so you can sanity-check the answer visually.
Formulas inside this tool
Haversine — central angle
a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2)
Numerically stable for both small and large angular separations.
Haversine — arc length
c = 2 · atan2(√a, √(1−a)), d = R · c
R is Earth's mean radius, 6 371.0088 km.
Initial bearing
θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ)
Heading at the start point, measured clockwise from north.
Chord through the Earth
chord = 2R · sin(c/2)
Straight-line distance through the planet, not along the surface.
Where great-circle distance is used
Aviation
Commercial flight planning follows great-circle routes to minimise fuel burn. The unusually curved paths you see on flight tracker maps are great-circle arcs flattened onto a Mercator projection.
Shipping
Open-ocean navigation uses great-circle distance and the initial/final bearings to optimise routes between ports, modified only by weather and currents.
Telecommunications
Microwave and satellite link budgets depend on the great-circle distance between transmitter and receiver, plus elevation.
Mapping and GIS
Spatial databases like PostGIS evaluate distance queries on the sphere using Haversine for fast indexed nearest-neighbour searches.
Why use this calculator?
Haversine is short to write but slippery to compute by hand — the angles must be converted to radians, three trig functions must be evaluated, and the answer must be multiplied by Earth's radius. This calculator does all of that with full numerical stability and shows the bearings too, so you can both travel and orient yourself correctly.
Frequently Asked Questions
Related Calculators
More coordinate-geometry, trig, and unit tools that pair with distance calculations.
- Distance Calculator2D, 3D, lat/lng, map, vector, and geometry distance — six tools, step-by-step solutions, interactive visualisations.
- Pythagorean Theorem CalculatorSolve any side of a right triangle, plus area, perimeter, and angles.
- Slope CalculatorSlope, angle, distance, midpoint, intercepts, and the line equation with an interactive coordinate-plane graph.
- Triangle CalculatorSolve any triangle (SSS, SAS, ASA, AAS, SSA) for sides, angles, area, altitudes, medians, inradius, circumradius and centres.
- Circle CalculatorFind area, circumference, diameter, and radius from any one known value.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.