# Great Circle Calculator

Created by Davide Borchia
Reviewed by Anna Szczepanek, PhD and Adena Benn
Last updated: Nov 08, 2022

Our great circle calculator will show you why you crossed the tip of Greenland while traveling from Los Angeles to London, even though it looks well out of the way. Here you will understand how maps bend reality and acquire a better grasp of aerial routes.

Take off with Omni, and discover the quirks of geodesics; keep reading to learn:

• What is the great circle?
• How many great circles are out there?
• What is the great circle distance? And much more!

We will teach you how to calculate the great circle distance between two points, both on a sphere and a more realistic shape for Earth. What are you waiting for? Get ready for departure!

## What is the great circle? Introduction to the great circle between two points

We can give you two definitions of the great circle, one of them complex, albeit straightforward; the other much more intuitive. Before the definitions, though, it's better to introduce the situations in which we will test our great circle calculator!

We define great circles on solid shapes with some degrees of rotational symmetry, namely spheres and ellipsoids. On such figures, the rules of the geometry we meet every day are somehow... bent. Let's see how!

#### What is a great circle: a mathematical definition

The great circle is the closed circle deriving from the intersection of a sphere and a plane passing through the center of the sphere. The intersection traces the largest possible closed path on a sphere.

This definition, of course, allows you to create infinitely many great circles. The same holds if we consider the great circle passing through a point on the sphere's surface.

This infinite multiplicity is eventually broken when we try to find the great circle between two points. In fact, by choosing two distinct points on a sphere, you can trace a single great circle between them.

🙋 There is an exception to this rule! If the two points are antipodes, you can find again infinitely many great circles passing through them. What are antipodes? We're glad you asked: visit our antipode calculator to have some fun while learning some geography!

When considering two points and the great circle between them, we can define (and calculate) the distance between them on the great circle: there are two possible values:

• The longer path; and
• The shorter path.

The shorter path leads us to the second definition of the great circle.

#### The great circle definition based on the distance between two points

The great circle is the circle containing the shortest possible path between two points on a sphere.

## So, what is the great circle distance between two points? And why is it important?

Earlier, we said that the great circle distance we calculate between two points is the shortest possible path. This characteristic makes this path a geodesic of our solid. A geodesic is a particular curve that defies our common sense a bit.

As humans, we perceive our world as a set of orthogonal coordinates, and the shortest path between two points in our field of view is — if obstacles allow it — a straight line. Expand your horizon to a larger scale, and consider the planet. Take two points, and draw the shortest line across them (you can do it by wrapping a taut string around the planet — though this is more easily done on a globe). Now "open" the planet's surface to visualize it in two dimensions: we did it in the picture below.

Our straight line has bent! Was it a straight line in the first place? Maybe it was just because of our vantage point? It's a complicated question, and the answer is geodesic!

Why do the geodesics on a sphere look so weird? The problem lies in the impossibility of representing truthfully such shapes in two dimensions. Have you ever tried flattening a ball? Yup, you can't unless you stretch the fabric in some way. That's what we do when we draw a map in the widespread Mercator projection: stretch the poles so much that they are apparently equal to the length of the equator — while in three dimensions, those are points: not lengths at all!

## How do I calculate the great circle distance?

To calculate the great circle distance between two points, first, we must decide which shape we are drawing our geodesic on.
In Omni's great circle calculator, we will consider two cases:

• sphere; and
• ellipsoid.

In both situations, our starting and ending points are uniquely identified by a pair of coordinates, the latitude and the longitude:

$A = (\varphi_\mathrm{A},\lambda_\mathrm{A})$

The latitude of a point identifies the north-south direction. The poles lie at $90\degree\ \mathrm{N}$ and $90\degree\ \mathrm{S}$, while the equator lies at $0\degree$. The longitude varies from $0\degree$ (passing through Greenwich) to $180\degree$ on the other side of the globe. We mark the longitude in the two hemispheres with $\mathrm{E}$ and $\mathrm{W}$.

🙋 A couple of remarks on the longitude. While latitude uses "natural" references (the equator, the poles), the definition of latitude required geographers to find a convention: nothing is special about Greenwich; we just needed a point where to start! Also, remember that $180\ \mathrm{E}=180\ \mathrm{W}$!

If you want to learn how to calculate the great circle distance between two points, we need to set a convention on the latitude: we will use trigonometric functions, and they don't like "west" or "north" as quantities. The convention we use is the following:

• For points in the northern hemisphere, the latitude is positive;
• For points in the southern hemisphere, the latitude is negative;
• The longitude of points in the eastern hemisphere is positive: and
• The longitude of points in the western hemispheres is negative.

#### How to calculate the great circle distance on a sphere?

Let's see, now, the relatively easy case of a sphere! Take two points, $A = (\varphi_\mathrm{A},\lambda_\mathrm{A})$ and $B = (\varphi_\mathrm{B},\lambda_\mathrm{B})$. To calculate the shortest path on the great circle, use the formula:

\footnotesize \begin{align*} d = r &\cdot \mathrm{arccos}\big(\!\sin\varphi_{\mathrm{A}} \cdot \sin\varphi_{\mathrm{B}}\\+&\cos\varphi_{\mathrm{A}} \cdot \cos\varphi_{\mathrm{B}} \cdot \cos(\lambda_{\mathrm{A}} - \lambda_{\mathrm{B}}\!)\big) \end{align*}

Where $r$ is the radius of your sphere (or ideal planet). The formula rightfully reminds us of the one we use to calculate the circumference of a circle, $C = r\cdot2\pi$. There, you take the radius $r$ and multiply it by the full angle (the one defining a circle!). In the case of the great circle distance, we are still considering a circle with radius $r$, but a different central angle (as we can see in the arc length calculator).

How to find the other great circle distance between the two points? Simply subtract the argument of the inverse cosine from $360\degree$ (or $2\pi$, if you are working using radians). Equivalently, subtract the length we previously found from the circumference:

$\footnotesize D = d-r\cdot2\pi$

#### How to calculate the great circle distance on an ellipsoid

The real world hits us hard when it comes to calculating the great circle distance between airports or any pair of points on a planet. See, planets have the annoying habit of being larger at the waist; technically, we call this phenomenon "equatorial bulge", which originates because a planet spins relatively fast around its axis, with maximum speed at the equator corresponding to higher (although apparent) centripetal force. From an ideal sphere, we have then to consider an ellipsoid.

To calculate the great circle distance on an ellipsoid, we need to know a couple of parameters:

• $a$ — The semi-major axis;
• $b$ — The semi-minor axis; and
• $f$ — The flattening of the ellipsoid.

The numerical values of these quantities, at least for the Earth, come from a reference ellipsoid model. In our great circle calculator, we went for the WGS 84: a widespread model used even by GPS satellites. Here are the numbers:

• $a = 6 378 137.8\ \mathrm{m}$;
• $b \approx 6 356 752.314140\ \mathrm{m}$; and
• $f = 298.257 223 563$.

We will now introduce Vincenty's formula to calculate the great circle on an ellipsoid. First, define the following quantities:

• The reduced latitude of the points:
• $\small U_\mathrm{A}\! =\! \mathrm{arctan}\!\left((1\!-\!f)\tan(\varphi_{\mathrm{A}})\right)$; and
• $\small U_\mathrm{B} = \mathrm{arctan}\!\left((1\!-\!f)\tan(\varphi_{\mathrm{B}})\right)$.
• The difference in latitude on the auxiliary sphere, $\lambda$. We set this value, at the beginning of our calculations, to the difference in latitude $L$: $\lambda = L = \lambda_{\mathrm{A}} - \lambda_\mathrm{B}$. You will need this quantity later!

In our calculations, we will make use of two other angles:

• $\sigma$ — The angle between the two points; and
• $\sigma_{\mathrm{m}}$ — The angle between the midpoint of the great circle distance and the equator.

In the first steps of our calculations, we iterate a set of operations until their result ($\lambda$) converges to the desired accuracy.
The first equations define the sine and cosine of the (unknown) angle $\sigma$ between the points:

\footnotesize \begin{align*} \sin(\sigma) = \ & \cos^2(U_{\mathrm{B}})\sin^2(\lambda) \\ + &\big(\!\cos(U_{\mathrm{A}})\sin(U_{\mathrm{B}}) \! \\ & - \! \sin(U_{\mathrm{A}})\cos(U_{\mathrm{B}})\cos(\lambda)\big)^2 \end{align*}

And:

\footnotesize \begin{align*} \cos(\sigma) = & \sin(U_{\mathrm{A}})\sin(U_{\mathrm{B}}) \\ & + \cos(U_{\mathrm{A}})\cos(U_{\mathrm{B}})\cos(\lambda) \end{align*}

We then find the value of the angle with the function $\mathrm{arctan2}$, which computes the angle between the horizontal axis and the segment between the origin and the point identified by the argument, thus removing the uncertainty associated with the arctangent function (you can learn more about this trigonometric function at our arctan calculator). The angle $\sigma$ is:

$\footnotesize \sigma = \mathrm{arctan2}(\sin(\sigma),\cos(\sigma))$

Proceed to compute the angle $\alpha$ (this quantity is a bit more complex to explain):

$\footnotesize \sin(\alpha) \!=\! \frac{\cos(U_{\mathrm{A}})\!\cos(U_{\mathrm{B}})\!\sin(\lambda)}{\sin(\sigma)}$

This quantity is necessary in the calculations for $\sigma_\mathrm{m}$, and roughly coincides with the angle of the geodesic compared to the equator. Next step:

$\footnotesize \begin{split} \cos(\sigma_\mathrm{m}) &= \cos(\sigma)-\frac{2\sin(U_1)\sin(U_2)}{\cos^2(\alpha)} \\ &= \cos(\sigma)-\frac{2\sin(U_1)\sin(U_2)}{1-\sin^2(\alpha)} \end{split}$

⚠️ Wait: see that $\cos^2(\alpha)$ at the denominator? That's an unfortunate mathematical quirk that prevents us from using Vincenty's formula for a pair of points on the equator. Here, the value of that angle approaches $90\degree$, and the denominator goes to $0$.

Now, with this quantity, we compute the value of the temporary variable $C$:

$\footnotesize C\! =\!\frac{f\cos^2(\alpha)}{16}\Big(\!4+f\big(4-3\cos^2(\alpha)\big)\!\Big)$

And finally, we calculate the new value of $\lambda$:

$\footnotesize \begin{split} \lambda_{\mathrm{new}} &= (1\!-\!C)f\sin(\alpha)(\sigma\!+\!C\sin(\sigma)P)\\ & + L \end{split}$

where

$\footnotesize \begin{split} P = \ & C\cos(\sigma)\big(2\cos^2(2\sigma_{\mathrm{m}})-1\big) \\ & + \cos(2\sigma_{\mathrm{m}}) \end{split}$

Now compare the value of $\lambda$ we set at the beginning and the one we found with the last step: $\lambda_{\mathrm{new}}$. Their difference has a given value, and our objective is to minimize it (or at least, reduce it).

Set a threshold, say $10^{-12}$, and repeat the steps above till the difference $\lambda-\lambda_{\mathrm{new}}$. Every time you start again, perform the substitution $\lambda = \lambda_{\mathrm{new}}$.

And now we need to calculate the great circle distance between two points on an ellipsoid. Start by calculating the following equation:

$\footnotesize u^2 = \cos^2(\alpha)\left(\frac{a^2-b^2}{b^2}\right)$

Next steps, find the values of $A$ and $B$:

$\footnotesize \begin{split} A &= 1+\frac{u^2}{16384}\big(4096 +u^2\hat{A} \big) \end{split}$

where

$\footnotesize \hat{A} = u^2\big(320-175u^2\big) -768$

And:

$\footnotesize \begin{split} B &= \frac{u^2}{1024}\big(\!256+u^2\hat{B}\big) \end{split}$

with

$\footnotesize \hat{B} = u^2\big(74-47u^2\big) -128$

Now calculate the angle covered by the path. You're warned, it's not a nice formula:

$\footnotesize \begin{split} Δ\sigma &= B\sin(\sigma)\bigg(\!\cos(2\sigma_{\mathrm{m}})\\ &+\tfrac{1}{4}B\Big(\!\cos(\sigma)\big(\!\!-1+2\cos^2(2\sigma_{\mathrm{m}})\big)\\ &-\tfrac{B}{6}\cos(2\sigma_{\mathrm{m}})\big(\!\!-3+4\sin^2(\sigma)\big)\\ &\cdot\big(\!\!-3+4\cos^2(2\sigma_{\mathrm{m}})\big)\!\!\Big)\!\!\bigg) \end{split}$

We're on it! Using (some) of the quantities we found before, we calculate the great circle distance:

$\footnotesize s = bA\big(\sigma - Δ\sigma\big)$

🙋 Vincenty's formula works flawlessly for most situations but encounters some issues with antipodal points: here, the convergence is not guaranteed. Our calculator cuts the interactions after one hundred attempts and prints the attained accuracy. More, and the page would freeze because of science!

## Examples of great circle distance calculation

You may think that all these formulas and math are out of this world and live only in textbooks. Where can we use the calculations for the great circle distance between two points? Well, we're glad you asked!

Every time you take a plane for more than a regional flight, your route would not follow a straight line on the map, but rather a geodesic. Use our tool to calculate the great circle distance between airports: we set the default values to the ones of the Los Angeles airport and Heathrow. Their coordinates are:

$\small \begin{split} \varphi_{\mathrm{LAX}}&= 33\degree56'\ 30''=33.94\degree \mathrm{N}\\ \lambda_{\mathrm{LAX}}&=118\degree24'\ 31'' =118.4\degree \mathrm{W} \end{split}$

And:

$\small \begin{split} \varphi_{\mathrm{LHR}}&= 51\degree28'\ 12''=51.47\degree \mathrm{N}\\ \lambda_{\mathrm{LHR}}&=0\degree27'\ 15''=0.4543\degree \mathrm{W} \end{split}$

Before applying the great circle distance calculation formulas, convert the angles to radians. You can use our angle conversion for the purpose! Showing off the entire procedure for Vincenty's formula would be tiresome, let's only check the solutions for this aerial route:

$\begin{split} d_{\mathrm{sphere}} &= 8760.2\ \mathrm{km}\\ d_{\mathrm{WGS84}} &= 8781.2\ \mathrm{km} \end{split}$

As you can see, the difference is not dramatic, falling short of $0.25\%$ of the longer one. On a map, it would be barely noticeable. In blue, you can see the great circle route between Los Angeles airport and Heathrow airport: see how it passes way higher than you'd expect.

The difference between the distances changes significantly if we measure the length of the apparently straight path in red. By using the good old Pythagorean theorem on the "horizontal" and "vertical" distances between airports, we can compute the non-geodesic distance between the two airports: it would amount to more than $10000\ \mathrm{km}$. Yup, better passing over Greenland!

Last, but not least, jump on a rocket, and look at our Planet from above. The geodesic would look exactly like a straight line from a specific point above the northern hemisphere, confirming that it's effectively the shortest path!

This is only but an example of calculations of the great circle distance. Have fun with our calculator; it's straightforward to use!

One last fun fact: if you've seen a sci-fi movie, you likely noticed those nice-looking screens with the paths of satellites above Earth. Those often are geodesics, great circles! Look at the picture below.

Not only can we see that a circular orbit follows the rules of geodesics, but that the "bends" change direction when you cross the equator: geodesics are even weirder than we already knew!

## FAQ

### What is the great circle distance?

The great circle distance is the length of an arc between two points belonging to a circumference passing through the center of a sphere or ellipsoid.

Great circles are straight lines on a sphere but bend when you represent the shape in two dimensions. That's why aerial routes, straight in real life, look curved on a map.

### How do I calculate the great circle distance on a sphere?

To calculate the great circle distance on a sphere, take the points A = (φA, λA) and B = (φB, λB), and follow the steps:

1. Compute the product of the cosines of the latitudes and the difference of longitudes:
t1 = cos(φA) × cos(φB) × cos(λA - λB)
2. Compute the product of the sines of the longitudes:
t2 = sin(λA) × sin(λB)
3. Calculate the inverse cosine of the sum of the two quantities, and multiply it by the radius:
d = r × t1+ t2

This is the great circle distance.

### What is the approximate distance between New York and Sydney?

The distance is d = 15988.75 km.
Consider the coordinates of the two cities:

• New York = (40.71° N, 74.01° W);
• Sydney = (33.87° S, 151.21 E°).

Now plug the coordinates in the formula for the great circle on a sphere:

d = r × arccos(cos(φA) × cos(φB) × cos(λA - λB) + sin(φA) × sin(φB))

d = 6371 × arccos(cos(40.71°) × cos(-33.87°) × cos(74.01° + 151.21°) + sin(40.71°) × sin(-33.87°))

d = 15988.75 km

Notice we used negative signs for the southern and eastern hemispheres.

### How long is a great circle on Earth?

If you consider Earth to be a sphere with a radius r = 6371 km, then the great circles have all the same length, equal to 40,030 km.
Earth, however, is an ellipsoid, and the great circle lengths vary between two values:

• The circumference passing for the poles: 40,007 km; and
• The equatorial circumference: 40,075 km.
Davide Borchia
Coordinates — first point
Hemisphere (N/S)
N
Latitude
°
'
"
Hemisphere (E/W)
W
Longitude
°
'
"
Coordinates — second point
Hemisphere (N/S)
N
Latitude
°
'
"
Hemisphere (E/W)
W
Longitude
°
'
"
Great circle distance
Desired distance unit:
km
Great circle distance (sphere)8760.20 km
Great circle distance (ellipsoid)8781.20 km
People also viewed…

### Car vs. Bike

Everyone knows biking is fantastic, but only this Car vs. Bike Calculator turns biking hours into trees! 🌳