Skip to main content
Calcimator

Distance Calculator

Calculate the great-circle distance between two coordinates using the Haversine formula. Get distance in miles, kilometers, and nautical miles.

This calculator finds the great-circle distance between two latitude/longitude coordinates using the Haversine formula, then reports the same distance in miles, kilometers, and nautical miles (Distance (Kilometers) is Distance (Miles) times 1.60934, and Distance (Nautical) is Distance (Miles) times 0.868976, so all three always move together in lockstep). Among the four coordinate inputs, Longitude 2 has the single biggest effect on every distance figure for the default New York-to-Los Angeles route: because the two cities sit close in latitude but far apart in longitude, a given percentage shift in Longitude 2 moves the calculated distance noticeably more than the same percentage shift in Latitude 1 or Latitude 2, which only nudge the result. Longitude 1 has a smaller, secondary effect. Initial Bearing is a separate calculation -- the compass heading you'd start flying on to follow the great-circle path -- and responds to all four coordinates in a more evenly balanced way than the distance figures do, since it depends on the relative angle between the two points rather than the raw gap between them. This tool assumes a spherical Earth of fixed radius (3,958.8 miles); it does not account for the WGS84 ellipsoid's actual flattening, so results can be off by a fraction of a percent versus a true geodesic calculation, and it reports straight-line great-circle distance, not actual driving or flight-routing distance.

Inputs

Results

Distance (Miles)

2,445.59 mi

≈ 93 marathons

Distance (Kilometers)3,935.78 km
Distance (Nautical)2,125.16 nmi
Initial Bearing273.69°
How to Use This Calculator
  1. Enter the Latitude and Longitude of the first location (e.g., New York: 40.7128, -74.0060).
  2. Enter the Latitude and Longitude of the second location (e.g., Los Angeles: 34.0522, -118.2437).
  3. Review the Distance in Miles, Kilometers, and Nautical Miles using the great-circle (Haversine) formula.
  4. Use the Initial Bearing in degrees for navigation or trip planning purposes.

How the result changes with Longitude 2

Longitude 2Distance (Miles)
-1443,768.6 mi
-541,187.4 mi
546,303.43 mi
1446,733 mi

What each input means

Latitude 1
e.g., New York: 40.7128
Longitude 1
e.g., New York: -74.0060
Latitude 2
e.g., Los Angeles: 34.0522
Longitude 2
e.g., Los Angeles: -118.2437

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Latitude 1 = 40.7128, Longitude 1 = -74.006, Latitude 2 = 34.0522, Longitude 2 = -118.2437 = 4 input(s) provided
  2. Calculate Distance
    Distance
    2445.59 = 2445.59
  3. Calculate Distance
    Distance
    3935.78 = 3935.78
  4. Calculate Distance
    Distance
    2125.16 = 2125.16

Engine last updated .

Frequently Asked Questions

Why does Longitude 2 have the biggest effect on the distance results?

For the default New York-to-Los Angeles coordinates, the two cities are close in latitude (about 6.7 degrees apart) but far apart in longitude (about 44 degrees), so the east-west coordinate -- Longitude 2 -- moves the Haversine calculation's result more than a similar-sized change to either latitude input. This is specific to the current coordinates, not a fixed rule of the formula itself.

Why do the three distance outputs always change together?

Distance (Kilometers) and Distance (Nautical) aren't separately calculated -- they're Distance (Miles) multiplied by fixed conversion factors (1.60934 for kilometers, 0.868976 for nautical miles). Whatever moves Distance (Miles) moves the other two by that exact same proportion, every time.

What does Initial Bearing actually measure?

Initial Bearing is the compass direction, in degrees from true north, you'd need to start heading in at point 1 to follow the great-circle (shortest-path) route toward point 2. It's calculated from the same four coordinates as distance but with a different formula, so it doesn't move in the same proportions as the distance figures do.

How accurate is this calculator's distance figure?

It uses the Haversine formula on a sphere of fixed radius (3,958.8 miles), which is close to but not identical to a true geodesic calculation on the WGS84 ellipsoid Earth actually is. It also reports the straight-line great-circle distance, not the longer real-world driving or flight-routing distance between the two points.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Travel & Tourism.