How is a UPC check digit calculated?
Starting from the rightmost digit, multiply digits alternately by 3 and 1 and add them up. The check digit is the amount needed to round that sum up to the next multiple of 10.
Check digit = (10 − (Weighted sum mod 10)) mod 10
Barcode lengths
| Type | Digits entered | Total digits |
|---|---|---|
| EAN-8 | 7 | 8 |
| UPC-A | 11 | 12 |
| EAN-13 | 12 | 13 |
| GTIN-14 | 13 | 14 |
Frequently asked questions
Why do barcodes have a check digit?
It catches scanning and typing errors. If one digit is wrong, the check digit will not match.
Can I make my own UPC numbers?
No. Retail barcodes must use a company prefix licensed from GS1 US.
Does this work for ISBN-13?
Yes. ISBN-13 uses the same EAN-13 method.