Distance Between Cities Calculator

Calculate the straight-line distance between two cities using latitude and longitude coordinates with the Haversine formula.

Origin City

°
°

Destination City

°
°
Distance (miles)
2,445.6 mi
Distance (km)
3,935.7 km
Distance (nautical)
2,125.1 NM
Planning notes, formulas, and examples

About the Distance Between Cities Calculator

City-to-city distance can mean different things depending on whether you care about roads or about direct geographic separation. This calculator focuses on the straight-line distance between two city coordinates, which is useful when you want the shortest possible separation rather than a routed driving total.

It uses latitude and longitude to estimate the great-circle distance in miles, kilometers, and nautical miles. That makes it helpful for aviation-style distance references, broad logistics comparisons, and quick geographic checks between origin and destination points.

Use it when you want a direct-distance answer without the noise of route choice, traffic, or road network shape.

When This Page Helps

A straight-line city distance is useful because it gives one stable reference regardless of route changes. It helps with broad comparisons, air-distance estimates, and understanding how indirect a road journey really is.

How to Use the Inputs

  1. Enter the latitude of the origin city (positive for North, negative for South).
  2. Enter the longitude of the origin city (positive for East, negative for West).
  3. Enter the latitude of the destination city.
  4. Enter the longitude of the destination city.
  5. Review the distance in miles, kilometers, and nautical miles.
Formula used
a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlon/2) c = 2 × atan2(√a, √(1−a)) d = R × c Where R = 6,371 km (Earth's mean radius)

Example Calculation

Result: 2,451 miles (3,944 km)

New York City (40.71°N, 74.01°W) to Los Angeles (34.05°N, 118.24°W) is approximately 2,451 miles or 3,944 kilometers via the great-circle route. Actual flight distance is slightly longer due to air traffic routing.

Tips & Best Practices

  • Use Google Maps to find coordinates: right-click any location and the coordinates appear.
  • Latitude ranges from −90° (South Pole) to +90° (North Pole). Longitude ranges from −180° to +180°.
  • North American cities have positive latitudes and negative longitudes.
  • European cities have positive latitudes and positive longitudes.
  • For driving distance, add 20–40% to the straight-line distance as a rough approximation.
  • The calculator assumes a spherical Earth. For high-precision surveying, use ellipsoidal models (Vincenty formula).

How the Haversine Formula Works

The Haversine formula treats Earth as a sphere with radius 6,371 km. It converts latitude and longitude differences into a central angle, then multiplies by the radius to get arc length. The formula handles the math of computing distances on a curved surface rather than a flat plane.

Practical Applications

Pilots and dispatchers use great-circle distances for flight planning and fuel estimation. Shipping companies use them for rate calculation. Astronomers use the same principle to measure angular distances between stars.

Coordinate Systems

Latitude measures north/south from the equator (0° to ±90°). Longitude measures east/west from the Prime Meridian (0° to ±180°). Together they uniquely identify any point on Earth's surface.

Limitations

The Haversine formula assumes a perfect sphere. Earth is actually an oblate spheroid, slightly flattened at the poles. For distances over 1,000 km, the Vincenty formula provides sub-meter accuracy but is more complex to compute.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The Haversine formula calculates the great-circle distance between two points on a sphere given their latitudes and longitudes. It accounts for Earth's curvature and is accurate for most practical purposes.