A great circle calculator finds the shortest distance between two points on the Earth's surface, following the curve of the sphere, from their latitude and longitude. Enter the coordinates of both places and the calculator gives the distance in kilometers, miles and nautical miles, with the central angle. It uses the haversine formula on Wikipedia's page of that name, with the mean radius of the Earth from the page on great-circle distance, and it works in your browser.
How to use the great circle calculator
- Enter the latitude and longitude of point 1 in decimal degrees.
- Enter the latitude and longitude of point 2. North and east are positive, south and west are negative.
- Leave the radius at 6371.009 kilometers, or change it.
- Press Work out the distance.
What a great circle is
A great circle is a circle on a sphere whose center is the center of the sphere. The shortest path between two points on a sphere is an arc of a great circle, which is why flight routes on a flat map look curved. The Wikipedia page on the great-circle distance gives the central angle between two points from the spherical law of cosines, and the distance is the radius of the sphere times that angle in radians.
The haversine formula
The haversine formula is a form of the same result that stays accurate for short distances, where the cosine form loses precision. The page gives it as hav of the angle equals hav of the difference of the latitudes plus the cosine of the first latitude times the cosine of the second latitude times hav of the difference of the longitudes, where hav of x is the sine of half of x, squared. The angle is then 2 times the arcsine of the square root of that number, and the distance is the radius times the angle. The calculator applies this formula.
The radius of the Earth
The page gives the equatorial radius of the Earth as 6378.137 kilometers and the polar radius as 6356.752 kilometers, and a mean radius of about 6371.009 kilometers, which is the default here. The haversine page works its example with 6371.2 kilometers. A different radius changes the distance in proportion. In miles, the mean radius is about 3958.8, a conversion that the pages do not state. A mile is 1.609344 kilometers and a nautical mile is 1.852 kilometers.
The example from the page
The haversine page measures the distance from the White House at 38.898 degrees north and 77.037 degrees west to the Eiffel Tower at 48.858 degrees north and 2.294 degrees east. The difference of the latitudes is 9.960 degrees and that of the longitudes is 79.331 degrees, the haversine of the angle is about 0.21616, the angle is about 55.411 degrees, and with a radius of 6371.2 kilometers the distance is about 6161.6 kilometers. With the radius of 6371.009 the calculator gives a number that is a little smaller, about 6161.4 kilometers. The page also gives 6177.45 kilometers on the ellipsoid, which shows the size of the spherical error.
Accuracy
The page says that the spherical formulas are accurate to within about 0.5 percent, since the Earth is slightly flattened at the poles. For a trip of 6,000 kilometers that is up to about 30 kilometers. For work that needs more accuracy, use a formula on the ellipsoid. For planning a trip or comparing distances, the spherical result is a good one.
Uses and limits
The calculator is useful for estimating flight distances, shipping routes, hiking maps that use coordinates and any problem where two places are given by latitude and longitude. It gives the straight-line path over the surface, not the distance by road or by air route. If you need the distance between cities by their names, the city distance calculator on this site does that.
More examples
Two points on the equator that are 90 degrees apart in longitude are a quarter of the way round the Earth, which is about 10,007 kilometers with the mean radius. A point at the North Pole and one at the South Pole are half of the way round, about 20,015 kilometers. Two identical points give a distance of zero. These cases are easy to check and show that the calculator works over the whole range of latitudes and longitudes.
Converting degrees, minutes and seconds
Many maps and devices give coordinates in degrees, minutes and seconds. To convert, divide the minutes by 60 and the seconds by 3600 and add them to the degrees. For example, 40 degrees 42 minutes 46 seconds north is 40 plus 0.7 plus 0.01278, which is about 40.7128 degrees. The decimal degrees angle converter on this site can help, and for west and south you make the number negative.
Nautical miles
A nautical mile is one minute of arc along a great circle, which is where its length of 1.852 kilometers comes from. Sailors and pilots measure distance in nautical miles for this reason, and the central angle of the calculator in degrees multiplied by 60 gives the distance in nautical miles for a sphere of that size. For the mean radius, the two values agree within a small fraction of a percent.
Common mistakes
- Mixing up latitude and longitude. Latitude is north or south, from −90 to 90.
- Forgetting the signs. West and south are negative.
- Entering degrees, minutes and seconds. Convert to decimal degrees first.
- Expecting a road distance. This is a straight path over the surface.
What next
Use this often? Add Great Circle to your Home screen.
Frequently asked questions
What is a great circle calculator?
A tool that finds the shortest distance over the Earth's surface between two points given by latitude and longitude.
What is the haversine formula?
It gives the central angle from hav θ = hav(Δφ) + cos φ₁ × cos φ₂ × hav(Δλ), and the distance is the radius times θ.
Which radius of the Earth is used?
The mean radius of 6371.009 km by default. The haversine page's example uses 6371.2 km.
How accurate is it?
About 0.5 percent, since the Earth is not a perfect sphere. For more accuracy use an ellipsoid method.
Why do flights look curved on a map?
The shortest path between two points on a sphere is an arc of a great circle, which a flat map shows as a curve.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.