Conversions

Compass Bearing Calculator

Forward bearing between two lat/lon points. Free online Compass Bearing Calculator. Calculate compass bearing online — fast, accurate, mobile-friendly, no signu

Bearing measured clockwise from North (0°).
Bearing (°)
51.212617

Derivation

  1. ├── 01Givenlat1 = 40.7128, lon1 = -74.006, lat2 = 51.5074, lon2 = -0.1278
  2. ├── 02Formula{let t=e.lat1,a=e.lon1,n=e.lat2,r=e.lon2;const o=e=>e × π / 180,l=sin(o(r-a)) × cos(o(n)),i=cos(o(t)) × sin(o(n))-sin(o(t)) × cos(o(n)) × cos(o(r-a));return(180 × atan2(l,i) / π+360)%360}
  3. ├── 03Substitute{let t=e.40.7128,a=e.-74.006,n=e.51.5074,r=e.-0.1278;const o=e=>e × π / 180,l=sin(o(r-a)) × cos(o(n)),i=cos(o(t)) × sin(o(n))-sin(o(t)) × cos(o(n)) × cos(o(r-a));return(180 × atan2(l,i) / π+360)%360}
  4. └── 04Compute Bearing (°)51.212617
Did you know?

Magnetic compasses (China, 11th century) predate the European Age of Exploration by ~400 years.

§01What is

Understanding the Compass Bearing Calculator

The Compass Bearing Calculator computes Bearing (°) from 4 inputs: lat 1, lon 1, lat 2, lon 2. Forward bearing between two lat/lon points.

Quick calculators for the math that shouldn’t need a notepad — instant, accurate, private to your browser. The Compass Bearing Calculator sits in that toolkit — it forward bearing between two lat/lon points. Enter your numbers above and the result updates instantly; every step of the math is shown in the Derivation panel so you can see exactly how the answer was reached.

§02The Formula

How it’s calculated

{let t=e.lat1,a=e.lon1,n=e.lat2,r=e.lon2;const o=e=>e × π / 180,l=sin(o(r-a)) × cos(o(n)),i=cos(o(t)) × sin(o(n))-sin(o(t)) × cos(o(n)) × cos(o(r-a));return(180 × atan2(l,i) / π+360)%360}

Where

lat1
Lat 1
lon1
Lon 1
lat2
Lat 2
lon2
Lon 2
§03Practical Example

Step-by-step walkthrough

Scenario

Apply the formula to a realistic set of inputs: Lat 1 = 40.7128, Lon 1 = -74.006, Lat 2 = 51.5074, Lon 2 = -0.1278.

  1. 01Start by noting the input — Lat 1: 40.7128.
  2. 02Start by noting the input — Lon 1: -74.006.
  3. 03Start by noting the input — Lat 2: 51.5074.
  4. 04Start by noting the input — Lon 2: -0.1278.
  5. 05Substitute these values into the formula: {let t=e.lat1,a=e.lon1,n=e.lat2,r=e.lon2;const o=e=>e × π / 180,l=sin(o(r-a)) × cos(o(n)),i=cos(o(t)) × sin(o(n))-sin(o(t)) × cos(o(n)) × co…
  6. 06Compute Bearing (°): the calculator returns 51.2126.
  7. 07Cross-check the answer by opening the Derivation panel above — every line of math is shown so you can follow the computation end-to-end.
§04Variants

Common Compass Bearing Problems

The formula gets rearranged depending on which variable you need. Here are the patterns you’ll run into in the real world — find the one that matches your problem and follow the worked steps.

01 · PATTERN

Lat 1 halved

lat1 = 20.3564 (from 40.7128)

Keep every other input at its default and halve the lat 1. See how bearing (°) responds.

  1. 01New Lat 1: 20.3564
  2. 02Baseline Bearing (°): 51.2126
  3. 03New Bearing (°): 41.5909
  4. 04Bearing (°) decreases by 18.8% → use this sensitivity to plan for real-world variation.
02 · PATTERN

Lat 1 doubled

lat1 = 81.4256 (from 40.7128)

Keep every other input at its default and double the lat 1. See how bearing (°) responds.

  1. 01New Lat 1: 81.4256
  2. 02Baseline Bearing (°): 51.2126
  3. 03New Bearing (°): 95.18
  4. 04Bearing (°) increases by 85.9% → use this sensitivity to plan for real-world variation.
03 · PATTERN

Lon 1 halved

lon1 = -37.003 (from -74.006)

Keep every other input at its default and halve the lon 1. See how bearing (°) responds.

  1. 01New Lon 1: -37.003
  2. 02Baseline Bearing (°): 51.2126
  3. 03New Bearing (°): 54.2874
  4. 04Bearing (°) increases by 6% → use this sensitivity to plan for real-world variation.
04 · PATTERN

Lon 1 doubled

lon1 = -148.012 (from -74.006)

Keep every other input at its default and double the lon 1. See how bearing (°) responds.

  1. 01New Lon 1: -148.012
  2. 02Baseline Bearing (°): 51.2126
  3. 03New Bearing (°): 19.4479
  4. 04Bearing (°) decreases by 62% → use this sensitivity to plan for real-world variation.
§05FAQ

Frequently asked questions

Yes. The calculator implements the standard formula as documented and returns exact floating-point results. No approximations are used unless noted in the formula.
Your feedback

How useful was this calculator?

Your ratings stay in your browser — they help us learn which tools people actually rely on.

Rate it
Was this helpful?