← All articles

How to read a container number — and why the last digit matters

Every shipping container carries the same kind of number: four letters and seven digits. Each part means something, and the last digit catches a typing mistake before it costs you.

Take CSQU 305438 3, the example the international standard for container numbers (ISO 6346) uses itself.

The four letters: who owns it, and what it is

The six digits: its serial number

305438 is chosen by the owner, and is padded with zeros in front if it is shorter.

The last digit: the check digit

The final 3 is not part of the serial number. It is worked out from the ten characters before it, so a number with a typing mistake in it no longer adds up: a wrong digit always, and a wrong letter or two neighbours swapped almost always (a few letters share a value as far as the sum is concerned — A, K and U, for one).

This is how it is worked out:

  1. Give each letter a value: A is 10, B is 12, C is 13 and so on up to Z, 38 — skipping 11, 22 and 33. Each digit keeps its own value.
  2. Multiply the ten values by 1, 2, 4, 8 … doubling each time, up to 512 for the tenth.
  3. Add them up, divide by 11 and keep the remainder. That remainder is the check digit (a remainder of 10 is written as 0).
CharacterCSQU305438
Value13302832305438
× weight1248163264128256512
=13601122564803205127684096

The total is 6185. Divided by 11 that is 562, remainder 3 — the check digit printed on the box.

Why it matters

A container number is copied by hand all the time — off a bill of lading, out of an email, into a spreadsheet. One wrong character and you are following somebody else's container, or nothing at all, and you may not find out until the day you needed it.

A good check: if a number's last digit does not match the calculation, the number was copied wrong somewhere. Go back to the bill of lading. (A number that does add up is not proof it is the right box — only that it was not mistyped in a way the digit can see.)

In SailPing: every container number is checked this way when you add it, one at a time or from a spreadsheet, and a number that does not add up is turned away before anything is tracked.