Skip to content
Calixo

GPS Coordinate Distance Calculator

Find the great-circle distance between two GPS coordinates — the straight-line 'as the crow flies' distance across the curved surface of the Earth.

Inputs

Paste this into any page — the widget stays live and updates automatically as this calculator improves. Using WordPress or Notion? See the embed guide.

Saved Scenarios

— select 2+ to compare
Inputs updated · Results recalculated · Just now

Distance (km)

343.56

Distance (miles)

213.48

Spark says

Top view of vintage exploration setup with maps, compass, gloves, and retro camera.
Photo by ArtHouse Studio on Pexels
Close-up of hands using a map app on a smartphone outdoors, showcasing GPS navigation.
Photo by Ingo Joseph on Pexels

Formula

d=R×2arctan ⁣(a1a),a=sin2 ⁣Δφ2+cosφ1cosφ2sin2 ⁣Δλ2d = R \times 2\arctan\!\left(\dfrac{\sqrt{a}}{\sqrt{1-a}}\right), \quad a = \sin^2\!\dfrac{\Delta\varphi}{2} + \cos\varphi_1\cos\varphi_2\sin^2\!\dfrac{\Delta\lambda}{2}
R
— Earth's mean radius, 6,371 km
\varphi, \lambda
— Latitude and longitude in radians

What is the GPS Coordinate Distance Calculator?

The haversine formula calculates great-circle distance between two points on a sphere from their latitude and longitude — the straight-line 'as the crow flies' distance, not driving distance.

Use this when estimating straight-line distance for a flight or shipping route, checking how far apart two cities or landmarks really are, or as a baseline distance for comparing against actual road or trail distance.

How to use it

  1. 1 Enter the latitude and longitude of the first point.
  2. 2 Enter the latitude and longitude of the second point.

Understanding GPS Coordinate Distance Calculator

The haversine formula solves a problem that seems like it should be trivial but genuinely isn't: finding the distance between two points when those points sit on the surface of a sphere rather than a flat plane. On a flat plane, distance between two points is straightforward Pythagorean geometry. On a sphere, that same approach breaks down — a 'straight line' on a curved surface isn't actually straight in three-dimensional space, and using flat-plane distance math on latitude/longitude coordinates produces increasingly wrong answers as the distance between points grows, because it ignores the curvature that becomes significant at scale.

The haversine formula gets around this by working with the actual great-circle distance — the shortest path between two points along the surface of a sphere, which is always an arc of the circle formed by slicing through the sphere along a plane that passes through both points and the sphere's center. This is genuinely the shortest possible surface distance between two points on a perfect sphere, which is why long-haul flight paths follow curved-looking routes on a flat map: the curve represents the great-circle path, and it's shorter in real distance than the visually 'straight' line the flat map projection would suggest.

It's worth being precise about what 'great-circle distance' does and doesn't capture. It models Earth as a perfect sphere using a mean radius (6,371 km), which is an excellent approximation for the vast majority of practical purposes — the actual error from treating Earth as a perfect sphere rather than its true, very slightly flattened shape (an oblate spheroid, very slightly wider at the equator than pole-to-pole) is small enough to be irrelevant for navigation, trip planning, or general distance estimation. Only for very high-precision surveying, geodesy, or scientific applications does the distinction between a spherical model and a full ellipsoidal model become meaningful enough to require more sophisticated formulas.

The more consequential limitation for everyday use is that great-circle distance is pure straight-line distance across the surface — it has no awareness of roads, terrain, or any real path a traveler would actually take. This is precisely why it's most useful as either a starting reference point (comparing straight-line distance against actual travel distance to gauge how direct a route is) or for the categories of travel — flights, ocean voyages — where the real path genuinely does approximate a great circle rather than being constrained to follow a winding network of roads.

Worked examples

Advantages

  • Accounts for Earth's curvature, giving accurate results even over very long distances where a flat-map approximation would fail badly.
  • Provides results in both kilometers and miles for direct comparison.
  • Works for any two points on Earth, from a few meters apart to opposite sides of the globe.
  • Pairs naturally with the bearing and midpoint calculators for complete route analysis.

Limitations

  • Treats Earth as a perfect sphere (using its mean radius) — real driving/walking distance will always be longer, and highly precise geodesy work uses an ellipsoidal model instead.
  • This is straight-line distance only, not accounting for terrain, obstacles, or the actual path any real vehicle or vessel would take.

Common mistakes

  • ⚠️ Comparing this straight-line distance directly to a mapping app's driving distance and assuming a discrepancy is an error — roads virtually never follow the great-circle path, so a real difference is expected, not a mistake.
  • ⚠️ Using a flat-map (Pythagorean) distance approximation for long distances instead of a great-circle formula — this works reasonably well for short distances but becomes significantly wrong for distances of hundreds of kilometers or more.
  • ⚠️ Confusing Earth's mean radius (used here, 6,371 km) with its equatorial radius, a subtly different value used in some other geodetic contexts.

Tips

  • 💡 For distances under a few kilometers, a simpler flat-map approximation would give a nearly identical result — the haversine formula's real advantage shows up over longer distances.
  • 💡 Remember this is straight-line distance — for planning actual travel, cross-reference against a mapping tool's route distance, which will typically be longer.
  • 💡 Use this alongside the bearing calculator to get both the distance and direction of a route in one pass.
  • 💡 For extremely high-precision geodesy or surveying work, note that a full ellipsoidal Earth model (rather than a sphere) is used professionally, though the difference from this calculator's spherical result is typically small for most everyday purposes.

Real-life uses

  • Estimating straight-line flight or shipping distance between two locations
  • Checking how far apart two cities, landmarks, or coordinates actually are
  • Establishing a baseline distance to compare against actual road or trail distance
  • Verifying the plausibility of a GPS-logged trip's recorded distance

Frequently asked questions

Why is this different from my GPS app's driving distance?

This is straight-line distance — actual travel distance follows roads and is almost always longer, sometimes considerably so.

Why not just use flat-plane distance math on latitude and longitude?

Flat-plane math ignores Earth's curvature, which becomes significantly inaccurate over longer distances — the haversine formula accounts for the sphere's geometry, giving accurate results even across very long distances.

How accurate is treating Earth as a perfect sphere?

Very accurate for nearly all practical purposes — Earth is only very slightly flattened (an oblate spheroid), and the difference from a perfect-sphere model is negligible outside of high-precision surveying or scientific geodesy.

Why do flight paths look curved on a flat map?

The curve represents the great-circle path, which is the true shortest distance across the sphere — it only looks longer than a straight line because flat map projections distort real-world distance and direction.

Can I use this to estimate travel time for a flight?

Yes as a starting point — divide the calculated distance by a typical cruising speed for a rough estimate, though real flight time also includes taxi, takeoff, climb, and descent phases not captured by pure cruising distance and speed.

Sources & references