Check digit calculator

Paste a UPC, EAN, GTIN-14, SSCC or ISBN. Leave the last digit off to calculate it, or include it to verify it. Then press Step through to watch the arithmetic.

✗ Invalid as a 12-digit number: the check digit should be 0, not 3.

If these 12 digits are a body without its check digit, the EAN-13 / GTIN-13 check digit would be 1 → 4006381333931.

Watch the maths

Digit40063813339
× weight31313131313
= product1200698339327

Sum = 80. Round up to the next multiple of 10 (80) and subtract: 80 − 80 = 0.

Weights alternate 3 and 1 starting from the digit right next to the check digit, which is why the same rule works for every GTIN length. The weighting catches every single-digit typo and most swaps of two neighbouring digits.

Lengths it understands

TypeDigits without checkFull length
EAN-8 / GTIN-878
UPC-A / GTIN-121112
EAN-13 / GTIN-13, ISBN-131213
ITF-14 / GTIN-141314
SSCC (pallet code)1718
ISBN-10910

12 and 13 digits are ambiguous (a full UPC-A or an EAN-13 body?), so the calculator shows both readings. Ready to draw it? Open the barcode generator; it runs the same check automatically.

Questions

How do I calculate a UPC check digit?

Take the first 11 digits. Multiply the 1st, 3rd, 5th… digits by 3 and the others by 1, add everything up, and the check digit is the amount needed to reach the next multiple of 10 (0 if the sum already is one).

Is the EAN-13 check digit calculated the same way?

Yes. All GTINs (8, 12, 13 and 14 digits) and the 18-digit SSCC use the same GS1 modulo-10 rule, with weights 3 and 1 alternating from the right.

How is the ISBN-10 check digit different?

ISBN-10 uses weights 10 down to 2 and modulus 11. A result of 10 is written as X. When converted to ISBN-13 (prefix 978), the check digit is recalculated with the GS1 rule.

Why do barcodes have a check digit at all?

It lets a scanner or a person typing the number detect mistakes. The GS1 scheme catches every single wrong digit and most swaps of two adjacent digits.