Latitude Longitude Distance Calculator
Find the shortest surface distance between two points on Earth from their latitude and longitude, using the haversine great-circle formula.
🌍 What is Latitude Longitude Distance?
Latitude longitude distance, more formally called great-circle distance, is the shortest path between two points measured across the curved surface of the Earth rather than through it. Because Earth is very nearly a sphere, that shortest path is always an arc of a great circle, the circle formed where a plane through the centre of the Earth cuts the surface. The haversine formula converts two coordinate pairs into the central angle between them, and multiplying that angle by Earth's radius gives the surface distance directly.
This is one of the most widely implemented calculations in software. Ride-hailing and delivery apps use it to rank nearby drivers before ever calling a routing engine, because a great-circle distance costs microseconds while a road-network route costs milliseconds. Airlines use it to publish stage lengths and to estimate fuel burn on a proposed city pair. Amateur radio operators use it to work out the path length and beam heading to a distant station. Ecologists use it to measure animal displacement between GPS collar fixes. Real estate and retail analysts use it to define catchment radii around a store.
The most common mistake is treating great-circle distance as travel distance. It is a pure geometric shortest path, so a road journey between the same points is usually 20 to 40 percent longer, and a walking route inside a city can be far longer again. A second frequent error is applying the plane-geometry Pythagorean formula to raw latitude and longitude values. That fails badly because a degree of longitude shrinks from about 111 km at the equator to zero at the poles, so the longitude difference must be scaled by the cosine of the latitude, which is exactly what the haversine formula does.
This calculator takes two coordinate pairs in decimal degrees and returns the great-circle distance in kilometres, statute miles and nautical miles at once, plus the central angle and the true great-circle midpoint. It also charts the latitude profile of the actual route against a straight line drawn on a flat map, which makes the poleward bow of long-haul routes immediately visible.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 — New York to London
40.7128°N, 74.0060°W to 51.5074°N, 0.1278°W
Example 2 — Delhi to Mumbai
28.6139°N, 77.2090°E to 19.0760°N, 72.8777°E
Example 3 — Sydney to Los Angeles
33.8688°S, 151.2093°E to 34.0522°N, 118.2437°W
❓ Frequently Asked Questions
🔗 Related Calculators
How do I calculate the distance between two latitude and longitude points?
Use the haversine formula. Compute a = sin squared of half the latitude difference, plus cos(lat1) times cos(lat2) times sin squared of half the longitude difference. Then c = 2 * atan2(sqrt(a), sqrt(1-a)) and the distance is R * c, where R is Earth's mean radius of 6371.0088 km.
What is the haversine formula used for?
The haversine formula computes the great-circle distance between two points on a sphere from their latitudes and longitudes. It is the standard method in GPS software, mapping libraries, flight planning and any application that needs an accurate straight-line surface distance without the complexity of a full ellipsoidal geodesic.
What Earth radius should I use for great-circle distance?
This calculator uses the IUGG mean radius of 6371.0088 km. Common alternatives are 6371 km (rounded), 6378.137 km (equatorial) and 6356.752 km (polar). The choice changes the answer by up to about 0.3 percent, which is well within the error already introduced by treating Earth as a sphere.
What is the central angle in the results?
The central angle is the angle subtended at Earth's centre by the two points, expressed in degrees. Multiply it by 60 to get the distance in nautical miles almost exactly, since one nautical mile was defined as one arc-minute along a meridian. New York to London spans 50.0942 degrees.
Why is the great-circle route different from a straight line on a map?
Flat maps distort the sphere. On the common Mercator projection a straight line is a rhumb line of constant bearing, which is longer than the great circle. The true shortest path bows toward the nearer pole, which is why the chart on this page shows the route reaching a higher latitude than a straight map line would.
How accurate is the haversine distance compared with real distance?
Against a WGS-84 geodesic the spherical haversine result is typically within about 0.3 percent, or roughly 15 km on a 5000 km route. That is fine for planning, sorting nearby locations and radio path estimates, but not for surveying or precise geodetic work.
Can I use this to find driving distance?
No. This returns the shortest surface distance in a straight line over the globe. Real driving distance follows roads and is usually 20 to 40 percent longer, more in mountainous terrain or where a river or coastline forces a detour.
How do I convert degrees, minutes and seconds to decimal degrees?
Decimal degrees = degrees + minutes/60 + seconds/3600. So 51 degrees 30 minutes 26 seconds becomes 51 + 30/60 + 26/3600 = 51.5072. Make the whole result negative if the coordinate is south of the equator or west of the prime meridian.
What is the maximum possible great-circle distance on Earth?
Half of Earth's circumference, about 20,015 km or 12,437 miles, which occurs between a point and its exact antipode. Any pair of points farther apart than that in one direction is closer going the other way around, which is why the central angle never exceeds 180 degrees.
Why does the calculator show three different distance units?
Different fields use different units. Kilometres are standard in science and most of the world, statute miles in the United States and United Kingdom for land distance, and nautical miles in aviation and marine navigation because they map directly onto arc-minutes of latitude.
Does the order of the two points matter?
No. Great-circle distance is symmetric, so swapping point 1 and point 2 gives exactly the same answer. Bearing is different: the azimuth from A to B is generally not the reverse of the azimuth from B to A.
What is the great-circle midpoint shown in the working?
It is the coordinate halfway along the great-circle arc, not the simple average of the two latitudes and longitudes. For New York to London the true midpoint is 52.3684 degrees north, 41.2903 degrees west, noticeably farther north than the naive average of 46.1101 degrees would suggest.