BYTETOOLS

Distance Calculator

Calculate the straight-line distance and bearing between two points on a map by latitude/longitude using the Haversine formula — km, miles and nautical miles.

Point 1

Point 2

5,570.2
Kilometers
3,461.2
Miles
3,007.7
Nautical miles
51.2°
Bearing (NE)

Summary

5,570.2 km / 3,461.2 mi / 3,007.7 NM, initial bearing 51.2° (NE)

What is the Distance Calculator?

This distance calculator computes the great-circle (as-the-crow-flies) distance between any two points on Earth using the Haversine formula, and reports it simultaneously in kilometres, statute miles and nautical miles.

  • Haversine great-circle distance in km, miles and nautical miles
  • Initial bearing in degrees plus 16-point compass direction
  • Accepts decimal degrees and DMS input like 51°28'40"N
  • Live results — no submit button needed
  • 100% client-side, coordinates never uploaded
  • Free and unlimited, works offline as a PWA

How to use the Distance Calculator

  1. 1

    Enter the latitude and longitude of the first point (decimal degrees or DMS both work).

  2. 2

    Enter the latitude and longitude of the second point.

  3. 3

    Read the great-circle distance in kilometres, miles and nautical miles.

  4. 4

    Note the initial bearing in degrees and its compass direction, then copy any value you need.

About the Distance Calculator

This distance calculator computes the great-circle (as-the-crow-flies) distance between any two points on Earth using the Haversine formula, and reports it simultaneously in kilometres, statute miles and nautical miles. It also gives the initial compass bearing from the first point to the second, both in degrees and as a 16-point compass direction.

It is useful for pilots and sailors planning legs, runners and cyclists estimating straight-line distances, logistics teams sanity-checking route lengths, and developers verifying the output of their own Haversine implementations. Coordinates can be pasted in decimal degrees or DMS — the flexible parser accepts formats like 40°26'46"N.

All math runs locally in your browser; no coordinates are sent to any server. That makes it safe for confidential site pairs, and it keeps the tool instant — results update as soon as both points are valid.

Frequently asked questions

How do I measure the distance between two points on a map?

Get the latitude and longitude of each point — in Google Maps you can right-click a spot to copy them — then paste both into this calculator. It returns the straight-line, as-the-crow-flies distance in kilometers, miles and nautical miles, plus the initial bearing between them.

How accurate is the Haversine formula?

Haversine assumes the Earth is a perfect sphere, so it is typically within 0.3% of the true distance — about 3 km error over a 1,000 km leg. That is fine for planning, aviation estimates and app development. Surveying-grade work should use Vincenty or Karney formulas on the WGS-84 ellipsoid instead.

What is the difference between Haversine and Vincenty?

Haversine treats the Earth as a sphere and gives a fast, closed-form answer accurate to roughly 0.3%. Vincenty iterates on the WGS-84 ellipsoid and is accurate to about 0.5 mm, but it is slower and can fail to converge for nearly antipodal points. For most practical distance checks Haversine is the sensible choice.

What is an initial bearing?

It is the compass direction you would face at the start point to head toward the destination along the great circle. Because great circles curve relative to lines of longitude, the bearing changes as you travel — the initial bearing is only correct at the departure point.

Why do flights between the US and Europe fly over Greenland?

Because the shortest path between two points on a sphere is a great circle, which on a flat map looks curved toward the pole. New York to London passes near Newfoundland and south of Greenland — exactly the path this calculator measures.

How long is a nautical mile compared to a mile?

One nautical mile is 1,852 metres, defined as one minute of latitude, versus 1,609.344 metres for a statute mile. That is why aviation and shipping use nautical miles — they map directly onto coordinates. This tool shows all three units side by side.

Guides for Distance Calculator

Related tools