Barcode Check Digit Calculator

Work out the last digit of an EAN, UPC or GTIN barcode — or check that a full code is valid.

How the check digit is calculated

EAN-13, EAN-8, UPC-A, GTIN-14 and SSCC-18 all use the same GS1 method. Starting from the digit next to the check digit and working left, multiply the digits alternately by 3 and 1; add the results; the check digit is the number that brings the total up to the next multiple of ten (0 if it is already one). For example, 400638133393 gives 4×1 + 0×3 + 0×1 + 6×3 + 3×1 + 8×3 + 1×1 + 3×3 + 3×1 + 3×3 + 9×1 + 3×3 = 89 (working from the left with weights 1 and 3 for a 12-digit start), so the check digit is 1 and the full EAN-13 is 4006381333931.

Enter the digits without the check digit to calculate it, and use the digit count to identify the format: 7 digits → EAN-8, 11 → UPC-A, 12 → EAN-13, 13 → GTIN-14, 17 → SSCC-18. To verify a full code, switch to “Verify” and paste the whole number (8, 12, 13, 14 or 18 digits). Spaces and hyphens are ignored. An ISBN-13 book code is an EAN-13 starting 978 or 979, so it works here too. A correct check digit only proves the number was typed correctly: it does not prove the product is registered with GS1, and the first digits do not reliably tell you the country of manufacture. To draw the barcode, use our Barcode Generator.

Running into a technical issue or something that doesn't work right on this page? Please let us know straight away via our Contact page — that's how we find out what's broken and get it fixed.