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.

Updated June 2026 · How this works

Worth knowing
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.

Cross-country flight planning
New York JFK (40.64°, -73.78°) to Los Angeles LAX (33.94°, -118.41°)
Bearing is 260.2° W, distance 3,944 km — pilots use this great circle route for fuel efficiency.
European city break
London (51.51°, -0.13°) to Amsterdam (52.37°, 4.90°)
Bearing is 58.7° NE, distance 358 km — about a 4-hour drive or 1-hour flight.
Local hiking navigation
Trailhead (45.123°, -122.456°) to summit (45.135°, -122.441°)
Bearing is 52.3° NE, distance 2.1 km — use this compass heading to navigate off-trail.
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?

How do I convert GPS coordinates to degrees minutes seconds?
This calculator uses decimal degrees (like 40.7128). To convert from degrees-minutes-seconds, use: degrees + (minutes/60) + (seconds/3600). For example, 40°42'46"N becomes 40 + (42/60) + (46/3600) = 40.7128 degrees.
Why is my compass bearing different from GPS bearing?
GPS shows true bearing (relative to geographic north), while magnetic compasses point to magnetic north. The difference is called magnetic declination and varies by location — it can be up to 20° in some areas. Use a declination calculator to adjust compass readings.
How accurate is this bearing calculation for long distances?
This calculator uses the spherical Earth model, accurate to within 0.5% for distances up to 20,000 km. For precision surveying or aviation, use ellipsoidal calculations that account for Earth's actual shape. GPS devices typically show accuracy within 3-5 meters under clear skies.

Need something this doesn't cover?

Suggest a tool — we'll build it →