How do you calculate a UPC check digit?
Multiply the digits by 3 and 1 in turn, starting with 3 on the digit next to the check digit, add the results, and subtract the total from the next multiple of 10. This is the GS1 mod-10 method, and it is the same for UPC-A, EAN-13, GTIN-14 and SSCC.
Check digit = (10 − (sum of digits × 3, 1, 3, 1 … from the right) mod 10) mod 10
Example: the first 11 digits are 01234567890.
- From the right: 0×3, 9×1, 8×3, 7×1, 6×3, 5×1, 4×3, 3×1, 2×3, 1×1, 0×3
- Sum: 0 + 9 + 24 + 7 + 18 + 5 + 12 + 3 + 6 + 1 + 0 = 85
- Next multiple of 10 is 90, and 90 − 85 = 5
- Full UPC: 012345678905
How do I calculate a UPC check digit in Excel?
Put the 11-digit start of the UPC in A2 and use this formula. The TEXT part puts back any leading zeros Excel removed.
=MOD(10-MOD(SUMPRODUCT(--MID(TEXT(A2,"00000000000"),{1,3,5,7,9,11},1))*3+SUMPRODUCT(--MID(TEXT(A2,"00000000000"),{2,4,6,8,10},1)),10),10)
To restore zeros on full 12-digit UPCs, use =TEXT(A2,"000000000000") in a new column. Format the column as Text before you paste codes in, or Excel drops the zeros again.
Excel keeps 15 significant digits, so an 18-digit SSCC typed as a number loses its last digits for good. Paste the whole column into the tool above to fix a list in one pass.
How do you make a case code (GTIN-14) from a UPC?
Put an indicator digit from 1 to 8 in front of the first 12 digits of the 13-digit form, then work out a new check digit. GS1 US uses 1 to 8 for packaging levels and keeps 9 for variable measure items.
Case GTIN-14 = indicator + first 12 digits of (0 + UPC) + new check digit
Example: UPC 012345678905 with indicator 1.
- 13-digit form: 0012345678905
- First 12 digits: 001234567890
- With the indicator: 1001234567890
- New check digit 2, so the case code is 10012345678902
Tick “Also make case codes” in the tool to do this for every code on the list. Each packaging level needs its own GTIN.
Which barcode numbers does it check?
These GS1 keys, sorted by length:
- UPC-E: 8 digits starting with 0, a short form of a UPC-A
- GTIN-8 (EAN-8): 8 digits
- UPC-A (GTIN-12): 12 digits
- EAN-13 (GTIN-13): 13 digits
- GTIN-14 (case code, ITF-14): 14 digits
- SSCC (pallet label): 18 digits
GS1 US says systems should store any GTIN as 14 digits, right-justified and zero-filled. The tool compares codes in that form, so 12345678905, 012345678905 and 0012345678905 count as the same product. A UPC-E is expanded to its UPC-A first, so 01234558 matches 012345000058.
Barcodes on the shelf are one part of keeping a product list right. Our field guide on barcode inventory for a small warehouse covers the rest.
Questions
Is my list uploaded anywhere?
No. The codes are checked by your browser on your computer, and closing the tab clears them.
Does a valid check digit mean the UPC is registered?
It means the number was put together correctly. Who owns the number is a separate check, done in Verified by GS1.
Why does my 11-digit UPC say “Lost leading zero”?
UPCs that start with 0 lose that zero when Excel reads them as numbers. The tool puts the zero back when the 12-digit result has a valid check digit.
What is a UPC-E?
An 8-digit UPC that starts with 0 and leaves out a run of zeros from a UPC-A. Its last digit is the check digit of the full UPC-A, and the tool shows that UPC-A next to it.
Why did my SSCC or long code end in zeros?
Excel stores 15 significant digits and turns the rest into zeros. Export the column as Text from the original system to get the real digits back.
