How to calculate the distance between two coordinates
- Type the first place into Point A: either a place name or address (pick it from the suggestions) or its latitude and longitude, for example
40.712776, -74.005974(New York City Hall). - Type the second place into Point B, for example
51.507351, -0.127758(central London), and press Calculate distance. - Or simply click the map twice: the first click sets A, the second B. Drag either marker to fine-tune it.
The result is the shortest distance over the surface of the Earth, also called the great-circle or "as the crow flies" distance. For the example above it is about 5,585 km (3,470.5 miles or 3,015.8 nautical miles). The blue line on the map follows that shortest route, which is why it curves north over the Atlantic instead of running straight across a flat map.
Need the distance by road instead? Once both points are set, the Directions on Google Maps button shows the route between the same two points on a Google map right on this page, and a link inside it opens the route in Google Maps, where you can compare driving, walking or transit. Our guide how to measure distance on Google Maps explains the difference between straight-line and route distance.
Don't know the coordinates of a place? Look them up with the address to lat long tool. If your coordinates are written in degrees, minutes and seconds you can enter them as they are, or convert them first with the DMS to decimal degrees converter.
Vincenty or haversine: which distance is right?
The haversine formula assumes the Earth is a perfect sphere with a mean radius of 6,371 km. It is simple and fast, but the Earth is slightly flattened at the poles, so haversine distances can be off by up to about 0.5 %. For New York to London it gives 5,570 km, about 15 km less than the precise value.
Vincenty's formula works on the WGS84 ellipsoid, the same model of the Earth that GPS uses. It is accurate to well under a millimetre for any normal distance, and it is the result shown on this page.
For two points almost exactly opposite each other on the globe, Vincenty's method cannot settle on an answer. In that rare case the calculator shows the haversine distance and tells you so.
Units
- Kilometres: 1 km = 1,000 m.
- Miles (statute miles): 1 mi = 1,609.344 m.
- Nautical miles, used at sea and in aviation: 1 nmi = 1,852 m, roughly one minute of latitude.
Need the direction too? The bearing calculator gives the compass heading from A to B, and the midpoint calculator finds the point halfway between them.