UPC check digit calculator for a whole list (bulk, GTIN, EAN)

Paste a column of UPC, EAN, GTIN-14 or SSCC codes and see which are valid, which lost a leading zero in Excel, which have the wrong last digit, and which repeat.

Free tool · Wholesale · Shopify · Updated

1Paste your codes

Paste a column from Excel or Google Sheets. Several columns work too.
Or drop a product sheet: a Shopify product export, an Amazon inventory file or any sheet saved as CSV.

2What needs fixing

Codes checked
13
Need fixing
5
Valid as given
8
Duplicates
2
RowCode as givenStatusTypeFull codeDuplicateNote
2614141453245ValidUPC-A614141453245––
361414100731Lost leading zeroUPC-A061414100731–1 leading zero put back.
46141417523Lost leading zeroUPC-A006141417523–2 leading zeros put back.
5614141453246Wrong check digitUPC-A614141453245–Ends in 5 if the other digits are right.
66291041500213ValidEAN-136291041500213––
70614141453245ValidEAN-13 (a UPC-A with a 0 in front)0614141453245Same as row 2–
810614141453242ValidGTIN-14 case, indicator 110614141453242––
9106141411234567897ValidSSCC106141411234567897––
106.14141E+11Digits lost in Excel–––Excel showed this in scientific notation and dropped digits. Format the column as Text and export again.
110 61414 10073 1ValidUPC-A061414100731Same as row 3–
1212345Wrong length–––5 digits. Barcode numbers have 8, 12, 13, 14 or 18.
1301234558ValidUPC-E (short UPC-A)01234558–Same item as UPC-A 012345000058.
14614141000036ValidUPC-A614141000036––

Before pasting codes into Excel, format the column as Text, or the leading zeros drop again. Leave the Excel box off for a CSV you upload to Shopify or Amazon.

Want this done on your whole Shopify? We fix product lists with broken barcodes, missing zeros and duplicate items across every sales channel on your real data, tested with you.

Walk us through your product list

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.

Sources

Lines of light running into one large blue period

Walk us through one problem.

We’ll tell you what we’d fix first.

Walk us through one problem

Free. 30 minutes. A one-page note within two business days.