Omni Calculator logo

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.

A great circle
The edge of a sphere sliced through the center is a great circle.

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.

Short lines on a sphere are not always straight on a projection.
Short lines on a sphere are not always straight on a projection.

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=(φA,λA)A = (\varphi_\mathrm{A},\lambda_\mathrm{A})

The latitude of a point identifies the north-south direction. The poles lie at 90° N90\degree\ \mathrm{N} and 90° S90\degree\ \mathrm{S}, while the equator lies at 0°0\degree. The longitude varies from 0°0\degree (passing through Greenwich) to 180°180\degree on the other side of the globe. We mark the longitude in the two hemispheres with E\mathrm{E} and W\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 E=180 W180\ \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=(φA,λA)A = (\varphi_\mathrm{A},\lambda_\mathrm{A}) and B=(φB,λB)B = (\varphi_\mathrm{B},\lambda_\mathrm{B}). To calculate the shortest path on the great circle, use the formula:

d=rarccos(sinφAsinφB+cosφAcosφBcos(λAλB))\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 rr 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=r2πC = r\cdot2\pi. There, you take the radius rr 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 rr, 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°360\degree (or 2π2\pi, if you are working using radians). Equivalently, subtract the length we previously found from the circumference:

D=dr2π\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:

  • aa — The semi-major axis;
  • bb — The semi-minor axis; and
  • ff — 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=6378137.8 ma = 6 378 137.8\ \mathrm{m};
  • b6356752.314140 mb \approx 6 356 752.314140\ \mathrm{m}; and
  • f=298.257223563f = 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:
    • UA ⁣= ⁣arctan ⁣((1 ⁣ ⁣f)tan(φA))\small U_\mathrm{A}\! =\! \mathrm{arctan}\!\left((1\!-\!f)\tan(\varphi_{\mathrm{A}})\right); and
    • UB=arctan ⁣((1 ⁣ ⁣f)tan(φB))\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 LL: λ=L=λAλB\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
  • σm\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:

sin(σ)= cos2(UB)sin2(λ)+(cos(UA)sin(UB)sin(UA)cos(UB)cos(λ))2\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*}


cos(σ)=sin(UA)sin(UB)+cos(UA)cos(UB)cos(λ)\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 arctan2\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:

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

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

sin(α)=cos(UA)cos(UB)sin(λ)sin(σ)\footnotesize \sin(\alpha) \!=\! \frac{\cos(U_{\mathrm{A}})\!\cos(U_{\mathrm{B}})\!\sin(\lambda)}{\sin(\sigma)}

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

cos(σm)=cos(σ)2sin(U1)sin(U2)cos2(α)=cos(σ)2sin(U1)sin(U2)1sin2(α)\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 cos2(α)\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°90\degree, and the denominator goes to 00.

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

C=fcos2(α)16(4+f(43cos2(α)))\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:

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


P= Ccos(σ)(2cos2(2σm)1)+cos(2σm)\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: λnew\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 101210^{-12}, and repeat the steps above till the difference λλnew\lambda-\lambda_{\mathrm{new}}. Every time you start again, perform the substitution λ=λnew\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:

u2=cos2(α)(a2b2b2)\footnotesize u^2 = \cos^2(\alpha)\left(\frac{a^2-b^2}{b^2}\right)

Next steps, find the values of AA and BB:

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


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


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


B^=u2(7447u2)128\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:

Δσ=Bsin(σ)(cos(2σm)+14B(cos(σ)(1+2cos2(2σm))B6cos(2σm)(3+4sin2(σ))(3+4cos2(2σm))))\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:

s=bA(σΔσ)\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:

φLAX=33°56 30=33.94°NλLAX=118°24 31=118.4°W\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}


φLHR=51°28 12=51.47°NλLHR=0°27 15=0.4543°W\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:

dsphere=8760.2 kmdWGS84=8781.2 km\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%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.

GC route
The great circle distance is not the same as the one you would draw on the map!

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 km10000\ \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!

A geodesic from space

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.

Satellite paths are geodesic

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!


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)
Hemisphere (E/W)
Coordinates — second point
Hemisphere (N/S)
Hemisphere (E/W)
Great circle distance
Desired distance unit:
Great circle distance (sphere)8760.20 km
Great circle distance (ellipsoid)8781.20 km
Check out 23 similar 3d geometry calculators 📦
Area of a hemisphereCubeCube Calc: find v, a, d… 20 more
People also viewed…

Car vs. Bike

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


If you're wondering how to find the centroid of a triangle or any other shape, look no further – this awesome centroid calculator is here for you.

Scientific notation converter

Use our scientific notation converter to convert between decimal and scientific notation of a given number.


The perfect snowman calculator uses math & science rules to help you design the snowman of your dreams!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service