Bearing Calculator
Calculate compass bearing and distance between any two GPS coordinates.
Find the compass direction and distance between any two locations on Earth. Enter starting and destination coordinates (latitude and longitude) — see bearing in degrees, cardinal direction, and travel distance. Assumes spherical Earth model for calculations.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
A bearing tells you which direction to face, but Earth's curve makes straight-line navigation impossible over long distances. What looks like a straight line on a map becomes a curved path on the globe — this is why flights from New York to London curve north over Greenland rather than heading due east. The shortest path between any two points on a sphere is called a great circle route.
This calculator uses spherical trigonometry to find both the initial bearing (the compass direction you start facing) and the total distance along Earth's curved surface. The bearing calculation assumes you're standing at the starting point with a compass, determining which direction to initially head. For journeys over 1,000 km, the bearing changes continuously as you travel — what navigators call the great circle track.
The distance calculation uses the Haversine formula, which accounts for Earth's spherical shape. It measures the arc length between two points on the surface, not the straight-line distance through the planet. For most practical navigation, this spherical model is accurate enough — GPS devices use similar calculations with additional corrections for Earth's slight flattening at the poles.
When To Use This
Right tool, right situation
Use this calculator for planning long-distance travel, understanding flight paths, or general navigation between cities. It's particularly useful for hikers and sailors who need compass bearings for off-road navigation, or for understanding why airline routes appear curved on flat maps.
For aviation, this provides the great circle track that pilots and flight planning software use to minimize fuel consumption. Commercial flights typically follow these routes unless winds or air traffic control require deviations. Sailors use similar calculations for ocean passages where following the great circle saves both time and fuel.
Avoid using this for precision applications like surveying, construction, or scientific research where accuracy better than 0.1% is required. Also don't rely on it for emergency navigation without understanding magnetic declination — your compass reading could be significantly different from the calculated true bearing.
Common Mistakes
Why results sometimes look wrong
The most common error is confusing true bearing with magnetic bearing. This calculator gives true bearing (relative to geographic north), but magnetic compasses point to magnetic north, which can differ by 20° or more depending on your location. Always apply magnetic declination correction when using a physical compass.
Many people assume bearing remains constant during travel, but it changes continuously on long journeys. The bearing shown here is only your starting direction — after traveling 1,000 km, you'll need to recalculate to stay on the great circle route. GPS devices handle this automatically by constantly updating your heading.
Another mistake is using this for precision surveying or aviation without understanding the limitations. This calculator treats Earth as a perfect sphere, but Earth is actually an oblate spheroid (flattened at the poles). For surveying work or flight planning, use ellipsoidal calculations that account for Earth's true shape and local coordinate system datums.
The Math
Worked examples and deeper derivation
The bearing calculation uses the forward azimuth formula from spherical trigonometry. First, convert all coordinates to radians, then calculate: y = sin(Δlon) × cos(lat₂) and x = cos(lat₁) × sin(lat₂) - sin(lat₁) × cos(lat₂) × cos(Δlon). The bearing is atan2(y, x) converted back to degrees and normalized to 0-360°.
Distance uses the Haversine formula: a = sin²((lat₂-lat₁)/2) + cos(lat₁) × cos(lat₂) × sin²((Δlon)/2), then c = 2 × atan2(√a, √(1-a)), and finally d = R × c, where R is Earth's radius (6,371 km). This gives the great circle distance — the shortest path along Earth's surface.
For very small distances (under 1 km), the bearing becomes less reliable due to rounding errors in the trigonometric functions. For distances approaching 20,000 km (halfway around Earth), the calculation remains accurate but the concept of 'initial bearing' becomes less meaningful since multiple great circle routes exist between antipodal points.
Expert Unlock
The thing most explanations skip
The spherical Earth approximation breaks down for precision surveying. Real GPS systems use the WGS84 ellipsoid, which models Earth as flattened by 1/298.257 at the poles. This creates bearing errors of up to 0.1° and distance errors of 0.5% in extreme cases — enough to miss a landing strip or building foundation. Professional surveying software applies ellipsoidal corrections and local datum transformations to achieve centimeter accuracy.
How accurate is GPS bearing for real navigation?
Need something this doesn't cover?
Suggest a tool — we'll build it →