Haversine Great-Circle Distance Calculator
Compute the shortest great-circle distance between any two coordinates on Earth using the Haversine formula.
Step-by-step working
- Convert coordinates to radians: φ1 = 0.7106 rad, φ2 = 0.899 rad, Δφ = 0.1884 rad, Δλ = 1.2894 rad.
- Calculate chord square: a = sin²(0.0942) + cos(0.7106) × cos(0.899) × sin²(0.6447) = 0.179236.
- Calculate angular distance: c = 2 × atan2(√0.1792, √(1 - 0.1792)) = 0.87431 radians (50.09°).
- Multiply by Earth radius (R = 6371 km): distance = 5570.23 km.
| Unit | Distance Value |
|---|---|
| Kilometers (km) | 5570.23 km |
| Miles (mi) | 3461.18 mi |
| Nautical Miles (NM) | 3007.68 NM |
Mathematical Formula
Overview & Explanation
The Haversine formula calculates the shortest distance between two points on the surface of a sphere using their latitude and longitude coordinates. It remains one of the fundamental equations in celestial navigation, geodesy, and GIS mapping. By accounting for the spherical curvature of the Earth, it offers vastly greater accuracy for geographic measurements than flat planar Euclidean approximations.
How It Works
- Convert the latitudes and longitudes of both points from decimal degrees to radians.
- Calculate the square of half the chord length (a) using the differences in latitude and longitude.
- Determine the angular distance (c) in radians and multiply it by Earth's mean radius in your desired unit.
Practical Applications
- Aviation and maritime navigation for flight planning and nautical path estimation.
- Geographic Information Systems (GIS) and mobile apps for proximity and store-locator queries.
- Telecommunications and logistics routing to calculate line-of-sight path lengths between stations.
New York to London
Calculate the great-circle flight path distance between New York City (JFK) and London (LHR).
Inputs
Point 1 Latitude (°): 40.7128 · Point 1 Longitude (°): -74.006 · Point 2 Latitude (°): 51.5074 · Point 2 Longitude (°): -0.1278 · Distance Unit: Kilometers (km)
Step 1
Convert coordinates to radians: φ1 = 0.7106 rad, φ2 = 0.899 rad, Δφ = 0.1884 rad, Δλ = 1.2894 rad.
Step 2
Calculate chord square: a = sin²(0.0942) + cos(0.7106) × cos(0.899) × sin²(0.6447) = 0.179236.
Step 3
Calculate angular distance: c = 2 × atan2(√0.1792, √(1 - 0.1792)) = 0.87431 radians (50.09°).
Step 4
Multiply by Earth radius (R = 6371 km): distance = 5570.23 km.
Great-Circle Distance
Result
Tokyo to Sydney
Estimate trans-Pacific distance from Tokyo to Sydney in statute miles.
Inputs
Point 1 Latitude (°): 35.6762 · Point 1 Longitude (°): 139.6503 · Point 2 Latitude (°): -33.8688 · Point 2 Longitude (°): 151.2093 · Distance Unit: Miles (mi)
Step 1
Convert coordinates to radians: φ1 = 0.6227 rad, φ2 = -0.5911 rad, Δφ = -1.2138 rad, Δλ = 0.2017 rad.
Step 2
Calculate chord square: a = sin²(-0.6069) + cos(0.6227) × cos(-0.5911) × sin²(0.1009) = 0.332104.
Step 3
Calculate angular distance: c = 2 × atan2(√0.3321, √(1 - 0.3321)) = 1.22835 radians (70.38°).
Step 4
Multiply by Earth radius (R = 3958.8 mi): distance = 4862.74 mi.
Great-Circle Distance
Result
How it's calculated & sources
a = sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2); c = 2·atan2(√a, √(1−a)); d = R·c
Frequently Asked Questions
What Earth radius is used in this calculation?
How accurate is the Haversine formula for Earth?
Why use Haversine instead of the spherical Law of Cosines?
When should Vincenty's formulae be used instead?
Related Calculators
Haversine Distance Calculator
Compute exact great-circle distance between two latitude and longitude coordinates using the Haversine trigonometric formula.
Decimal Degrees to DMS Converter
Convert decimal degree coordinates to Degrees, Minutes, and Seconds (DMS) format.
GPS Coordinate Converter
Convert GPS coordinates between Decimal Degrees (DD), Degrees Minutes Seconds (DMS), and Degrees Decimal Minutes (DDM).
DMS to Decimal Degrees Converter
Convert Degrees, Minutes, and Seconds (DMS) coordinates to Decimal Degrees (DD).