What this calculator does
The Latitude Longitude Distance Calculator finds the shortest distance over the Earth's surface between two points given by their geographic coordinates. This "great-circle" distance is computed with the Haversine formula, which treats the Earth as a sphere of radius 6,371 km. It is the standard tool for measuring how far apart two GPS locations are, ignoring roads or terrain.
How to use it
Enter the latitude and longitude of your first point, then the latitude and longitude of your second point. Use decimal degrees: positive values for North latitude and East longitude, negative values for South and West. The calculator returns the distance in kilometers, statute miles, and nautical miles.
The formula explained
Let \(\varphi_1\), \(\varphi_2\) be the two latitudes and \(\lambda_1\), \(\lambda_2\) the two longitudes, all in radians. With \(\Delta\varphi = \varphi_2 - \varphi_1\) and \(\Delta\lambda = \lambda_2 - \lambda_1\), the Haversine formula is:
$$a = \sin^{2}\!\frac{\Delta\varphi}{2} + \cos\varphi_1\cdot\cos\varphi_2\cdot\sin^{2}\!\frac{\Delta\lambda}{2}$$, then $$d = 2R\cdot\arcsin\!\left(\sqrt{a}\right)$$, with \(R = 6371\ \text{km}\). The Haversine form is numerically stable even for very small distances.
Worked example
From New York City (40.7128°, −74.0060°) to London (51.5074°, −0.1278°): converting to radians and applying the formula gives \(a \approx 0.1390\), \(c \approx 0.7674\), so $$d \approx 6371 \times 0.7674 \approx 5{,}570\ \text{km}$$ which is about 3,461 miles or 3,008 nautical miles — matching the well-known NYC–London air distance.
FAQ
Is this driving distance? No. It is the straight-line distance across the globe's surface, like an aircraft's path, not a road route.
How accurate is it? Because the Earth is slightly ellipsoidal, the spherical Haversine result can differ from true geodesic distance by up to about 0.3%. For most purposes this is negligible.
What coordinate format should I use? Decimal degrees. Convert degrees-minutes-seconds first (e.g. 40°42′46″N ≈ 40.7128°).