ToolJoltTools

Distance Between Coordinates Calculator (Haversine)

Great-circle distance between any two lat/long points — km, miles and nautical miles, with the initial bearing thrown in.

0
Distance (km)
0
Statute miles (mi)
0
Nautical miles (NM)
0
Initial bearing A→B (°)

Haversine assumes a sphere — real Earth bulges, so answers drift up to 0.5% from ellipsoidal (Vincenty/Karney) values: 1–2 km on a transcontinental flight, centimetres across town. The defaults are Delhi → Mumbai: 1,153 km as the crow flies, ~1,400 by road.

Formula

a = sin²(Δφ/2) + cosφ₁·cosφ₂·sin²(Δλ/2); d = 2R·atan2(√a, √(1−a)), R = 6371 km
References: Movable Type Scripts / Veness, great-circle formulae (Haversine, bearings); Snyder, J.P., Map Projections — A Working Manual (USGS PP 1395)

⚠️ Great-circle estimates on a spherical Earth (±0.5% vs ellipsoidal) — for surveying, legal boundaries and navigation use geodetic-grade tools and official datums.

Great-circle distance between any two lat/long points — km, miles and nautical miles, with the initial bearing thrown in.

About Distance Between Coordinates Calculator (Haversine)

Two pairs of numbers — that's all a position is — and one trigonometric identity turns them into a distance: the haversine formula, beloved since the age of sail because it stays numerically stable even for points a street apart. This calculator computes the great-circle distance between any two coordinates in kilometres, statute miles and nautical miles, plus the initial bearing, with the sphere-versus-ellipsoid honesty note that separates planning tools from survey instruments.

How to use Distance Between Coordinates Calculator (Haversine)

  1. 1Enter — sensible defaults are pre-filled so you see a worked result immediately.
  2. 2Read the live results: .
  3. 3Check the "With your numbers" line to see the formula a = sin²(Δφ/2) + cosφ₁·cosφ₂·sin²(Δλ/2); d = 2R·atan2(√a, √(1−a)), R = 6371 km substituted step by step.
  4. 4Adjust inputs (or flip the unit toggle) until the scenario matches yours, then copy or share the result.

Why use Distance Between Coordinates Calculator (Haversine)?

  • Instant, free and private — every calculation runs in your browser, nothing is uploaded
  • Built on the published formula a = sin²(Δφ/2) + cosφ₁·cosφ₂·sin²(Δλ/2); d = 2R·atan2(√a, √(1−a)), R = 6371 km with sources cited on the page
  • Haversine assumes a sphere — real Earth bulges, so answers drift up to 0.5% from ellipsoidal (Vincenty/Karney) values: 1–2 km on a transcontinental flight, centimetres across town. The defaults are Delhi → Mumbai: 1,153 km as the crow flies, ~1,400 by road.
  • Switch units, tweak any input and watch every result update live

Frequently asked questions

Why 'great circle' — what makes it the shortest path?+

Slice a sphere through its centre and the cut's edge is a great circle; the shorter arc between two surface points along such a circle is provably the shortest surface path. That's why long-haul flights arc poleward on flat maps — the Mercator projection straightens rhumb lines, not geodesics, so the genuinely shortest route looks curved. Delhi to San Francisco passes near the Arctic; the 'straight' line on the map would be hundreds of km longer.

How accurate is haversine against real-world tools?+

Against GPS receivers and Google Earth (which use the WGS-84 ellipsoid): within 0.3–0.5% — Earth's equatorial radius exceeds its polar by 21 km, and a single mean radius can't honor that. For logistics, aviation planning, store-locator radii and 'how far is it' questions, irrelevant; for property lines, cadastral work or anything legal, use ellipsoidal geodesics (Karney's GeographicLib is the modern standard) and the official local datum. The formula's other virtue is numerical: the older spherical-law-of-cosines version loses precision below ~1 km; haversine doesn't.

What coordinate format does this need — and what are the sign conventions?+

Decimal degrees: north latitude positive, south negative; east longitude positive, west negative. New York is (40.71, −74.01), Sydney (−33.87, 151.21). If your source gives degrees-minutes-seconds (40°42′46″N), convert with DD = D + M/60 + S/3600 — our DMS converter automates it. The classic error is a dropped minus sign, which silently relocates your point to the wrong hemisphere and produces a spectacular, plausible-looking wrong answer.

Why do km, miles and nautical miles all exist for distance?+

Different masters: the kilometre is SI; the statute mile is Roman legions via English law (5,280 ft); the nautical mile is geometry itself — one minute of latitude arc, 1,852 m by definition — which is why aviation and shipping never left it: charts are graduated in degrees, so distance and angle share a ruler. The bearing output here pairs naturally with NM: 'fly 245° for 612 NM' is a complete navigational sentence.

Related tools

Related Field tools

Sponsored