The idea
What a check digit is for
The last digit of a GTIN is not data. It is arithmetic performed on the digits in front of it, and it exists so that mistakes announce themselves. A scanner that misreads a single bar, or a colleague who transposes two digits while typing, produces a number whose final digit no longer matches — and the system rejects it rather than silently pulling up the wrong product.
The scheme catches every single-digit error and most transpositions. It does not catch everything: swapping two adjacent digits that differ by five, such as 16 to 61, produces the same check digit. That is a known and accepted gap.
The method
The mod-10 calculation, step by step
- Write out the number without its check digit.
- Starting at the rightmost digit and moving left, multiply alternately by 3, then 1, then 3, and so on.
- Add all the products together.
- Round that total up to the next multiple of ten.
- Subtract the total from that multiple. The result is the check digit — and if the total is already a multiple of ten, the check digit is 0.
The same procedure covers GTIN-8, GTIN-12, GTIN-13, GTIN-14 and the eighteen-digit SSCC used on pallet labels. Only the length changes; because the weights are anchored at the right-hand end, they land on different positions for odd and even lengths, which is why you cannot memorise "odd positions get 3" as a universal rule.
When you need this
Practical situations
- A supplier sends a spreadsheet of GTINs. Verifying them before import catches typing errors that would otherwise become duplicate or dead listings.
- You read a number off a damaged label. If the check digit does not agree, one of the digits you read is wrong, and you know to look again rather than trusting it.
- A marketplace rejects your barcode as invalid. Nine times out of ten the check digit is the problem, not the prefix.
- You are building an ITF-14 from a GTIN-13. The indicator digit at the front changes the whole calculation, so the case code's check digit is not the same as the item's.
One caution worth repeating: a valid check digit means the number is well formed, not that it belongs to you or to any real product. Validity is arithmetic; ownership is a licence from GS1.
Questions
Frequently asked questions
Does a valid check digit mean the barcode is real?
No. It means the number is internally consistent. Whether that number is registered to a company and a product is a separate question answered by the GS1 registry.
Why do EAN-13 and UPC-A use different weight positions?
They use the same rule — weights of 3 and 1 alternating from the right — but the numbers have different lengths, so the weights fall on different positions when you count from the left.
What is an SSCC-18?
A serial shipping container code: eighteen digits identifying one specific pallet or carton, used on GS1 logistics labels. Its check digit uses the same mod-10 method.
Can the check digit be a letter?
Not for GTINs — it is always a single digit from 0 to 9. Other schemes such as ISBN-10 could end in X, but that format is long retired.
My number fails the check. What now?
Re-read the digits carefully, especially 6 and 8, 1 and 7, and 0 and 8. If the source is a printed label, scan it instead of transcribing it.
Does the ITF-14 indicator digit change the check digit?
Yes. The indicator is part of the payload, so a case of twelve and a case of twenty-four with the same product GTIN have different check digits.