ForHosting KIT · Travel & geography

Magnetic to true bearing

Convert a compass bearing to a true bearing with your local declination; magnetic 45° with 5.5° east gives true 50.5°, and the reverse conversion back to magnetic is shown alongside. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Magnetic bearing in degrees
45
Declination
5.5
You get
True bearing
50.5
Reverse magnetic bearing
45
Precision
6

This magnetic to true bearing calculator converts a compass magnetic bearing into a true bearing using the local magnetic declination, and returns the reverse conversion from true back to magnetic. Navigation, surveying, aviation, and outdoor mapping almost always mix two north references: magnetic north as a free compass sees it, and true (geographic) north along a meridian. Declination is the signed angular offset between those poles at your location—east of true north is positive, west is negative—and the classic identities are true equals magnetic plus declination, and magnetic equals true minus declination, with bearings wrapped into the half-open interval from zero to three hundred sixty degrees. The engine is fully deterministic finite arithmetic: no network lookup of a world magnetic model, no random sampling, and no date-dependent shortcuts.

Magnetic north, true north and your result

A magnetic bearing is the clockwise angle from magnetic north to a course or line of sight, the quantity a magnetic compass or handheld GPS in magnetic mode typically reports. A true bearing is the same kind of clockwise angle measured from true geographic north, the reference used on most topographic maps, charts that plot meridians, and great-circle planning tools.

Magnetic declination—also called magnetic variation in aviation and marine contexts—is the signed angle from true north to magnetic north at a place and epoch: when magnetic north lies east of true north the declination is positive, and when it lies west the declination is negative.

This calculator takes a finite magnetic bearing and a finite declination, normalizes the magnetic angle into the half-open range from zero inclusive to three hundred sixty exclusive, adds the declination to form the true bearing, then subtracts the same declination to recover the reverse magnetic bearing so you can see both conversion directions in one response.

Where magnetic–true conversion fits in navigation, surveying, and software

Students meet declination when a lab asks them to plot a compass traverse on a true-north map grid, when a wilderness course teaches “east is least, west is best” mnemonics, or when an aviation ground-school problem converts magnetic runway headings to true courses for flight plans. Surveyors and GIS technicians convert field magnetic sights into true azimuths before storing them with projected coordinates. Pilots and mariners move between magnetic and true when charts, autopilots, and compass cards disagree by the local variation printed on the plate.

Developers call the same contract from scripts to seed deterministic test vectors for navigation widgets, to normalize user-entered magnetic legs before map display, or to satisfy programming-challenge statements that demand true degrees rather than a hand-waved sketch. Product and education tools use the conversion when a learner types a magnetic heading and a declination and the UI must show both the true course and the reverse magnetic check.

Field compass to map grid

Convert a handheld magnetic sighting to a true bearing for plotting on a topographic map or GIS layer that uses geographic north.

Flight and marine planning drills

Turn magnetic courses into true courses (and back) using charted variation for exams, briefings, and deterministic checklists.

What does the magnetic to true bearing calculator cost?

It is free in your browser on this page.

How do I enter west declination?

Use a negative number. East declination is positive.

What happens if the magnetic bearing is not a finite number?

Infinity, NaN, empty values, and non-numeric tokens are not accepted.

Does this tool look up declination from my location?

No. You supply the local declination. The calculator only applies the algebraic conversion; it does not call a world magnetic model.

Can I enter a bearing above 360° or below zero?

Yes. A bearing such as 405 or −10 degrees is brought into the 0 to 360 range before and after the conversion. The declination itself is not wrapped, because it is a signed offset and wrapping it would flip the result.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geo/magnetic-true-bearing

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geo/magnetic-true-bearing \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"magnetic_bearing":45,"declination":5.5}'
{
  "magnetic_bearing": 45,
  "declination": 5.5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.magnetic_true_bearing",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_abs_deg1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What magnetic and true bearings mean and what the response contains

The payload returns magnetic_bearing, declination, true_bearing, reverse_magnetic_bearing, a short formula string, the method tag magnetic_true_bearing, and the precision used. There is no approximate geomagnetic model path and no silent substitution of deviation tables: the engine either finishes with stable floating-point angles inside the supported magnitude range or rejects the input with invalid_input. Rejected cases include missing magnetic_bearing or declination, non-finite values such as Infinity or NaN, non-numeric tokens, and magnitudes above the documented ceiling.

How magnetic_bearing and declination are read and how results stay reproducible

Optional leading plus signs and scientific notation on numeric strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong course. West declination is entered as a negative number rather than a separate west flag, which keeps the arithmetic identical in every language and client. Bearings may arrive outside zero to three hundred sixty—for example four hundred five or negative ten—and are normalized with modular arithmetic into that interval before and after conversion; declination itself is not wrapped, because a signed offset of a few tens of degrees is the intended unit and wrapping it would flip the conversion. The preferred fields are magnetic_bearing for the compass angle in degrees and declination for the local east-positive offset in degrees, but aliases magnetic, mag_bearing, M, and bearing for the magnetic angle, and decl, magnetic_declination, variation, D, and mag_var for declination, are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for every angle field, defaulting to six and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing modular bearing math yourself.

Where magnetic–true conversion fits in navigation, surveying, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with compass-name-to-bearing or rhumb-line tools when you need related geo steps, and with other parse endpoints when you are building a small lab of free, deterministic navigation helpers.

Deterministic navigation fixtures

Generate reproducible true_bearing and reverse_magnetic_bearing values for unit tests, property checks, and CI assertions.

How are true and reverse magnetic bearings defined?

With east-positive declination, true_bearing = normalize(magnetic_bearing + declination) and reverse_magnetic_bearing = normalize(true_bearing − declination). Bearings wrap into [0, 360).

Read the full KIT documentation →