UPC Check Digit Calculator
Type a barcode number and the whole weighting table appears, not just the last digit: each payload digit with the 3 or 1 it is multiplied by, each product, the weighted sum, the next multiple of ten and the digit that closes the gap. The eleven digits 03600029145 weight to 58, the next multiple of ten is 60, so the check digit is 2 and the GTIN-12 is 036000291452, which is the pack of Wrigley's Juicy Fruit scanned at Marsh Supermarket in Troy, Ohio on 26 June 1974. Compute mode takes a number without its check digit; validate mode takes a whole code and says whether the last digit is the one the others produce, so 96385074 comes back consistent with a weighted sum of 86. All four GS1 lengths are here and each is weighted correctly for its own length: GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14 (ITF-14). The 3s and 1s are counted from the right, which is why a GTIN-13 payload such as the one in 5449000000996 starts on 1 while a GTIN-12 payload starts on 3. The three odd payloads share one pattern and GTIN-13 is the exception, so a weight list anchored on the left instead of the right is right for GTIN-8, GTIN-12 and GTIN-14 and wrong for every EAN-13. Leading zeros are kept exactly as typed, so 036000291452 is never quietly read as 36000291452, and padding it out to 00036000291452 leaves the check digit 2 untouched. Spaces and hyphens are read as separators and the page says what it skipped. Up to 60 characters, nothing is uploaded, no account is asked for, and the only thing kept is your last entry in this browser.
payload 0 3 6 0 0 0 2 9 1 4 5 weight 3 1 3 1 3 1 3 1 3 1 3 product 0 3 18 0 0 0 6 9 3 4 15 weighted sum 58 next multiple of ten 60 check digit 2 full GTIN-12 036000291452
Weighted sum 58, next multiple of ten 60, check digit 2. The full GTIN-12 is 036000291452.
Method: each payload digit is multiplied by 3 or 1, alternating from the right so the rightmost payload digit always takes the 3. The products are added, and the check digit is what takes that sum up to the next multiple of ten. Leading zeros count like any other digit.
How each length weights its digits
The 3s and 1s are counted from the right, so the rightmost digit before the check digit always takes a 3 and the four lengths do not share one pattern. Choose an example to run it through the table above.
| Format | Also called | Digits | Weights over the payload, left to right | Example |
|---|---|---|---|---|
| GTIN-8 | EAN-8 | 8 | 3 1 3 1 3 1 3 | |
| GTIN-12 | UPC-A | 12 | 3 1 3 1 3 1 3 1 3 1 3 | |
| GTIN-13 | EAN-13 | 13 | 1 3 1 3 1 3 1 3 1 3 1 3 | |
| GTIN-14 | ITF-14 | 14 | 3 1 3 1 3 1 3 1 3 1 3 1 3 |
- GTIN-8 Small packs, where a thirteen-digit symbol will not fit. Example 96385074: The worked EAN-8 that runs through the published descriptions of the symbology.
- GTIN-12 Retail in the United States and Canada. Example 036000291452: A pack of Wrigley's Juicy Fruit: the first product scanned at a checkout, at Marsh Supermarket in Troy, Ohio, on 26 June 1974.
- GTIN-13 Retail in the rest of the world, and every ISBN, which sits in the 978 and 979 ranges. Example 5449000000996: A 330 ml can of Coca-Cola.
- GTIN-14 Cases and cartons, which are not scanned at a checkout. Example 10036000291459: The Juicy Fruit pack above, as a case: packaging indicator 1, then its GTIN-13 digits, then a fresh check digit.
Compute mode takes the number without its check digit and works the digit out; validate mode takes the whole code and says whether the digit on the end is the one those digits produce. Spaces and hyphens are read as separators, so a number written 0-36000-29145 is read the same as 03600029145, and the line under the result says what was skipped. Leading zeros are kept exactly as typed, which is why the box takes text and never a number. Up to 60 characters, which is room for 14 digits and the separators people write them with; a longer paste is refused with a message rather than cut down to a different number. Your entry is kept in this browser so the page opens where you left it, and it goes nowhere else.
Common questions
- How is a UPC check digit calculated?
- Take the number without its check digit, multiply each digit by 3 or 1 alternating from the right so that the rightmost of those digits takes the 3, add the products, and the check digit is whatever takes that sum up to the next multiple of ten. For the UPC-A payload 03600029145 the products are 0, 3, 18, 0, 0, 0, 6, 9, 3, 4 and 15, which add to 58. The next multiple of ten is 60, so the check digit is 2 and the full GTIN-12 is 036000291452. This page prints that table for whatever you type, so the arithmetic can be read off and checked by hand.
- Why does EAN-13 weight its digits differently from UPC-A?
- Because the weights are counted from the right, not from the left, and the two have different payload lengths. A GTIN-12 (UPC-A) has 11 digits before the check digit, an odd number, so the pattern reads 3 1 3 1 3 1 3 1 3 1 3 from the left. A GTIN-13 (EAN-13) has 12, an even number, so the same rule reads 1 3 1 3 1 3 1 3 1 3 1 3. GTIN-8 (EAN-8) has 7 and GTIN-14 (ITF-14) has 13, both odd, so both start on 3. That is the single commonest way a check digit tool gets it wrong: the three odd lengths share a pattern, GTIN-13 is the one that does not, and a weight list anchored on the left rather than the right gets exactly that length wrong. Weighting 978014300723 from the left gives 90 and a check digit of 0; weighted properly it gives 86 and a check digit of 4. The table on this page shows the weights for each length beside a real code of that length.
- Does a correct check digit mean the barcode is real?
- No. It means the digits are internally consistent with each other, which is all arithmetic can tell you. Whether the number has been issued to a company, is in use, or belongs on the item in front of you is not knowable from the digits, and this page never says otherwise. What the check digit is good at is catching mistakes in transit: any single wrong digit is always caught, and so is almost every swap of two neighbouring digits. The exception is worth knowing. Swapping neighbours moves the weighted sum by twice their difference, so a swap of digits five apart is invisible: 5449000000996 and 5494000000996 both pass, with weighted sums of 84 and 74 and the same check digit 6.
- Do leading zeros matter?
- They are part of the number, so yes. 036000291452 and 36000291452 are different codes of different lengths, and anything that reads the entry as a number rather than as text loses that first zero before the arithmetic starts. This page keeps every zero exactly as typed. It also means a GTIN can be padded: put the UPC-A 036000291452 into 13 digits as 0036000291452 or into 14 as 00036000291452 and the check digit is still 2, because the added zeros contribute nothing to the weighted sum and the padding keeps every other digit on the same weight.
- My code is 8 digits. Is it an EAN-8 or a UPC-E?
- Either is possible, and the difference matters. 96385074 is a GTIN-8: its first 7 digits weight to 86, so the check digit is 4 and it validates. A UPC-E is a different thing that also prints 8 digits: it is a zero-suppressed UPC-A, it begins 0 or 1, and its check digit is the one belonging to the 12-digit UPC-A it expands to, not one computed from the 8 digits on the label. So when an 8-digit code here starts with 0 or 1, the page says so under the result instead of letting the GTIN-8 answer stand in for a UPC-E answer.
- Can it do the GTIN-14 case code on a carton?
- Yes. A GTIN-14 is 13 payload digits weighted 3 1 3 1 3 1 3 1 3 1 3 1 3 plus a check digit, and it is usually printed as an ITF-14. A case code is built from the item code: a packaging indicator of 1 to 8, then the GTIN-13 digits of the item without its check digit, then a fresh check digit for the new number. Take the Juicy Fruit pack, 036000291452, write it as the GTIN-13 payload 003600029145, put a 1 in front, and the 13 digits 1003600029145 weight to 61, so the case code is 10036000291459.
- What about an 18-digit SSCC, or a very long paste?
- An SSCC is 18 digits and uses this same modulo 10 method over a longer number, but this page covers the four GTIN lengths only, so it names the SSCC in the message rather than answering with the wrong format. The box reads up to 60 characters, which is room for 14 digits and the spaces and hyphens people write them with. A longer paste is refused with a message that says how many characters arrived, because silently cutting a paste to length would hand back a confident answer for a different number.
Exact GS1 modulo 10 arithmetic for GTIN-8, 12, 13 and 14, with every weight and product printed so you can check it by hand. Leading zeros are kept because they are part of the number. A correct check digit means the digits are internally consistent: it says nothing about whether the code is assigned, in use, or on the item in front of you.