If you have ever uploaded a product feed to Amazon, Google Merchant Center or Shopify and been rejected with "invalid GTIN," the culprit is almost always the check digit — the last digit of the barcode. It is not random: it is calculated from all the other digits, and if it does not match, the platform rejects the code.
Here is exactly how the check digit works, with a worked example you can follow by hand.
What is a GTIN check digit?
GTIN (Global Trade Item Number) is the umbrella term for the barcodes on products: GTIN-8, UPC-A (12 digits), EAN-13 (13 digits) and GTIN-14. The final digit of every one of them is a check digit computed with the GS1 Mod-10 algorithm. Its job is to catch typos: change one digit and the check digit almost always stops matching.
The GS1 Mod-10 algorithm, step by step






