Latitude Longitude Distance Calculator – Calculate Distance Between Two Points


Latitude Longitude Distance Calculator

Calculate the great-circle distance between two points on Earth.

Point 1



Enter the latitude for the first point (in decimal degrees).



Enter the longitude for the first point (in decimal degrees).

Point 2



Enter the latitude for the second point.



Enter the longitude for the second point.



Enter coordinates to see the distance

What is a Latitude Longitude Distance Calculator?

A latitude longitude distance calculator determines the shortest distance between two points on the surface of the Earth, also known as the “as the crow flies” or great-circle distance. This calculator is an essential tool for anyone in logistics, geography, aviation, or even hobbyists planning a trip. While a flat map might suggest a simple straight line, the Earth’s curvature means the shortest path is an arc. This tool uses a specific mathematical formula to calculate the distance between two latitude longitude points, providing an accurate measurement that accounts for the planet’s spherical shape. It’s far more precise than measuring on a 2D map, especially over long distances.

The Haversine Formula and Explanation

This calculator uses the Haversine formula to compute the distance. The Haversine formula is a re-formulation of the spherical law of cosines and is less susceptible to rounding errors for small distances. It’s a widely accepted method for calculating great-circle distances.

The formula is as follows:

a = sin²(Δφ/2) + cos(φ₁) ⋅ cos(φ₂) ⋅ sin²(Δλ/2)
c = 2 ⋅ atan2(√a, √(1−a))
d = R ⋅ c

Below is a breakdown of the variables used in this calculation.

Variables for the Haversine Formula
Variable Meaning Unit Typical Range
φ₁, λ₁ Latitude and Longitude of Point 1 Radians φ: -π/2 to +π/2, λ: -π to +π
φ₂, λ₂ Latitude and Longitude of Point 2 Radians φ: -π/2 to +π/2, λ: -π to +π
Δφ, Δλ Difference in latitude and longitude Radians
R Radius of Earth Kilometers or Miles ~6,371 km or ~3,959 mi
d The final calculated distance Kilometers or Miles 0 to ~20,000 km

Practical Examples

Understanding how to calculate the distance between two latitude longitude points is easier with real-world examples. Here are a couple of scenarios.

Example 1: New York City to Los Angeles

  • Point 1 (NYC): Latitude = 40.7128, Longitude = -74.0060
  • Point 2 (LA): Latitude = 34.0522, Longitude = -118.2437
  • Unit: Miles

Plugging these values into the calculator gives a result of approximately 2,445 miles.

Example 2: London to Paris

  • Point 1 (London): Latitude = 51.5074, Longitude = -0.1278
  • Point 2 (Paris): Latitude = 48.8566, Longitude = 2.3522
  • Unit: Kilometers

The calculated distance is approximately 344 kilometers. This demonstrates how the calculator can be used for both intercontinental and shorter regional distances. For a related tool, you might be interested in a Haversine formula calculator.

How to Use This Distance Calculator

  1. Enter Point 1 Coordinates: Input the latitude and longitude for your starting location in the first two fields. Use negative values for South latitudes and West longitudes.
  2. Enter Point 2 Coordinates: Do the same for your destination location in the next two fields.
  3. Select Unit: Choose whether you want the result in Kilometers or Miles from the dropdown menu.
  4. Calculate: The result is updated automatically in real-time. The main result is the great-circle distance. The section below it provides a summary of the inputs you provided.
  5. Reset: Click the “Reset” button to clear all fields and start over.

The calculator instantly provides the distance without needing to press a submit button, making it fast and easy to test different coordinates. Many users find this useful for tasks requiring a geodistance calculator.

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, this difference is negligible, but for high-precision scientific calculations, more complex formulas like Vincenty’s might be used.
  • Coordinate Accuracy: The precision of your input coordinates directly impacts the result. A small error in a latitude or longitude degree can lead to a significant difference in the calculated distance.
  • Decimal Precision: Using coordinates with more decimal places (e.g., 40.7128 vs. 40.7) provides a more accurate location and therefore a more precise distance.
  • Unit System: The Earth’s radius is different in kilometers and miles. The calculator automatically uses the correct radius (6371 km or 3959 miles) based on your unit selection.
  • Great-Circle vs. Rhumb Line: This calculator provides the great-circle path (the shortest distance). A rhumb line is a path of constant bearing, which is simpler to navigate but usually longer. Understanding map projections can clarify this difference.
  • Elevation: The calculation is done at sea level. It does not account for differences in altitude between the two points, though this effect is extremely small for almost all applications.

Frequently Asked Questions (FAQ)

Why does this calculator mention the Google API in its name?

While this tool performs the calculation locally in your browser using the Haversine formula, many users search for this functionality in the context of services like the Google Maps Distance Matrix API. This calculator provides the same type of “as the crow flies” distance calculation that is a core feature of many mapping APIs, but as a simple, free web tool without API keys.

Is this the same as driving distance?

No. This is the straight-line geographical distance. Driving distance depends on roads, traffic, and terrain, and is almost always longer. Services like Google Maps are needed to calculate actual driving routes.

How do I enter coordinates for the Southern and Western hemispheres?

Use negative numbers. For example, Sydney, Australia is at approximately -33.8688° latitude (South), and Rio de Janeiro, Brazil is at roughly -43.1729° longitude (West).

What is the most accurate way to get coordinates?

Use a GPS device or a reputable online mapping tool. Right-clicking on a location in Google Maps will show you the latitude and longitude, which you can then use with this map distance tool.

Why is it called the “Haversine” formula?

The name comes from the haversine function, which is `sin²(θ/2)`. The formula was historically important for navigation before the advent of computers because it was less prone to errors over small distances.

What happens if I enter invalid text?

The calculator will show an error message and the result will indicate that the input is invalid. It is designed to only process numerical inputs.

How accurate is the result?

The Haversine formula can have an error of up to 0.5% because it assumes a spherical earth. This is highly accurate for most general purposes, from flight planning to geographical research. For geodesic-level precision, other more complex models are needed.

Can I calculate the distance for more than two points?

This specific tool is designed for two points. For multi-point routing, you would need a more advanced tool, often involving a service like the Google Maps API.

© 2026 GeoCalculators. All rights reserved. For educational and informational purposes only.


Leave a Reply

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