Product labels

How a UPC check digit is calculated

A UPC-A check digit is calculated from the first 11 digits. For 03600029145, the check digit is 2, so the full code is 036000291452.

Number the 11 digits from the left, starting at 1. Multiply the odd positions by 3, add the even positions, and take the last digit of that total. The check digit is the amount that brings that last digit to 0.

Check digit for 03600029145
StepValue
Odd positions, left to right0 + 6 + 0 + 2 + 1 + 5 = 14
Odd positions times 342
Even positions3 + 0 + 0 + 9 + 4 = 16
Total58
Last digit of the total8
Check digit2
Full code036000291452

What the digit does and does not prove

Changing the last digit to 3 makes 036000291453 fail the check. A code that passes can still be the wrong product, a code assigned to someone else, or a number a spreadsheet shortened. The calculator rejects letters, the wrong length, and scientific notation instead of guessing the missing zeros.

GS1 publishes a check-digit calculator for the same arithmetic. Matching that result means the digit is consistent. It does not create a company prefix or a product registration.

Keep the code as text

Store the 12 digits as text in a CSV. A numeric cell can turn a long code into scientific notation or drop the opening zero, and the label will then encode a different number. Import errors should point at the original row rather than silently repairing it.

Sources and tools

Common questions

Why was my code rejected?

Check the length, the digits, and the final check digit. A spreadsheet may have removed a leading zero.

Can one UPC cover two products?

Do not assume that. Follow the issuer’s rules for variations. Printing another label for the same product is a different job from assigning the code to a new product.