What is the Great Circle Distance?
The great circle distance is the shortest path between two points on the surface of a sphere, measured along the surface. On Earth, this is the route an aircraft or ship follows to minimize travel distance. Because Earth is (approximately) a sphere, a straight line between two coordinates actually curves across the globe — the great circle is the arc of the largest circle that can be drawn through both points.
How to use this calculator
Enter the latitude and longitude of two points in decimal degrees. Use negative values for the Southern Hemisphere (latitude) and the Western Hemisphere (longitude). The calculator returns the distance in kilometers, miles, and nautical miles. It uses a mean Earth radius of 6,371 km.
The formula explained
This tool uses the spherical law of cosines:
$$d = R \cdot \arccos\!\Big( \sin\varphi_1 \sin\varphi_2 + \cos\varphi_1 \cos\varphi_2 \cos(\lambda_2 - \lambda_1) \Big)$$Here \(\varphi\) is latitude and \(\lambda\) is longitude, both converted to radians. The arccos term gives the central angle between the two points (in radians); multiplying by the radius \(R\) converts the angle into a surface distance. The value inside arccos is clamped to \([-1, 1]\) to avoid rounding errors.
Worked example
From New York (40.7128°, −74.0060°) to London (51.5074°, −0.1278°): converting to radians and applying the formula gives a central angle of about \(0.8775\) radians. Multiplying by 6,371 km yields:
$$d = 6371 \cdot 0.8775 \approx 5591\ \text{km}\ (\approx 3474\ \text{miles},\ \approx 3019\ \text{nautical miles})$$FAQ
Why does my GPS distance differ slightly? Real navigation systems often use an ellipsoidal model (WGS-84), which accounts for Earth's flattening. The spherical formula here is accurate to within about 0.5%.
What about the haversine formula? Haversine gives the same result but is numerically more stable for very small distances. For typical city-to-city distances the law of cosines is perfectly accurate.
Can I use degrees-minutes-seconds? No — convert your coordinates to decimal degrees first (e.g., 40°42′46″ = 40.7128°).