Distance Between Two Coordinates

Enter two points — as coordinates or addresses — to get the straight-line (great-circle) distance.

How the Haversine Formula Works

The Haversine formula calculates the shortest distance between two points on the surface of a sphere (the great-circle distance), making it ideal for measuring distances on Earth. It accounts for the curvature of the Earth rather than drawing a straight line on a flat map.

a = sin²(Δlat/2) + cos(lat₁) × cos(lat₂) × sin²(Δlon/2)
c = 2 × atan2(√a, √(1−a))
d = R × c

Where R is the Earth's radius (approximately 6,371 km), lat and lon are the latitude and longitude of the two points in radians, and d is the distance in kilometers. The formula works by computing the central angle between the two points and multiplying it by the Earth's radius.

Worked Example: London to Paris

Let us calculate the distance between London (51.5074°N, 0.1278°W) and Paris (48.8566°N, 2.3522°E):

1. Convert coordinates: London (51.5074, -0.1278), Paris (48.8566, 2.3522)

2. Calculate the difference: Δlat = -2.6508°, Δlon = 2.4800°

3. Apply the Haversine formula with R = 6,371 km

4. Result: approximately 343.6 km (213.5 mi, 185.5 nmi), initial bearing approximately 148° (SSE)

This is the straight-line (as-the-crow-flies) distance. The actual driving distance between London and Paris is longer, approximately 470 km, because roads follow terrain and route through Calais and the Channel Tunnel.

Units and Conversions

  • 1 kilometer = 0.621371 miles
  • 1 mile = 1.60934 kilometers
  • 1 nautical mile = 1.852 kilometers
  • 1 nautical mile = 1.15078 miles

Limitations

  • Calculates straight-line distance, not driving or walking routes
  • Assumes a spherical Earth; actual distance may vary slightly due to the Earth's ellipsoidal shape
  • Travel times are estimates based on average speeds (60 km/h driving, 5 km/h walking, 15 km/h cycling)
  • Does not account for terrain, traffic, borders, or water crossings

Frequently Asked Questions

How do I find the distance between two GPS coordinates?

Enter both coordinate pairs above and press Calculate. The tool applies the Haversine formula and returns the distance in km, miles and nautical miles, plus the initial bearing.

How accurate is the Haversine formula?

Within about 0.5% of the true distance, because it assumes a spherical Earth. For most navigation and planning that is more than accurate enough.

What is the distance between New York and Los Angeles?

About 3,936 km (2,446 mi) in a straight line between city centres (40.7128, −74.0060 and 34.0522, −118.2437).

What is a bearing?

The compass direction from the first point to the second, measured clockwise from true north (0° = north, 90° = east).