Latitude Longitude Distance Calculator

Find the great-circle distance, initial bearing, and midpoint between two GPS coordinates using the Haversine formula.

Quick Facts

Formula
Haversine great-circle distance (spherical Earth model)
Uses mean Earth radius R = 6,371.0088 km; accurate to roughly 0.5% versus ellipsoidal (WGS84) methods like Vincenty's formulae.

Your Results

Calculated
Great-circle distance
-
Haversine formula, chosen unit
Initial bearing
-
Compass heading from Point A
Midpoint
-
Great-circle halfway point
Share of Earth's circumference
-
Distance vs. ~40,030 km around

Ready

Enter two coordinate pairs and press Calculate.

About the Latitude Longitude Distance Calculator

This tool finds the great-circle distance between two points on Earth given their latitude and longitude, using the Haversine formula — the standard, well-established method for this calculation. It also reports the initial compass bearing you would follow at the start point and the midpoint of the great-circle path, so you can see not just how far apart two places are but which direction connects them.

The Haversine formula

The Haversine formula computes the shortest distance between two points on the surface of a sphere, measured along the surface (not through the Earth). For points 1 and 2 with latitude φ and longitude λ in radians:

  • a = sin²(Δφ/2) + cos(φ1) · cos(φ2) · sin²(Δλ/2)
  • c = 2 · atan2(√a, √(1−a))
  • distance = R · c

where Δφ is the difference in latitude, Δλ is the difference in longitude, and R is the Earth's mean radius, taken here as 6,371.0088 km. The formula assumes a perfectly spherical Earth, which keeps the math simple and fast while staying accurate to within about 0.5% of ellipsoidal models such as Vincenty's formulae, which account for the Earth's slight equatorial bulge.

Initial bearing and midpoint

Because a great-circle route curves relative to straight lines on a flat map, the compass heading needed to follow it changes along the way — except when traveling due north-south or along the equator. The initial bearing reported here is the heading (measured clockwise from true north, 0° to 360°) at the starting point only. The midpoint is the coordinate exactly halfway along that curved path, computed from the same spherical geometry, and is not simply the arithmetic average of the two latitude/longitude pairs.

Reading the coordinates

  • Latitude runs from −90° (South Pole) to 90° (North Pole); positive values are north of the equator, negative values south.
  • Longitude runs from −180° to 180°; positive values are east of the Prime Meridian, negative values west.
  • Decimal degrees (e.g. 40.7128) are used throughout — if you have degrees/minutes/seconds, convert first (degrees + minutes/60 + seconds/3600, keeping the sign for direction).

Practical context

Great-circle distance is the theoretical shortest path "as the crow flies" and is what airlines and ships approximate when planning long routes. It does not account for actual road networks, terrain, or air traffic corridors, so a driving or flight-plan distance will usually be longer. For everyday geography, travel-time estimates, and mapping, the Haversine result is an excellent and widely used approximation.

Frequently Asked Questions

What formula does this calculator use?
It uses the Haversine formula, the standard method for great-circle distance between two points on a sphere from their latitude and longitude. It converts the coordinates to radians, applies a = sin²(Δφ/2) + cos(φ1)·cos(φ2)·sin²(Δλ/2) and distance = 2R·atan2(√a, √(1−a)), using a mean Earth radius R of 6,371.0088 km.
How accurate is the Haversine formula?
It treats the Earth as a perfect sphere, so results are typically within about 0.5% of ellipsoidal methods such as Vincenty's formulae, which account for the Earth's slight flattening. That is precise enough for travel planning, geography, and general mapping, but surveying or aviation-grade work should use an ellipsoidal (WGS84) calculation.
What is initial bearing?
Initial bearing is the compass heading, measured clockwise from true north, that you would need to follow at the start point to travel the great-circle path toward the destination. Because a great circle is curved on a flat map, this heading changes continuously along the route except on the equator or a due north-south line.
How do I enter latitude and longitude?
Enter coordinates in decimal degrees. Latitude ranges from -90 at the South Pole to 90 at the North Pole, with negative values south of the equator. Longitude ranges from -180 to 180, with negative values west of the Prime Meridian. For example, Sydney, Australia is about -33.8688 latitude and 151.2093 longitude.