Distance Between Coordinates

Measure the great-circle distance, bearing and midpoint between two latitude/longitude points, right in your browser.

The two coordinates you enter are used to compute distance, bearing and midpoint entirely in your browser and are never uploaded; only OpenStreetMap tiles are fetched to render the map.

Want to plot a single point? Open the Coordinate Map Viewer.

About Distance Between Coordinates

This calculator measures the great-circle distance between two latitude/longitude points using the haversine formula, and shows it at once in kilometres, miles and nautical miles. Enter each point as separate lat and lng fields or paste a "lat, lng" pair, and you also get the initial bearing from A to B (0–360°) with a 16-point compass heading such as SSE, plus the midpoint of the route. A map draws pins at both points and a line between them, auto-fitted so the whole route is visible, and one-click links open the route in Google Maps or OpenStreetMap. It is handy for pilots, sailors, surveyors, logistics planners and anyone comparing GPS positions. The coordinates you enter stay on your device; only OpenStreetMap map tiles are loaded to draw the map.

Features

How to use the Distance Between Coordinates

  1. Enter latitude and longitude for point A, or paste a "lat, lng" pair.
  2. Do the same for point B — or load the London → Paris example to try it.
  3. Read the distance in km, miles and nautical miles, plus the bearing and midpoint.
  4. Check the map, then open the route in Google Maps or OpenStreetMap if you need directions.
  5. Copy any value you need with the button beside it.

Example

Input

A: 51.5074, -0.1278
B: 48.8566, 2.3522

Output

Distance: 343.6 km · 213.5 mi · 185.5 nmi
Bearing A→B: 148.2° (SSE)
Midpoint: 50.1962, 1.0872

London to Paris: about 344 km on a south-south-east heading.

Common errors & troubleshooting

Frequently asked questions

How is the distance between two coordinates calculated here?
It uses the haversine formula on the WGS84 mean Earth radius (6371 km) to compute the great-circle distance — the shortest path over the surface of a spherical Earth. That is accurate to a few metres over typical distances and is the standard method for lat/long point-to-point distance.
What is the difference between distance in kilometres, miles and nautical miles?
They measure the same great-circle length in different units. One mile is 1.609344 km and one nautical mile is exactly 1.852 km, so the nautical-mile figure is smaller. Aviation and marine navigation use nautical miles because one nautical mile is close to one minute of latitude.
What does the bearing from A to B mean?
It is the initial bearing, or forward azimuth: the compass direction you would set off in from point A to travel the great-circle path to point B, measured in degrees clockwise from true north (0–360°). On a long route the bearing changes along the way, so this is the heading at the start.
How is the midpoint between two coordinates found?
The midpoint is the point halfway along the great-circle path between A and B, not the simple average of the two lat/long pairs. Averaging works only for nearby points; over long distances the spherical midpoint can differ noticeably, so this tool computes the true great-circle midpoint.
Does this give driving distance or straight-line distance?
It gives the straight-line great-circle ("as the crow flies") distance over the Earth's surface. For road or walking distance, follow the Directions in Google Maps or View route on OpenStreetMap link, which routes along real streets.
Are the coordinates I enter sent anywhere?
No. The distance, bearing and midpoint are all computed in your browser, so the coordinates you type stay on your device. Only the OpenStreetMap map tiles are loaded over the network to draw the map.

Related tools

All ArrayKit tools