Distance Calculator: Calculate Distance Between Two Cities Using Latitude Longitude


Distance Calculator: Latitude & Longitude

Enter the latitude and longitude for two points to calculate the great-circle distance between them. This tool helps you accurately calculate distance between two cities using latitude longitude coordinates.



Enter a value between -90 and 90.

Invalid latitude.



Enter a value between -180 and 180.

Invalid longitude.



Enter a value between -90 and 90.

Invalid latitude.



Enter a value between -180 and 180.

Invalid longitude.



Calculation Results

Great-Circle Distance

0.00

Formula Variable ‘a’

0.00

Central Angle ‘c’ (rad)

0.00

Earth Radius Used

0.00

What does it mean to calculate distance between two cities using latitude longitude?

To calculate distance between two cities using latitude longitude is to determine the shortest path between them along the surface of the Earth, assuming the Earth is a perfect sphere. This path is known as the “great-circle distance.” It’s the same route a plane would ideally fly to save fuel. Unlike driving distance, which follows roads, the great-circle distance cuts across oceans and landmasses in a straight line on the globe’s curved surface. This calculation is fundamental in aviation, maritime navigation, and geodesy.

A common misunderstanding is that this distance will match what a service like Google Maps provides for driving directions. Driving directions account for roads, turns, and traffic, resulting in a longer distance. Our calculator provides the direct, “as the crow flies” distance, which is always shorter than the road distance.

The Haversine Formula for Distance Calculation

The core of this calculator is the Haversine formula, a reliable method to compute the great-circle distance. It’s particularly well-suited for this task because it avoids significant errors when points are close to each other or antipodal (on opposite sides of the planet). The formula is as follows:

a = sin²(Δφ/2) + cos φ₁ ⋅ cos φ₂ ⋅ sin²(Δλ/2)

c = 2 ⋅ atan2(√a, √(1−a))

d = R ⋅ c

In this formula, ‘d’ is the final distance you want to calculate. It’s found by multiplying the Earth’s radius (‘R’) by the central angle (‘c’) between the two points. For more details on the inputs, see our guide on the basics of map projections.

Formula Variables
Variable Meaning Unit Typical Range
φ₁, φ₂ Latitude of point 1 and point 2 Degrees (converted to Radians for calculation) -90° to +90°
λ₁, λ₂ Longitude of point 1 and point 2 Degrees (converted to Radians for calculation) -180° to +180°
Δφ, Δλ Difference in latitude and longitude Radians -π to +π
R Earth’s mean radius km, mi, or nm ~6371 km or ~3959 mi
d The final great-circle distance km, mi, or nm 0 to ~20,000 km

Practical Examples

Example 1: New York City to London

Let’s calculate the distance between two major cities.

  • Inputs:
    • Point 1 (NYC): Latitude ≈ 40.71°, Longitude ≈ -74.00°
    • Point 2 (London): Latitude ≈ 51.51°, Longitude ≈ -0.13°
    • Unit: Kilometers
  • Results:
    • Distance: Approximately 5,570 km
    • This is the direct flight path, not the road distance. To convert coordinates, you can use a Coordinate Converter.

Example 2: Sydney to Los Angeles

Now let’s calculate a trans-pacific distance.

  • Inputs:
    • Point 1 (Sydney): Latitude ≈ -33.87°, Longitude ≈ 151.21°
    • Point 2 (Los Angeles): Latitude ≈ 34.05°, Longitude ≈ -118.24°
    • Unit: Miles
  • Results:
    • Distance: Approximately 7,500 miles

How to Use This Latitude Longitude Distance Calculator

  1. Enter Point 1 Coordinates: Input the latitude and longitude for your starting location in the first two fields. Positive values for North/East, negative for South/West.
  2. Enter Point 2 Coordinates: Do the same for your destination location in the next two fields.
  3. Select Your Unit: Choose whether you want the final result in Kilometers (km), Miles (mi), or Nautical Miles (nm) from the dropdown menu. This is a crucial step when you calculate distance between two cities using latitude longitude for a specific purpose like aviation or maritime travel.
  4. Calculate: Click the “Calculate Distance” button. The tool will instantly show the great-circle distance.
  5. Interpret the Results: The main result is displayed prominently. You can also see intermediate values from the Haversine formula and a table/chart comparing the distance in all available units. You can then use our Bearing Calculator to find the direction.

Key Factors That Affect Distance Calculation

  • Earth’s Shape: The Haversine formula assumes a perfectly spherical Earth. In reality, the Earth is an “oblate spheroid” (slightly flattened at the poles). For most purposes, the spherical model is highly accurate, but for high-precision geodesy, more complex formulas like Vincenty’s are used.
  • Coordinate Accuracy: The precision of your result is directly tied to the precision of the input coordinates. A small error in a latitude or longitude value can lead to a noticeable difference in the calculated distance, especially over long paths.
  • Unit of Measurement: The numerical result depends entirely on the chosen unit (km, mi, nm), as each corresponds to a different value for the Earth’s radius.
  • Elevation: This calculator measures distance along the sea-level surface. It does not account for differences in altitude between the start and end points. For a comprehensive analysis, you might also consult an Elevation Finder.
  • Calculation Model: Different formulas (Haversine vs. Vincenty) will produce slightly different results due to their underlying assumptions about the Earth’s geometry.
  • Path Type: This tool calculates the great-circle path. This is different from a rhumb line (a line of constant bearing), which appears straight on a Mercator map projection but is a longer path on a globe.

Frequently Asked Questions (FAQ)

1. Why is this distance shorter than what Google Maps shows?
This calculator provides the great-circle (“as the crow flies”) distance. Google Maps calculates driving or walking distance based on actual roads and pathways, which is almost always longer.
2. What is a “great-circle” distance?
It is the shortest possible distance between two points on the surface of a sphere. It’s the path you would follow if you tunneled through the Earth’s surface in a straight line on a 2D map projection.
3. Which unit should I use?
It depends on your field. Kilometers are standard for scientific and most international use. Miles are common in the US and UK. Nautical miles are used exclusively in aviation and maritime contexts.
4. How accurate is the Haversine formula?
For a spherical model of the Earth, it’s mathematically exact. However, because the Earth is not a perfect sphere, there can be a small error (up to 0.5%) compared to more complex models.
5. Can I use decimal degrees for input?
Yes, this calculator is designed for decimal degrees (e.g., 40.7128), not Degrees/Minutes/Seconds (DMS). Use our Coordinate Converter if your data is in DMS format.
6. What do negative latitude and longitude mean?
Negative latitude values represent the Southern Hemisphere. Negative longitude values represent the Western Hemisphere.
7. What’s the maximum possible distance this calculator can show?
The maximum distance is approximately half the Earth’s circumference, about 20,000 km or 12,450 miles, which is the distance to an antipodal point (the direct opposite side of the Earth).
8. Does this tool work for any two points on Earth?
Yes, you can calculate distance between two cities using latitude longitude, or between any two points, as long as you provide valid coordinates.

Related Tools and Internal Resources

Enhance your geographic calculations with these related tools and guides:

© 2026 GeoCalculators Inc. All rights reserved.



Leave a Reply

Your email address will not be published. Required fields are marked *