1. Home
  2. Calculators
  3. Distance Between Coordinates Calculator

Distance Between Coordinates Calculator

For travellers, pilots and developers: the straight-line distance between two places and the direction to go.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Distance Between Coordinates Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table as a CSV file.

Features

  • Haversine and WGS 84 (Vincenty) distance
  • Kilometres, miles and nautical miles
  • Initial and final bearing with the compass point
  • Midpoint of the great circle
  • A destination from a start, bearing and distance

Supported formats

Input

  • Latitude and longitude in decimal, DMS or DMM

You get

  • On-screen results
  • Copyable text

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Distance Between Coordinates Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • The distances are straight-line over the Earth's surface, not road, flight or shipping routes.
  • Vincenty may not converge for nearly opposite points; then the great-circle value is used.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Distance and bearing between two points: haversine, Vincenty and great circles

How far is it from one place to another in a straight line? On a flat map the answer would come from Pythagoras, but the Earth is round, so the shortest path curves over its surface. This calculator measures that path between two latitude and longitude points, tells you the direction to start in, and can also find the midpoint or a point reached by travelling in a given direction.

The great-circle distance

The shortest path between two points on a sphere is an arc of a great circle, the circle you get by cutting the sphere through its centre. The haversine formula gives the length of that arc from the two latitudes and longitudes. It is numerically stable for short distances, which is why programmers prefer it. The tool uses an Earth radius of 6,371.0088 kilometres, the mean radius, and reports the distance in kilometres, miles and nautical miles.

The ellipsoid and Vincenty’s method

The Earth is slightly flattened, wider at the equator than between the poles, so a sphere is only an approximation. Vincenty’s inverse formula works on the WGS 84 ellipsoid, the shape used by GPS, and gives the distance to a fraction of a millimetre. For some pairs of nearly opposite points it fails to converge, and the tool then says so and relies on the great-circle figure. The difference between the two is usually a few tenths of a percent.

Bearings

The initial bearing is the compass direction, in degrees clockwise from north, in which you start out along the great circle. Because the path curves, the direction changes as you go, and the final bearing is the direction you face on arrival. The tool gives both, with the nearest of 16 compass points. A constant-bearing path (a rhumb line) is longer and is not what this tool computes.

Midpoint and destination

The midpoint is the point halfway along the great circle, and it is not the average of the latitudes and longitudes. In the other mode, give a start, a bearing and a distance in kilometres, and the tool finds where you end up. This is useful to find a point 5 km due east of a place or to plot a search area.

Worked examples

Press the first sample: John F. Kennedy Airport in New York to London Heathrow. The haversine distance is 5,540.019 km, which is 3,442.408 miles or 2,991.371 nautical miles. Vincenty’s method gives 5,554.9088 km, 0.269 percent more. You leave on a bearing of 51.353° (north-east) and arrive facing 107.94° (east-south-east), and the midpoint is at 52.216674, −41.302671 over the north Atlantic. The second sample, Sydney to Auckland, is 2,155.901 km by haversine and 2,160.5088 km by Vincenty. The third finds the point 1,000 km from New York on a bearing of 45°: 46.651108, −64.511775.

Entering positions

Both points can be written in any of the usual ways: decimal degrees, degrees and minutes, or with N, S, E and W. The tool shows the destination in decimal degrees and degrees-minutes-seconds. If one of your points is a locator or a grid reference, convert it first with the grid square or MGRS tools.

Limits

The distances are straight lines over the surface, at sea level. They are not road distances or flight routes, which are longer, and they do not account for height. Haversine assumes a sphere, so it can be wrong by up to about half a percent, and Vincenty may not converge for nearly antipodal points.

Checked against the current version of the Distance Between Coordinates Calculator on .

Frequently asked questions

Why does the bearing change along a great-circle route?

A great circle is the shortest path on a sphere, and apart from the equator and the meridians it crosses lines of longitude at changing angles. Flying from New York to London starts on 51° but arrives on 108°, because the route curves over the north Atlantic. The tool gives both the initial and the final bearing for that reason.

Which distance should I use?

Use the ellipsoidal (Vincenty) figure when accuracy matters, because it follows the real shape of the Earth. The haversine distance is within about half a percent and is fine for planning, estimates and software that must be simple. The tool shows both, and falls back to the great-circle figure when Vincenty does not converge.

What is the haversine formula?

A way to find the shortest distance between two points on a sphere from their latitudes and longitudes. It is accurate to about 0.5% for the Earth, which is not quite a sphere.

Why do the two distances differ?

Vincenty uses the flattened WGS 84 ellipsoid, so it is more accurate. The difference is usually a few tenths of a percent.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.