Map calculator

Distance Between Coordinates Calculator (Great-Circle)

The great-circle distance is the shortest path between two points on Earth's surface, and the haversine formula computes it from their latitudes and longitudes. On a sphere with a mean radius of 6,371 km, one degree of latitude is 111.2 km (69.1 mi), close to NOAA's figure of about 111 km. Enter two coordinates to get the distance in kilometers, miles and nautical miles.

Distance Between Coordinates Calculator

The great-circle distance is1,331.4 km · 827.3 mi718.9 nautical miles · central angle 11.973° · initial bearing 244° (SW)
  1. In decimal degrees: φ1 = 40°, λ1 = −105°, φ2 = 34°, λ2 = −118°
  2. Δφ = −6°, Δλ = −13° (converted to radians for the trig functions)
  3. a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2) = 0.01087758
  4. Central angle c = 2 · atan2(√a, √(1 − a)) = 0.208971 rad = 11.9732°
  5. d = R · c = 6,371 km × 0.208971 = 1,331.36 km
  6. In miles: 1,331.36 ÷ 1.609344 = 827.27 mi · nautical miles: 1,331.36 ÷ 1.852 = 718.87 nmi

Enter decimal degrees (south and west negative) or degrees, minutes and seconds such as 40°42'46"N. Earth is treated as a sphere with a mean radius of 6,371 km, so results can differ from survey-grade ellipsoid distances by up to about 0.5 %.

Desk globe with raised relief showing oceans and continents lit by soft window light, used to picture great-circle routes
A string stretched tight between two points on a globe follows a great circle, the shortest route the haversine formula measures.

At a Glance

The haversine formula finds the great-circle distance between two points: a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2), then d = 2R · atan2(√a, √(1 − a)), where φ is latitude, λ is longitude and R = 6,371 km. Treating Earth as a sphere keeps results within about 0.5% of precise ellipsoid distances.

Formula
Haversine (great-circle distance)
Earth radius used
6,371 km (mean radius)
Inputs
Latitude and longitude of two points
Coordinate formats
Decimal degrees or degrees-minutes-seconds
Outputs
km, miles, nautical miles, initial bearing
Accuracy vs ellipsoid
Within about 0.5%
On this page
  1. Distance between two latitude and longitude points
  2. How to Use the Distance Between Coordinates Calculator
  3. What Is Great-Circle Distance?
  4. What Is the Haversine Formula?
  5. How Do You Calculate Distance From Latitude and Longitude?
  6. How Far Is One Degree of Latitude and Longitude?
  7. How Accurate Is the Haversine Formula?
  8. Why Does the Bearing Change Along a Great Circle?
  9. Where Earth Scientists Use Coordinate Distances
  10. Common Misconceptions
  11. Key Facts
  12. FAQ

How to Use the Distance Between Coordinates Calculator

Type the latitude and longitude of two points, and the great-circle distance appears at once in kilometers and miles, with nautical miles, the central angle and the initial bearing below it.

  1. Enter point 1: latitude first, then longitude.
  2. Enter point 2 the same way.
  3. Read the distance and the bearing.
  4. Follow the numbered steps under the answer to check the math.

The boxes accept two formats. Decimal degrees use a minus sign for south and west, so 33.87° S is −33.87. Degrees, minutes and seconds can be typed as 40°42'46"N or simply 40 42 46 N. If you need to switch between the two formats for other work, the coordinate converter does that, and our page on degrees, minutes and seconds explains the notation.

Latitudes must stay between −90° and 90° and longitudes between −180° and 180°. A latitude typed with E or W, or a longitude with N or S, is rejected so the two cannot be swapped by accident.

What Is Great-Circle Distance?

A great circle is any circle on a sphere whose center is the center of the sphere, like the equator or any meridian. The shortest route between two points on the surface always runs along the great circle that passes through both of them.

Try it with a ball and a piece of string. Pin the string at two spots and pull it tight: it settles along a great circle. On a flat map the same route often looks curved, because map projections stretch the globe. On a Mercator map, long northern routes appear to bend toward the pole even though they are the straightest paths on the globe.

Parallels of latitude, other than the equator, are not great circles. That is why the shortest route between two cities at the same latitude does not follow their shared parallel, a point the second example below makes with real numbers.

Ten degrees of longitude at different latitudes: great-circle route vs following the parallel
LatitudeGreat circle (km)Along the parallel (km)Saved by the great circle
0° (equator)1,111.91,111.90 km
15°1,074.01,074.10.1 km
30°962.7963.00.3 km
45°785.8786.30.5 km
60°555.4556.00.6 km
75°287.5287.80.3 km
Source: Computed by us on a 6,371 km sphere: haversine for the great circle, 2πR × cos(latitude) × 10/360 for the parallel · Retrieved October 2026
Bar chart of great-circle distance across 10° of longitude: 1,111.9 km at 0°, 1,074 at 15°, 962.7 at 30°, 785.8 at 45°, 555.4 at 60°, 287.5 at 75°
The same 10° gap in longitude spans less and less ground toward the poles, because the meridians converge.

What Is the Haversine Formula?

The haversine formula turns two pairs of coordinates into the angle between them, measured at Earth's center, and multiplies that angle by the radius. Written out, a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2), and d = 2R · atan2(√a, √(1 − a)).

  • φ1, φ2 are the latitudes and λ1, λ2 the longitudes, converted from degrees to radians.
  • Δφ and Δλ are the differences in latitude and longitude.
  • R is Earth's radius. We use the mean radius, 6,371 km.

The name comes from the haversine function, hav θ = sin²(θ/2). The formula stays accurate for very short distances, where the older spherical law of cosines can lose precision on a calculator. For everyday distances the two agree; we checked our results against an independent law-of-cosines computation and they matched to the meter.

The haversine formula works with angles in radians. Δφ is the difference in latitude and Δλ the difference in longitude; a is an intermediate value between 0 and 1, and the atan2 step turns it into the central angle, which R converts to a distance.

d=2Ratan2(a,1−a),a=sin2Δφ2+cos⁡φ1cos⁡φ2sin2Δλ2
What each symbol means
SymbolQuantitySI unit
dgreat-circle distancekilometer (km)
Rmean radius of Earth (6,371 km)kilometer (km)
φ1latitude of point 1degree (°)
φ2latitude of point 2degree (°)
λ1longitude of point 1degree (°)
λ2longitude of point 2degree (°)
ahaversine of the central angle (intermediate value)no unit (1)

Valid for: Earth treated as a sphere of radius 6,371 km; Δφ = φ2 − φ1, Δλ = λ2 − λ1, south and west negative; results differ from ellipsoid (WGS 84 / NGS inverse) distances by up to about 0.5%.

How Do You Calculate Distance From Latitude and Longitude?

Six steps take you from coordinates to kilometers.

  1. Write both points in decimal degrees, south and west negative.
  2. Find Δφ = φ2 − φ1 and Δλ = λ2 − λ1, and convert all angles to radians by multiplying by π ÷ 180.
  3. Compute a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2).
  4. Compute the central angle c = 2 · atan2(√a, √(1 − a)).
  5. Multiply by R = 6,371 km to get the distance.
  6. Convert if needed: divide by 1.609344 for miles or by 1.852 for nautical miles.

The examples are computed in code with the formula, the same way the calculator works. The first checks the formula against a value NOAA publishes.

Example 1 One degree of latitude

How far is it from a point on the equator at 0° latitude, 0° longitude to a point 1° due north, at 1° N, 0°?

  1. Given:
    • Latitude of point 1: φ1=0 °
    • Longitude of point 1: λ1=0 °
    • Latitude of point 2: φ2=1 °
    • Longitude of point 2: λ2=0 °
  2. Formula: d=2Ratan2(a,1−a),a=sin2Δφ2+cos⁡φ1cos⁡φ2sin2Δλ2
  3. Substitute: φ1=0 °,λ1=0 °,φ2=1 °,λ2=0 °
  4. Answer: d=111.2 km

111.2 km is 69.1 mi, which rounds to NOAA's figure of about 111 km (69 mi) per degree of latitude.

Example 2 Ten degrees of longitude along 30° N

Find the great-circle distance between 30° N, 90° W and 30° N, 80° W, two points on the same parallel 10° of longitude apart.

  1. Given:
    • Latitude of point 1: φ1=30 °
    • Longitude of point 1 (west is negative): λ1=−90 °
    • Latitude of point 2: φ2=30 °
    • Longitude of point 2 (west is negative): λ2=−80 °
  2. Formula: d=2Ratan2(a,1−a),a=sin2Δφ2+cos⁡φ1cos⁡φ2sin2Δλ2
  3. Substitute: φ1=30 °,λ1=−90 °,φ2=30 °,λ2=−80 °
  4. Answer: d=962.7 km

Following the 30° N parallel instead would take 963.0 km. The great circle bows slightly toward the pole and saves about 0.3 km.

How Far Is One Degree of Latitude and Longitude?

NOAA's National Ocean Service puts one degree of latitude at about 111 km (69 mi) and one second of latitude at about 30.7 m. On our 6,371 km sphere the haversine formula gives 111.2 km per degree and 30.9 m per second, the small gap coming from Earth's slightly flattened shape.

Longitude is different, because meridians meet at the poles. NOAA gives about 111 km per degree at the equator and about 56 km at 60° north or south; the haversine formula gives 111.2 km and 55.6 km. Our latitude and longitude guide and the latitude vs longitude comparison use 111.32 km × cos(latitude), which is based on Earth's equatorial radius rather than the mean radius, so their per-degree values run about 0.1 km higher. All of these round to NOAA's figures.

One minute of latitude on our sphere is 1.853 km, almost exactly the 1.852 km nautical mile used at sea and in the air.

How Accurate Is the Haversine Formula?

Earth is not a perfect sphere. It bulges at the equator and is flattened at the poles, so surveyors and GPS software use an ellipsoid such as WGS 84. The NOAA National Geodetic Survey's Inverse tool, for example, computes distances on an ellipsoid.

To measure the error of the spherical shortcut, we wrote our own ellipsoid calculation (Vincenty's inverse method on WGS 84) and ran it alongside the haversine formula. Over the routes in the table below, the two differed by 0.05% to 0.56%. North-south distances near the equator come out slightly long on the sphere, and east-west distances at high latitudes slightly short.

For geography homework, flight-distance estimates, earthquake-distance problems and most maps, that accuracy is plenty. For land surveying, property lines or engineering, use an ellipsoid tool such as the NGS Inverse program.

Example 3 Two points about 1,300 km apart

What is the great-circle distance from 40° N, 105° W to 34° N, 118° W?

  1. Given:
    • Latitude of point 1: φ1=40 °
    • Longitude of point 1 (west is negative): λ1=−105 °
    • Latitude of point 2: φ2=34 °
    • Longitude of point 2 (west is negative): λ2=−118 °
  2. Formula: d=2Ratan2(a,1−a),a=sin2Δφ2+cos⁡φ1cos⁡φ2sin2Δλ2
  3. Substitute: φ1=40 °,λ1=−105 °,φ2=34 °,λ2=−118 °
  4. Answer: d=1,331 km

1,331.4 km is 827.3 mi. Our ellipsoid (WGS 84) calculation gives 1,333.0 km, so the sphere is short by about 0.13% on this route.

Haversine distances on a 6,371 km sphere compared with an ellipsoid (WGS 84) calculation
FromToHaversine (km)Haversine (mi)Ellipsoid (km)Difference
0°, 0°1° N, 0°111.1969.09110.57+0.56%
0°, 0°0°, 1° E111.1969.09111.32−0.11%
45° N, 0°46° N, 0°111.1969.09111.14+0.05%
60° N, 0°60° N, 1° E55.6034.5555.80−0.36%
30° N, 90° W30° N, 80° W962.67598.18964.56−0.20%
40° N, 105° W34° N, 118° W1,331.36827.271,333.03−0.13%
51.5° N, 0°40.7° N, 74° W5,579.373,466.865,594.41−0.27%
35° N, 139° E34° S, 151° E7,773.424,830.187,739.97+0.43%
0°, 0° (equator)90° N (North Pole)10,007.546,218.4010,001.97+0.06%
0°, 0°0°, 90° E10,007.546,218.4010,018.75−0.11%
Source: Computed by us: haversine with R = 6,371 km; ellipsoid = our Vincenty inverse on WGS 84 (the ellipsoid method used by the NOAA NGS Inverse tool); checked against NOAA National Ocean Service values of about 111 km per degree of latitude and 56 km per degree of longitude at 60° (retrieved 2026-10)

Why Does the Bearing Change Along a Great Circle?

The calculator also reports the initial bearing, the compass direction you would face when leaving point 1 along the great circle. On a great-circle route that direction keeps changing, except when you travel due north, due south or along the equator.

Take two points at 60° N that are 90° of longitude apart. Following the parallel due east would cover 5,003.8 km. The great circle covers only 4,604.5 km, but it leaves on a bearing of 49.1°, roughly northeast, curves poleward and arrives heading southeast. A compass reading therefore cannot follow a great circle on its own; navigators break the route into short legs with fixed bearings.

GPS receivers do this math continuously. Our page on how GPS works explains where the coordinates come from in the first place.

Where Earth Scientists Use Coordinate Distances

Distance between coordinates shows up across the earth sciences. Seismologists compute how far a station is from an earthquake, which our epicenter distance calculator estimates from seismic wave arrival times. Geologists measure how far plates have traveled, and oceanographers track drifting buoys across thousands of kilometers.

For short distances on a paper map, the map scale calculator is often quicker, and for grid coordinates the UTM converter works in meters directly. To practice reading coordinates, try our latitude and longitude worksheets, and younger learners can start with latitude and longitude for kids. For why Earth's shape matters, read about the shape of the Earth.

Common Misconceptions

Myth: The shortest route between two places at the same latitude follows their parallel.

Science: Only the equator is a great circle. Away from it, the shortest path bows toward the pole, which saves 399 km between points at 60° N and 90° of longitude apart.

Myth: A straight line on a flat map is the shortest route.

Science: Most map projections distort distance. The shortest route on the globe often looks curved on the map, especially on a Mercator projection.

Myth: The haversine formula gives an exact distance on Earth.

Science: It assumes a perfect sphere. Earth's flattening makes real ellipsoid distances differ by up to about 0.5%.

Key Facts

  • The haversine formula gives the great-circle distance, the shortest path between two points on a sphere.
  • Our calculator uses Earth's mean radius, R = 6,371 km.
  • On that sphere, one degree of latitude is 111.2 km (69.1 mi); NOAA gives about 111 km.
  • A degree of longitude shrinks from 111.2 km at the equator to 55.6 km at 60° on the sphere; NOAA gives about 56 km at 60°.
  • Spherical distances differ from WGS 84 ellipsoid distances by up to about 0.5%, by our comparison.
  • One minute of latitude is about 1.853 km, very close to the 1.852 km nautical mile.
  • Between two points at 60° N and 90° of longitude apart, the great circle is 4,604.5 km while the parallel is 5,003.8 km.
  • Except along meridians and the equator, the compass bearing changes continuously along a great-circle route.
Did you know? Flying between two points at 60° N that are a quarter of the way around the world apart, the great-circle route is about 400 km shorter than following the parallel due east.

Frequently Asked Questions

How do you calculate the distance between two latitude and longitude points?

Convert both points to decimal degrees and then to radians. Compute a = sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2), then the central angle c = 2 · atan2(√a, √(1 − a)), and multiply by Earth's radius, 6,371 km. Divide by 1.609344 for miles. This is the haversine formula the calculator uses.

What is the haversine formula used for?

It finds the great-circle distance between two points on a sphere from their latitudes and longitudes. Navigation software, flight-distance estimates, earthquake-location problems and geography classes use it because it is simple and stays accurate even for very short distances.

How accurate is the haversine formula?

Treating Earth as a sphere of radius 6,371 km, it is within about 0.5% of precise ellipsoid distances. In our comparison with a WGS 84 calculation, the gap ranged from 0.05% to 0.56%. That is fine for maps and homework but not for surveying or property boundaries.

What radius of Earth should I use?

The common choice for great-circle distances is the mean radius, 6,371 km (3,959 mi), which this calculator uses. Using the equatorial radius, 6,378.137 km, makes every distance about 0.1% longer. Neither is exact everywhere, because Earth is slightly flattened at the poles.

How many kilometers is one degree of latitude?

About 111 km (69 mi), according to NOAA. On a 6,371 km sphere the haversine formula gives 111.2 km. On the real, slightly flattened Earth a degree of latitude is a little shorter near the equator and a little longer near the poles.

Can I enter coordinates in degrees, minutes and seconds?

Yes. Type them as 40°42'46"N or 40 42 46 N, and the calculator converts them to decimal degrees. In decimal form, use negative numbers for south latitudes and west longitudes. You can mix the two formats between the boxes.

What is the difference between great-circle distance and driving distance?

Great-circle distance is the shortest path over Earth's surface, as the crow flies. Driving or walking distance follows roads and terrain, so it is almost always longer. Flight routes come closest to the great circle but still bend for winds and air traffic rules.

Magma Tribune Editorial Team
Written by our editors and checked against USGS, NOAA, NASA and Smithsonian Global Volcanism Program data. Every number in a table comes from a cited dataset, never from memory. Read our editorial policy. Last updated October 2026.