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})$$Constants and Conversion Factors Used
The calculator models the Earth as a perfect sphere. These are the constants behind the formula and the unit conversions.
| Quantity | Value | Notes |
|---|---|---|
| Mean Earth radius \(R\) | 6,371 km | IUGG mean radius, used in the formula |
| Equatorial radius | 6,378.137 km | WGS-84 ellipsoid (semi-major axis) |
| Polar radius | 6,356.752 km | WGS-84 ellipsoid (semi-minor axis) |
| Kilometres to miles | 1 km = 0.621371 mi | Statute mile |
| Statute mile | 1 mi = 1.609344 km | Exact by definition |
| Nautical mile | 1 nmi = 1.852 km | Exact by definition |
| Kilometres to nautical miles | 1 km = 0.539957 nmi | Rounded to six decimals |
| Degrees to radians | \(\pi/180 \approx 0.0174533\) | Multiply degrees by this factor |
Because the real Earth is slightly flattened, a spherical model can differ from an ellipsoidal one (such as WGS-84 geodesics) by up to roughly 0.5% depending on the route. It is accurate enough for most travel, aviation and mapping estimates, but not for survey-grade work.
Step-by-Step: Calculating Great Circle Distance by Hand
- Write the coordinates in decimal degrees with signs. North latitudes and east longitudes are positive. South latitudes and west longitudes are negative. For example, 40°W is −40.
- Convert to radians. Multiply each angle by \(\pi/180\): \(\varphi_1, \varphi_2\) from the latitudes and \(\lambda_1, \lambda_2\) from the longitudes.
- Compute the longitude difference. \(\Delta\lambda = \lambda_2 - \lambda_1\). Only its cosine is used, so the sign does not matter.
- Evaluate the central-angle term. $$x = \sin\varphi_1 \sin\varphi_2 + \cos\varphi_1 \cos\varphi_2 \cos\Delta\lambda$$
- Clamp and take the arccosine. Rounding errors can push \(x\) slightly outside the range, so limit it to \([-1, 1]\). Then the central angle is \(\sigma = \arccos(x)\), in radians.
- Multiply by the radius. \(d_{\text{km}} = 6371 \cdot \sigma\).
- Convert the units. \(d_{\text{mi}} = d_{\text{km}} \times 0.621371\) and \(d_{\text{nmi}} = d_{\text{km}} \div 1.852\).
Worked example: equator, 0° to 90°E
Take point 1 at (0°, 0°) and point 2 at (0°, 90°).
- The coordinates are already in signed decimal degrees.
- \(\varphi_1 = \varphi_2 = 0\) and \(\lambda_2 = 90 \times \pi/180 = \pi/2\).
- \(\Delta\lambda = \pi/2 - 0 = \pi/2\).
- \(x = \sin 0 \cdot \sin 0 + \cos 0 \cdot \cos 0 \cdot \cos(\pi/2) = 0 + 1 \cdot 1 \cdot 0 = 0\).
- \(\sigma = \arccos(0) = \pi/2 \approx 1.570796\) rad.
- \(d = 6371 \times 1.570796 \approx\) 10,007.54 km.
- In miles: \(10{,}007.54 \times 0.621371 \approx 6{,}218.4\) mi. In nautical miles: \(10{,}007.54 \div 1.852 \approx 5{,}403.6\) nmi.
This result is exactly one quarter of the Earth's circumference, \(2\pi \times 6371 / 4\), so it is easy to check.
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°).