Skip to content
Other

Latitude and Longitude Distance Calculator

Enter the latitude and longitude of two points and this calculator instantly computes the great-circle distance (the shortest path across Earth's surface) in kilometers, statute miles, and nautical miles. You also get the initial compass bearing from Point A to Point B, the midpoint coordinates, and a full haversine working. Coordinates are accepted as signed decimal degrees (e.g. -73.935 for 73.935 W) or in degrees, minutes, and seconds (DMS) format.

Your details

Choose how you want to enter your coordinates.
Latitude of the first point. Positive = North, negative = South. Range -90 to 90.
°
Longitude of the first point. Positive = East, negative = West. Range -180 to 180.
°
Latitude of the second point.
°
Longitude of the second point.
°
Distance (km)
1,275.572km

Great-circle distance in kilometers

Distance (miles)792.604mi
Distance (nautical miles)688.754nmi
Bearing (A to B)77.3°
Compass directionENE (77.3°)
Midpoint latitude49.795137°
Midpoint longitude11.039305°
Midpoint (DMS)49°47'42.5"N, 11°2'21.5"E
Kilometers1,275.572
Miles792.604
Nautical miles688.754
01.63.1906381276
Distance (km)

The two points are 1275.6 km (792.6 mi) apart - a continental crossing.

  • Great-circle distance: 1275.572 km / 792.604 mi / 688.754 nautical miles.
  • Initial bearing from A to B is ENE (77.3°), measured clockwise from true north.
  • This is the shortest possible surface path, typically a 4-10 hour flight.
  • Actual travel distance by road, rail, or air will be longer due to routing constraints.

Next stepFor driving or walking distance, use a mapping service (Google Maps, OpenStreetMap) with the coordinates. For aviation, add 3-5% to the great-circle distance for typical route inefficiency.

Formula

d=2Rarcsin ⁣(sin2 ⁣(Δϕ2)+cosϕ1cosϕ2sin2 ⁣(Δλ2))d = 2R \cdot \arcsin\!\left(\sqrt{\sin^2\!\left(\tfrac{\Delta\phi}{2}\right) + \cos\phi_1\cos\phi_2\sin^2\!\left(\tfrac{\Delta\lambda}{2}\right)}\right)

Worked example

Paris (48.8566° N, 2.3522° E) to Krakow (50.0647° N, 19.9450° E): Delta-lat = 1.2081° = 0.02109 rad, Delta-lon = 17.5928° = 0.30706 rad. a = sin²(0.01054) + cos(0.85297) x cos(0.87404) x sin²(0.15353) = 0.00011 + 0.64934 x 0.02357 = 0.01542. c = 2 x arcsin(sqrt(0.01542)) = 0.24941 rad. d = 6371 x 0.24941 = 1588.7 km = 987.2 mi = 858.0 nmi.

What is great-circle distance?

Great-circle distance is the shortest path between two points on the surface of a sphere. Because the Earth is approximately spherical, this path (also called an orthodrome) is the most direct route any aircraft, ship, or satellite could travel. It differs from the straight-line (Euclidean) distance you would measure if you bored a tunnel through the planet: the great-circle route follows the curve of the surface. For short distances of a few kilometres the two values are nearly identical, but for intercontinental routes the great-circle distance can be significantly shorter than the apparent map distance, especially at high latitudes where Mercator-projected maps visually distort scale.

The haversine formula explained

This calculator uses the haversine formula, which is specifically designed to avoid numerical instability for very short distances - a limitation of the simpler spherical law of cosines. The formula takes the latitude and longitude of two points, converts them to radians, calculates intermediate values based on the sine and cosine of half the angular differences, and then derives the central angle between the points. Multiplying that angle by Earth's mean radius (6,371.0088 km as standardised by the International Union of Geodesy and Geophysics) gives the surface distance. The result is accurate to within about 0.3% anywhere on Earth, which for most practical purposes is entirely adequate. For geodetic-survey precision (sub-metre accuracy over long baselines), the Vincenty formulae using an ellipsoidal Earth model are preferred.

How to read latitude and longitude

Latitude measures north-south position from 0° at the equator to 90° at either pole. It is positive in the northern hemisphere and negative in the southern hemisphere. Longitude measures east-west position from 0° at the prime meridian (Greenwich, UK) to 180° at the International Date Line. It is positive east of Greenwich and negative west. GPS devices and mapping apps express coordinates as signed decimal degrees (e.g. 40.7128, -74.0060 for New York City) or in degrees-minutes-seconds format (40°42'46"N 74°0'22"W). Both formats are accepted by this calculator.

Bearing and midpoint

The bearing output shows the initial compass direction you would face at Point A to head directly toward Point B along the great-circle path. It is expressed as degrees clockwise from true north (0° = north, 90° = east, 180° = south, 270° = west). Note that on a great-circle route your bearing continuously changes as you travel - this is the initial bearing only. The midpoint is the geographic centre of the great-circle arc, meaning the point halfway along the surface path. It is calculated spherically and will generally not coincide with the simple average of the two sets of coordinates, especially over long distances at high latitudes.

Famous great-circle distances for reference

Routekmmilesnmi
New York to London5 5703 4613 008
London to Paris344214186
Los Angeles to Tokyo8 8155 4784 760
Sydney to Cape Town11 0206 8495 951
Equator to a pole (90° latitude)10 0086 2205 404
Full equatorial circumference40 07524 90121 638
One degree of latitude1116960
One nautical mile (exact)1.8521.1511.000

All distances are great-circle (as-the-crow-flies) values using the WGS-84 spherical Earth model.

Frequently asked questions

Why is this different from the distance I see on Google Maps?

Google Maps shows driving or walking distance along roads and paths, which must follow the actual road network. This calculator shows the great-circle distance - the absolute shortest path across Earth's surface as if you could fly in a perfectly straight line. Great-circle distance is always shorter than or equal to any real-world travel route. For a trip from London to Edinburgh, for example, the great-circle distance is about 534 km but driving may be 650 km or more depending on the route.

What coordinate format does the calculator accept?

You can switch between decimal degrees (e.g. 48.8566, 2.3522) and degrees-minutes-seconds format (e.g. 48°51'23.8"N, 2°21'8"E). In decimal degrees, southern latitudes and western longitudes are entered as negative numbers. In DMS mode, use the N/S and E/W direction suffixes. GPS receivers, Google Maps, and most mapping apps can provide coordinates in either format.

What is a nautical mile and why is it different from a statute mile?

A nautical mile was originally defined as one minute of arc along a meridian (1/60 of a degree of latitude), which makes it a natural unit for navigation at sea and in the air. One nautical mile equals exactly 1.852 km or about 1.1508 statute miles. Statute miles (the everyday "mile" in the US and UK) are 1.60934 km. Mariners and aviators prefer nautical miles because the relationship to degrees of latitude simplifies chart work and position reporting.

How accurate is the haversine formula?

The haversine formula assumes Earth is a perfect sphere. In reality the planet is an oblate spheroid (slightly flattened at the poles), so results are accurate to within roughly 0.3% - about 3 km per 1,000 km of distance. For almost all practical uses (planning trips, estimating flight times, comparing locations) this is more than sufficient. Geodetic survey work requiring sub-metre accuracy should use Vincenty's formulae with a WGS-84 ellipsoid model.

What is the meaning of the initial bearing?

The bearing tells you the compass direction you would face at Point A if you set off toward Point B along the shortest possible surface path. It is measured clockwise from true north, so 0° is north, 90° is east, 180° is south, and 270° is west. On a great-circle route this heading changes continuously as you travel, so the bearing shown is the direction at the start of your journey, not the average direction throughout.

Can I calculate distance from an address instead of coordinates?

This tool requires latitude and longitude coordinates. To convert an address to coordinates (geocoding), paste the address into Google Maps, right-click the pin that appears, and copy the coordinates shown at the top of the context menu. You can then paste them here in decimal degrees format.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…