Great-Circle Distance Calculator

Great-circle distance3,935.7 km
In miles2,445.6 mi
In nautical miles2,125.1 nmi
How this was calculated
  1. Convert the coordinates to radians and apply the haversine formula: a = sin²(Δφ ÷ 2) + cos φ1 × cos φ2 × sin²(Δλ ÷ 2) = 0.0924.
  2. The central angle is c = 2 × atan2(√a, √(1 − a)) = 0.6178 rad, and distance = 6,371 × 0.6178 = 3,935.7 km, using the Earth's mean radius of 6,371 km.
  3. This is the shortest path over the surface — the route a flight approximates — not the driving distance, which is typically 15 to 30 percent longer.

A great circle distance calculator finds the shortest path between two points on a sphere. Enter the latitude and longitude of your starting point and destination, and this tool computes the great-circle distance using the haversine formula with the Earth's mean radius of 6,371 km. The result is the straight-line distance across the surface of the globe, not a road or driving distance. For reference, the calculator returns 3,935.7 km from New York (40.7128, -74.0060) to Los Angeles (34.0522, -118.2437), 343.6 km from London (51.5074, -0.1278) to Paris (48.8566, 2.3522), and 713.4 km from Sydney (-33.8688, 151.2093) to Melbourne (-37.8136, 144.9631).

The haversine formula is the accepted standard for this calculation because it stays accurate for small distances, where the spherical law of cosines loses precision to rounding. The great-circle distance is the route that flights approximate, and a road trip between the same points is typically 15-30 percent longer. Against the true WGS84 ellipsoid, the spherical result is within about 0.5 percent. This page shows the full formula, step-by-step workings, worked examples, and sources so you can verify every calculation yourself.

Worked examples

Across the United States

Primary result: 3,935.7 km — the great-circle route from New York to Los Angeles, noticeably shorter than the roughly 4,500 km drive. (40.7128 deg · -74.006 deg · 34.0522 deg · -118.2437 deg)

Great-circle distance3,935.7 km
In miles2,445.6 mi
In nautical miles2,125.1 nmi

Across the Channel

Primary result: 343.6 km — London to Paris as the crow flies. (51.5074 deg · -0.1278 deg · 48.8566 deg · 2.3522 deg)

Great-circle distance343.6 km
In miles213.5 mi
In nautical miles185.5 nmi

Australia's two big cities

Primary result: 713.4 km — Sydney to Melbourne over the surface of the sphere. (-33.8688 deg · 151.2093 deg · -37.8136 deg · 144.9631 deg)

Great-circle distance713.4 km
In miles443.3 mi
In nautical miles385.2 nmi

What a great circle is

A great circle is the largest possible circle you can draw on a sphere. If you imagine slicing a ball in half with a straight cut that passes through its center, the edge of that cut is a great circle. On Earth, the equator is a great circle, and so is any line of longitude paired with its opposite partner. What makes the great circle special is that it divides the sphere into two equal halves, and no circle drawn on the surface of the sphere can be larger.

Because the great circle is the largest circle on a sphere, any path you trace along it between two points is the shortest surface distance connecting those points. This is why a great circle distance calculator relies on this concept to find the most direct route between two locations on Earth. The haversine formula used on this page calculates that shortest path from latitude and longitude coordinates, using the Earth's mean radius of 6,371 km. The haversine form is chosen over the spherical law of cosines because it stays accurate for small distances, where the law of cosines loses precision to rounding errors.

If you have ever looked at a flight map and noticed that the airplane's route appears curved rather than straight, the great circle explains why. Flat maps distort the surface of a sphere, stretching it to fit a rectangle. When you take a great circle route and flatten it onto a map, the shortest path no longer looks like a straight line. The flight is actually following the most direct route along the surface of the Earth, but the map projection makes that route look curved. A flight from New York to Los Angeles covers a great-circle distance of 3,935.7 km, and airlines approximate that route rather than flying what might look straight on a flat map.

The great-circle distance represents the shortest path, but real-world travel rarely matches it exactly. A road trip between the same two points is typically 15 to 30 percent longer than the great-circle distance because roads wind around terrain, follow property boundaries, and connect through cities rather than traveling in a direct line. Even flights do not follow the great circle perfectly, since they adjust for weather, air traffic, and airspace restrictions. The spherical result this calculator produces is within about 0.5 percent of the true distance measured against the WGS84 ellipsoid, which is the more precise model of the Earth's shape used by GPS systems.

The haversine formula, step by step

The haversine formula breaks the distance calculation into three manageable pieces: an intermediate term called a, a second term called c, and a final atan2 finish that converts the result into a usable distance. To walk through it, take a verified short-distance pair — London (51.5074, -0.1278) to Paris (48.8566, 2.3522), which our great circle distance calculator confirms at 343.6 km — and follow each step.

First, convert every latitude and longitude from degrees to radians. Let lat1 and lon1 be the London coordinates and lat2 and lon2 be the Paris coordinates. Compute the differences: dLat = lat2 minus lat1, and dLon = lon2 minus lon1. The a term then combines these differences with the latitudes using the sine and cosine of half-angles: a equals sin squared of (dLat divided by 2) plus cosine of lat1 times cosine of lat2 times sin squared of (dLon divided by 2). For the London-to-Paris pair, this produces a small positive value well within the safe numeric range of the formula, which is exactly why the haversine form is preferred over the spherical law of cosines for short routes where rounding can corrupt the result.

Next, the c term turns a into an angular distance. The relationship is c equals 2 times atan2 of the square root of a and the square root of (1 minus a). Using atan2 rather than a plain atan keeps the calculation stable across the full range of inputs, and taking the square root of a and its complement ensures the angle lands in the correct quadrant. Multiply c by the Earth's mean radius of 6,371 km and you have the great-circle distance. Applied to London and Paris, the full chain yields 343.6 km, matching the verified reference value.

The same pipeline handles longer routes without modification. New York (40.7128, -74.0060) to Los Angeles (34.0522, -118.2437) produces 3,935.7 km, and Sydney (-33.8688, 151.2093) to Melbourne (-37.8136, 144.9631) produces 713.4 km. The result is always the straight-line spherical path — the route flights approximate — so a road trip between the same endpoints runs 15 to 30 percent longer. Against the true WGS84 ellipsoid, this spherical calculation is within about 0.5 percent, which is accurate enough for most planning purposes.

Worked examples

The table below shows three verified city pairs computed with the great circle distance calculator on this page. Each result uses the haversine formula with Earth's mean radius of 6,371 km, so you can confirm the outputs against your own coordinates before relying on the tool for navigation or planning.

These examples span short, medium, and long routes. The London to Paris pair at 343.6 km demonstrates why the haversine form is used instead of the spherical law of cosines: at small distances the cosines formula loses precision to rounding, while haversine stays accurate. The New York to Los Angeles result of 3,935.7 km and the Sydney to Melbourne result of 713.4 km round out the set with North American and Australian routes.

Keep in mind that great-circle distance is the shortest path between two points on a sphere, so these numbers represent the theoretical minimum. A road trip between the same points is typically 15 to 30 percent longer due to highways, terrain, and detours. Commercial flights approximate the great-circle route, which is why the numbers here line up reasonably well with published air distances.

Against the true WGS84 ellipsoid, the spherical result is within about 0.5 percent. For most everyday uses that margin is acceptable, but if you need survey-grade accuracy you should use an ellipsoidal model rather than a spherical one.

OriginDestinationLatitude, Longitude (Origin)Latitude, Longitude (Destination)Great-Circle Distance
New YorkLos Angeles40.7128, -74.006034.0522, -118.24373,935.7 km
LondonParis51.5074, -0.127848.8566, 2.3522343.6 km
SydneyMelbourne-33.8688, 151.2093-37.8136, 144.9631713.4 km

Entering coordinates

To use a great circle distance calculator, you need the latitude and longitude of both your starting point and your destination. The most reliable format to enter is decimal degrees, not degrees-minutes-seconds. In decimal degrees, coordinates look like simple decimal numbers, which is what this page's haversine formula expects. For example, New York's coordinates are 40.7128, -74.0060, and Los Angeles's are 34.0522, -118.2437. Entering them in that order — latitude first, longitude second — gives you the verified result of 3,935.7 km between the two cities.

The sign of each number matters. Latitude is positive for locations north of the equator and negative for locations south of it. Longitude is positive for locations east of the prime meridian and negative for locations west of it. That is why New York's longitude is -74.0060 (west of the prime meridian) while Paris's longitude is 2.3522 (east of it). Sydney's latitude is -33.8688 because it is south of the equator, and its longitude is 151.2093 because it is east of the prime meridian. Mixing up a positive or negative sign will place your point on the wrong side of the globe and give you a meaningless result.

If you do not already know the coordinates, you can read them straight from a map app. In Google Maps, right-click (or long-press on a phone) on any spot, and the latitude and longitude appear as a pair of decimal numbers near the top of the pop-up menu. In Apple Maps, a long press drops a pin, and the coordinates show up under the location's name. Most other mapping tools work similarly: click or tap a point, then copy the decimal-degree values. Always confirm the order is latitude, longitude before pasting them into the calculator.

A quick check can save you from a common mistake: latitude values always fall between -90 and 90, and longitude values always fall between -180 and 180. If you see a number outside those ranges, you have likely swapped latitude and longitude. For instance, London's coordinates are 51.5074, -0.1278 — the first number is clearly the latitude because it is under 90, and the second is the longitude. The verified distance from London to Paris (48.8566, 2.3522) is 343.6 km. Getting the order right is the single most important step before you calculate.

  • Use decimal degrees, not degrees-minutes-seconds.
  • Latitude comes first; longitude comes second.
  • Latitude is negative for south; longitude is negative for west.
  • Latitude ranges from -90 to 90; longitude ranges from -180 to 180.
  • Copy coordinates directly from a map app by right-clicking or long-pressing a point.
Always check the sign: a missing negative sign on longitude is the most common reason a great circle distance calculator returns an answer that is thousands of kilometers too long.

FAQs

What is the haversine formula?

The haversine formula calculates the distance between two points on a sphere using their latitudes and longitudes. It works like this: a = sin²(Δφ ÷ 2) + cos φ1 × cos φ2 × sin²(Δλ ÷ 2); the distance is 2R × atan2(√a, √(1−a)). Here, R is the radius of the Earth.

Why do flight paths curve on a map?

Flight paths curve on flat maps because they follow great circles — the true shortest path between two points on a sphere. Flat map projections distort the Earth's surface, bending these straight routes into arcs. What looks like a longer curved line is actually the most direct route.

How do I find the latitude and longitude of a place?

To find coordinates, long-press or right-click the place in a map app; it shows decimal coordinates, with west and south as negative numbers. For example, a location west of the prime meridian has a negative longitude, and one south of the equator has a negative latitude.

Is great-circle distance the same as flight distance?

Close — flights approximate it, with real routes lengthened by airways, winds and airspace restrictions. Airlines follow designated flight corridors and adjust for weather, so the actual distance flown is usually longer than the pure great-circle calculation between the same two airports.

How accurate is the spherical Earth model?

The spherical Earth model is within about 0.5% of the WGS84 ellipsoid distance; the verified New York to Los Angeles result is 3,935.7 km. For most uses, this level of accuracy is sufficient, though precise applications like surveying require the ellipsoid model.

What is the farthest two points on Earth can be?

The farthest two points on Earth can be is half the circumference — about 20,015 km — for antipodal points on opposite sides of the planet. These are locations directly across from each other, like certain spots in Spain and New Zealand.

Sources

Related calculators

Trip Cost Calculator
What a road trip really costs in fuel and tolls — gallons burned, fuel spend, total and cost per mile.
Fret Distance Calculator
Distance from the nut to any fret from scale length, using the twelfth-root-of-two rule, with fret spacing and bridge distance.
Hyperfocal Distance Calculator
Focus here and everything from half this distance to infinity is sharp — hyperfocal distance from focal length, aperture and sensor size.
Running Pace Calculator
Running pace per kilometre and per mile from distance and time, with the speed in kilometres per hour alongside.