What the calculator accepts
| You type | It is treated as | Result |
|---|---|---|
| 7 digits | EAN-8 without check digit | check digit calculated |
| 8 digits | EAN-8 (GTIN-8) | validated |
| 11 digits | UPC-A without check digit | check digit calculated |
| 12 digits | UPC-A (GTIN-12) or EAN-13 without check digit | UPC-A validated; EAN-13 check digit calculated |
| 13 digits | EAN-13 (GTIN-13) or GTIN-14 without check digit | EAN-13 validated; GTIN-14 check digit calculated |
| 14 digits | GTIN-14 (for example, in ITF-14) | validated |
| 17 digits | SSCC without check digit | check digit calculated |
| 18 digits | SSCC (logistics unit identifier) | validated |
Spaces and dashes are ignored, so you can paste a number straight from a spreadsheet or a GS1 certificate.
How the check digit is calculated
GTIN-8, GTIN-12, GTIN-13, GTIN-14 and SSCC use the same modulo-10 method:
- Start from the rightmost digit before the check digit and move left.
- Multiply that digit by 3, the next one by 1, the next by 3, and so on, alternating.
- Add all the results together.
- The check digit is the amount needed to reach the next multiple of 10. If the sum is already a multiple of 10, the check digit is 0.
Worked example: EAN-13 978020137962?
| Digit | 9 | 7 | 8 | 0 | 2 | 0 | 1 | 3 | 7 | 9 | 6 | 2 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 9 | 21 | 8 | 0 | 2 | 0 | 1 | 9 | 7 | 27 | 6 | 6 |
The products add up to 96. The next multiple of 10 is 100, so the check digit is 4 and the full number is 9780201379624.
Because the weights are counted from the right, the same rule works for every length. That is also why putting a 0 in front of a UPC-A to make an EAN-13 does not change the check digit.
What a check digit catches, and what it does not
- Catches: any single wrong digit, and most cases where two neighboring digits are swapped.
- Misses: some errors involving two digits, and swaps of neighboring digits that differ by 5 (such as 1 and 6).
- Does not prove ownership. A number with a correct check digit is only well-formed. It does not mean the number was licensed to you. See how to get a barcode.
Other barcodes and their checks
- ISBN-13 uses the same check digit method as EAN-13. The older 10-digit ISBN used a different, modulo-11 check (which is why some end in X). Read more in the ISBN barcode guide.
- Code 128 adds its own modulo-103 check character automatically.
- Code 39 has an optional modulo-43 check character that some systems require and others do not.
- QR codes use Reed-Solomon error correction, which can repair damaged areas rather than only detect them.
Frequently asked questions
What is a check digit?
A check digit is the last digit of a GTIN or SSCC. It is calculated from the preceding digits so that validation can detect any single-digit substitution and most swaps of neighboring digits.
Is the check digit the same for UPC-A and EAN-13?
Yes. An EAN-13 made by adding a leading 0 to a UPC-A has the same check digit, because the extra zero adds nothing to the weighted sum.
Does Code 128 have a check digit?
Code 128 has its own built-in checksum, a modulo-103 character that the barcode generator adds automatically and that is not printed in the human-readable text. You do not calculate it yourself. If you encode a GTIN inside a GS1-128 barcode, the GTIN still carries its normal modulo-10 check digit.
Why does my barcode generator say the number is invalid?
A wrong check digit or a missing final digit may be the cause. Enter the number here to see which digit it should be.