Skip to content
TrackJet

7-day Pro trial included with every new account — no card, no charge.

Start free with 20 saved shipments. Every new account also gets a 7-day Pro trial — no card required.

Start 7-day Pro trial

One wrong letter, same check digit: how tracking-number check digits really work

Luis Romero 4 min read

Every day, tracking numbers get typed by cold fingers on loading docks, read over crackling phone lines, and copied out of photographed labels. The industry's forty-year-old defence against all that is a single character: the check digit — the last digit of the number, computed from all the others. Change any digit and the arithmetic breaks, so a system can reject a corrupted number before searching for it.

I implemented these algorithms for TrackJet's validators, and they are small marvels of pre-internet engineering — with one genuine blind spot that I verified in code and have rarely seen documented. Let's work through all three major schemes with real arithmetic.

Ocean containers: ISO 6346's weighted mod-11

A container number is four letters plus seven digits: CSQU3054383 — the textbook example. The first ten characters generate the eleventh, like this:

1. Convert letters to values. A=10, B=12, C=13 … Z=38 — note the sequence skips every multiple of 11 (11, 22, 33 are never assigned). Digits keep their face value. 2. Weight each position by a power of two. Position 0 counts once, position 1 twice, position 2 four times … position 9 counts 512 times. 3. Sum, take mod 11. The remainder is the check digit — and a remainder of 10 is written as 0.

For CSQU305438, the weighted sum works out so that the remainder is 3 — matching the final digit. You can watch every step of this calculation, with your own number, in our [check-digit tool](/container-number-check-digit).

Why mod 11 and not mod 10? Because 11 is prime and every positional weight (1, 2, 4 … 512) is coprime to it, any single-digit typo changes the checksum — a guarantee mod-10 schemes cannot make. Owner codes themselves (the CSQ/MSC part) are registered with the BIC, so the letters identify the shipping line and the digits prove their own integrity.

The blind spot we verified

Here is the detail almost nobody mentions. The letter values skip multiples of 11 — but the differences between two letter values can still be exactly 11. A=10 and K=21. B=12 and L=23. C=13 and M=24. Swap one such pair and the weighted sum changes by a multiple of 11 — which mod 11 is invisible.

We verified this against TrackJet's own validator: CSQU3054383 is valid — and so is MSQU3054383. Change the C to an M (values 13 → 24, a difference of exactly 11) and the check digit still passes. The scheme that catches every mistyped digit can miss a mistyped letter. It is a reminder of what check digits are and aren't: strong protection against digit typos and most slips, not a cryptographic guarantee. (Structure validation tells you a number could exist — only the carrier's records tell you it does.)

Air waybills: the elegant mod-7

Air cargo went minimalist. An AWB number is a three-digit airline prefix, then a seven-digit serial, then one check digit: 020-12345675. The rule: serial mod 7. The prefix never participates.

1234567 ÷ 7 leaves remainder 5 — the final digit. Done. No letter tables, no weights; any handler can verify it with pencil and paper, which was precisely the point in the era this was designed. The trade-off is weaker error detection than the weighted schemes — a random corruption slips through roughly one time in seven, versus one in eleven — but it costs nothing to compute, and in 1970s freight sheds that mattered. The prefix, meanwhile, does a different job: 020 is Lufthansa Cargo, which is how a [tracker can route an AWB](/awb-tracking) from the number alone.

Postal items: UPU S10's tuned weights

International postal numbers (RR123456785DE) hide the most carefully tuned scheme of the three. The eight digits after the service letters are weighted 8, 6, 4, 2, 3, 5, 9, 7, summed, and the check digit is 11 minus (sum mod 11) — with two special cases: a result of 10 is written as 0, and a result of 11 as 5. The standard is maintained by the Universal Postal Union, and that odd-looking weight sequence has a property we verified by hand: the weights are spaced so that swapping any two adjacent digits always changes the checksum — exactly the copying mistake humans make most with digit strings.

For RR123456785DE: weighting the serial 12345678 gives a sum whose mod-11 result leads to check digit 5 — which is exactly what the number carries. (Our S10 validator runs this in strict mode; in lenient mode we accept structurally-plausible numbers because, in the wild, a few postal operators emit non-conforming ones — an honest engineering compromise.)

Why this matters when your parcel is "not found"

A failed check digit is good news in disguise: it means your number was corrupted in transcription — not that your shipment vanished. The fix is re-reading the original document, not refreshing the tracking page. That insight is built into TrackJet's [universal detector](/track): we validate structure first, tell you why a number can't be right, and only then go looking. The math above is exactly what runs when you paste.

Every calculation in this article was executed by TrackJet's production validators before publishing — including the C→M blind-spot example. Details on how we verify content: [editorial & data policy](/editorial).


Related posts

← Back to blog