AbraCalc

Haversine Distance Calculator

Calculate the great-circle distance between two coordinates in km and miles using the Haversine formula.

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Haversine Distance Calculator [Online calculator]. Retrieved from https://abracalc.com/calculator/haversine-distance-calculator/

BibTeX

@misc{abracalc-haversine-distance-calculator, author = {AbraCalc}, title = {Haversine Distance Calculator}, year = {2026}, howpublished = {\url{https://abracalc.com/calculator/haversine-distance-calculator/}} }

Did this tool answer your question?

How to use this tool

  1. Enter the latitude and longitude of your starting point.
  2. Enter the latitude and longitude of your destination.
  3. The calculator returns the great-circle (shortest path over the Earth's surface) distance in both km and miles.

Calculate the straight-line great-circle distance between any two points on Earth using latitude and longitude coordinates.

⚠ This tool provides general estimates for education only and is not financial, tax or legal advice. Figures may not reflect your situation — verify with a qualified professional.

Formula

a = sin²(Δlat/2) + cos(lat₁) × cos(lat₂) × sin²(Δlon/2)

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

Distance = R × c, where R = 6371 km (Earth's mean radius)

How it works

This calculator applies the Haversine formula to compute the shortest path between two geographic coordinates along the surface of a sphere. Latitudes and longitudes are converted to radians before computing the angular difference; the result in kilometres is converted to miles using the factor 0.621371. The formula assumes a perfectly spherical Earth, so distances may differ by up to 0.5% from geodetic (ellipsoid-based) calculations for long routes.

Worked example

  1. Point 1: Paris (48.8566°N, 2.3522°E), Point 2: London (51.5074°N, −0.1278°E)
  2. Convert coordinates to radians and compute Δlat and Δlon
  3. Calculate a = sin²(Δlat/2) + cos(lat₁)×cos(lat₂)×sin²(Δlon/2)
  4. Apply c = 2×atan2(√a, √(1−a)) and multiply by R = 6371 km
  5. Convert km to miles: 343.56 × 0.621371 ≈ 213.48 mi

Distance = 343.56 km (213.48 miles)

Common mistakes to avoid

  • Entering latitude and longitude in degrees-minutes-seconds format instead of decimal degrees. 40 degrees 30 minutes is 40.5 decimal degrees, not 40.30.
  • Swapping latitude and longitude. Latitude is the north-south coordinate (-90 to 90); longitude is the east-west coordinate (-180 to 180). Swapping them places points on wrong sides of the globe.
  • Expecting the Haversine distance to match driving distance or route distance. Haversine gives the straight-line great-circle distance over the surface of a sphere; roads, terrain, and Earth's oblateness are not accounted for.

Key terms

Haversine formula
A trigonometric formula that calculates the great-circle distance between two points on a sphere given their latitudes and longitudes.
Great-circle distance
The shortest distance between two points on the surface of a sphere, measured along the surface itself.
Latitude
The angular distance of a point north or south of the equator, measured in degrees from −90° to +90°.
Longitude
The angular distance of a point east or west of the prime meridian, measured in degrees from −180° to +180°.
Earth's mean radius
Approximately 6371 km, used in the Haversine formula as the radius of the assumed spherical Earth.

Frequently asked questions

What is the Haversine formula?
The Haversine formula calculates the shortest distance over the Earth's surface between two points given their latitudes and longitudes. It accounts for the spherical shape of the Earth.
How accurate is the Haversine calculator?
The Haversine formula assumes a perfectly spherical Earth. Real-world accuracy is within about 0.3% of the true distance for most navigation purposes.

References & sources