Great Circle Distance Calculator using Haversine Formula


Great Circle Distance Calculator

Using the Haversine Formula to find the shortest distance between two points on Earth.



In decimal degrees (-90 to 90)


In decimal degrees (-180 to 180)


In decimal degrees (-90 to 90)


In decimal degrees (-180 to 180)




Great Circle Distance

Comparison of calculated distance to Earth’s radius.

What is the Haversine Formula?

The great circle distance is the shortest distance between two points on the surface of a sphere. When we talk about finding distances on Earth, we are approximating our planet as a perfect sphere. The Haversine formula is a special equation used in navigation to calculate these great circle distances between two points given their latitudes and longitudes. It is widely used because it remains accurate even for small distances, unlike other formulas that can suffer from rounding errors. This calculator uses the haversine formula to give you a precise distance measurement.

The Haversine Formula Explained

The formula might look complex, but it’s based on spherical trigonometry. It’s essentially a way to translate spherical coordinates (latitude/longitude) into a straight-line distance. The name “haversine” comes from the haversine function, `hav(θ) = sin²(θ/2)`. The core formula is:

a = sin²(Δφ/2) + cos(φ1) * cos(φ2) * sin²(Δλ/2)

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

d = R * c

This distance calculator makes understanding and using the haversine formula simple.

Haversine Formula Variables
Variable Meaning Unit Typical Range
φ1, φ2 Latitude of point 1 and point 2 Radians -π/2 to +π/2
λ1, λ2 Longitude of point 1 and point 2 Radians -π to +π
Δφ, Δλ Difference in latitude and longitude Radians -π to +π
R Radius of Earth km / miles ~6,371 km or ~3,959 miles
d The final great circle distance km / miles 0 to ~20,000 km

Practical Examples

Example 1: New York to London

  • Input (Point 1 – NYC): Latitude: 40.7128°, Longitude: -74.0060°
  • Input (Point 2 – London): Latitude: 51.5074°, Longitude: -0.1278°
  • Units: Kilometers
  • Result: Approximately 5,570 km. This is the shortest path a plane would ideally fly.

Example 2: Sydney to Los Angeles

  • Input (Point 1 – Sydney): Latitude: -33.8688°, Longitude: 151.2093°
  • Input (Point 2 – LA): Latitude: 34.0522°, Longitude: -118.2437°
  • Units: Miles
  • Result: Approximately 7,500 miles. Changing the units to kilometers would show a result of about 12,070 km.

Explore more routes with our GIS mapping tools.

How to Use This Great Circle Distance Calculator

  1. Enter Coordinates for Point 1: Type the latitude and longitude for your starting location in the first two fields. Use negative values for South latitudes and West longitudes.
  2. Enter Coordinates for Point 2: Do the same for your destination in the next two fields.
  3. Select Units: Choose your desired unit of measurement (kilometers, miles, or nautical miles) from the dropdown menu.
  4. Calculate: Click the “Calculate” button. The result will instantly appear below, showing the great circle distance. The calculation breakdown and chart will also update.

Key Factors That Affect Great Circle Distance

  • Earth’s Shape: The haversine formula assumes a perfectly spherical Earth. In reality, it’s an oblate spheroid (slightly flattened at the poles), which can lead to a small error of up to 0.5%.
  • Earth’s Radius (R): The calculation depends directly on the value used for Earth’s radius. This calculator uses a mean radius of 6,371 km. Using a different radius will change the final distance.
  • Coordinate Precision: The more decimal places you use for your latitude and longitude inputs, the more accurate the distance calculation will be.
  • Route Obstacles: The great circle distance is an “as the crow flies” measurement. It does not account for terrain, buildings, or political borders. For road travel, see our driving distance API.
  • Altitude: The formula calculates distance on the surface. It does not account for differences in elevation between the two points.
  • Choice of Formula: While the haversine formula is excellent for all distances, the Vincenty formula is more accurate for an ellipsoidal Earth, though it’s much more complex to compute.

Frequently Asked Questions (FAQ)

1. Why is it called “great circle” distance?

A great circle is the largest possible circle that can be drawn on a sphere; its center is always the center of the sphere. The shortest path between any two points on a sphere lies along the arc of a great circle.

2. How accurate is the haversine formula?

It’s very accurate for a spherical model. However, since the Earth is slightly ellipsoidal, there can be an error of up to 0.5% compared to the true distance. For most applications, this is perfectly acceptable.

3. What is the difference between great circle distance and rhumb line?

A great circle path has a constantly changing bearing, while a rhumb line is a path of constant bearing. A rhumb line is easier to navigate but is usually longer than a great circle route (except for travel along the equator or a meridian). For more on this, check our navigation algorithms guide.

4. Can I use this for flight planning?

While pilots use great circle routes as a basis for flight paths, this calculator should not be used for actual navigation. Official aviation tools account for weather, air traffic control, and restricted airspace.

5. What do negative latitude and longitude mean?

Latitude south of the equator is negative. Longitude west of the Prime Meridian (which runs through Greenwich, London) is negative.

6. What are the units for the intermediate calculations?

The intermediate values (like ‘a’ and ‘c’) are unitless ratios and angles in radians derived from the trigonometric functions. The final distance gets its units from the Earth’s radius (R).

7. Why is my calculated distance different from Google Maps?

Google Maps often provides driving, walking, or transit distances, which follow roads and paths. This calculator provides a direct, straight-line distance over the Earth’s surface. Also, Google may use more advanced ellipsoidal models like WGS84 for its calculations. Find out more about map projection types.

8. What happens if I input coordinates for the same point?

The calculator will correctly return a distance of 0, as the difference in latitude and longitude will be zero.

© 2026 Geo-Tools Inc. For educational and informational purposes only.




Leave a Reply

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