Great Circle Distance Calculator

Great Circle Distance Calculator

Popular AI Skill PRO

Enter Calculation

Formula

d=R·arccos⁡(sin⁡φ1sin⁡φ2+cos⁡φ1cos⁡φ2cos⁡Δλ)where{R=6371kmφ1=Lat1(∘),φ2=Lat2(∘)Δλ=Lon2(∘)−Lon1(∘)\begin{gathered} d = R \cdot \arccos\!\Big( \sin\varphi_1 \sin\varphi_2 + \cos\varphi_1 \cos\varphi_2 \cos\Delta\lambda \Big) \\[1.5em] \text{where}\quad \left\{ \begin{aligned} R &= 6371\ \text{km} \\ \varphi_1 &= {{\text{Lat}_1\,(^\circ)}} ,\quad \varphi_2 = {{\text{Lat}_2\,(^\circ)}} \\ \Delta\lambda &= {{\text{Lon}_2\,(^\circ)}} - {{\text{Lon}_1\,(^\circ)}} \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

Great Circle Distance
5,570.22
kilometers
Miles 3,461.17 mi
Nautical miles 3,007.68 nmi
Earth radius used 6,371 km (mean)

Report an error on this page

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.

Globe showing a curved great circle arc between two points versus a straight chord through the sphere
The great circle distance is the shortest path along the Earth's surface between two 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.

Advertisement
Sphere with center, two radii to surface points, central angle, and latitude and longitude angles
The formula relates the central angle to the latitudes and longitude difference of the two points.

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.

Advertisement

Step-by-Step: Calculating Great Circle Distance by Hand

  1. 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.
  2. Convert to radians. Multiply each angle by \(\pi/180\): \(\varphi_1, \varphi_2\) from the latitudes and \(\lambda_1, \lambda_2\) from the longitudes.
  3. Compute the longitude difference. \(\Delta\lambda = \lambda_2 - \lambda_1\). Only its cosine is used, so the sign does not matter.
  4. Evaluate the central-angle term. $$x = \sin\varphi_1 \sin\varphi_2 + \cos\varphi_1 \cos\varphi_2 \cos\Delta\lambda$$
  5. 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.
  6. Multiply by the radius. \(d_{\text{km}} = 6371 \cdot \sigma\).
  7. 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°).

  1. The coordinates are already in signed decimal degrees.
  2. \(\varphi_1 = \varphi_2 = 0\) and \(\lambda_2 = 90 \times \pi/180 = \pi/2\).
  3. \(\Delta\lambda = \pi/2 - 0 = \pi/2\).
  4. \(x = \sin 0 \cdot \sin 0 + \cos 0 \cdot \cos 0 \cdot \cos(\pi/2) = 0 + 1 \cdot 1 \cdot 0 = 0\).
  5. \(\sigma = \arccos(0) = \pi/2 \approx 1.570796\) rad.
  6. \(d = 6371 \times 1.570796 \approx\) 10,007.54 km.
  7. 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°).

Last updated:

Most popular in Personal Finance

View all Personal Finance calculators