What is the Haversine Distance Calculator?
This tool computes the great-circle distance — the shortest path over the surface of a sphere — between two points given their latitude and longitude. It uses the Haversine formula, the standard method for distances on a globe, and reports the result in kilometers, miles, and nautical miles simultaneously. It is universal and works for any pair of coordinates on Earth.
How to use it
Enter the latitude and longitude (in decimal degrees) of both points. Use negative values for South latitudes and West longitudes. Pick your preferred display unit, and the calculator shows the headline distance plus a breakdown across all three units.
The formula explained
Let \(\varphi_1\), \(\varphi_2\) be the latitudes and \(\lambda_1\), \(\lambda_2\) the longitudes in radians. With \(\Delta\varphi = \varphi_2 - \varphi_1\) and \(\Delta\lambda = \lambda_2 - \lambda_1\), compute $$a = \sin^{2}\!\frac{\Delta\varphi}{2} + \cos\varphi_1 \cdot \cos\varphi_2 \cdot \sin^{2}\!\frac{\Delta\lambda}{2}$$ The central angle is $$c = 2\arcsin\!\left(\sqrt{a}\right)$$ and the distance is $$d = R \cdot c$$ where \(R \approx 6371.0088\ \text{km}\) is Earth's mean radius. Kilometers convert to miles by dividing by \(1.609344\) and to nautical miles by dividing by \(1.852\).
Worked example
From New York (\(40.7128°\), \(-74.0060°\)) to London (\(51.5074°\), \(-0.1278°\)): the Haversine formula gives a central angle that yields about \(5{,}570\ \text{km}\), which equals roughly \(3{,}461\ \text{miles}\) and \(3{,}008\ \text{nautical miles}\).
FAQ
Is this the same as driving distance? No — it is the straight-line distance over the sphere, not following roads.
How accurate is it? The Haversine model treats Earth as a perfect sphere, so it is accurate to within about 0.5% compared with the true ellipsoidal distance.
What units should coordinates be in? Decimal degrees (e.g. 51.5074), not degrees-minutes-seconds.