Official GetUPCCode.com store — GS1-originated UPC & EAN codes, delivered by email.

Free tool

UPC check digit calculator

Type the first 11 digits of a UPC to get its check digit, or enter the full code to see if it’s valid. Also works for EAN-13, EAN-8 and GTIN-14.

How the check digit is calculated

The last digit of every UPC and EAN barcode is a check digit. It is worked out from the other digits, so a scanner can tell when a number was misread or mistyped.

Every GS1 code (UPC-A, EAN-13, EAN-8 and GTIN-14) uses the same mod 10 method. Take UPC 03600029145:

  1. Starting from the right, multiply the digits by 3, 1, 3, 1 and so on: 5×3, 4×1, 1×3, 9×1…
  2. Add the results. For this code the sum is 58.
  3. Find the next multiple of 10, which is 60.
  4. The difference is the check digit: 60 − 58 = 2. The full code is 036000291452.

If the sum is already a multiple of 10, the check digit is 0.

Why UPC codes have a check digit

People mistype numbers, and scanners sometimes misread them. The check digit catches most of those slips before they cause trouble. Without it, a single wrong digit could ring up the wrong product at the register or attach your listing to the wrong catalog entry. With it, the system can see that the number doesn’t add up and reject it.

What a check digit catches, and what it misses

The method is simple, but it’s good at its job:

  • Any single wrong digit is caught. Change one digit and the sum no longer lands on a multiple of 10.
  • Most swapped neighbors are caught. If two side-by-side digits trade places, the sum usually changes. The exception is a pair that differs by exactly 5, such as 1 and 6 or 2 and 7, which slips through.
  • Two errors can cancel out. It’s rare, but two mistakes in one number can leave the sum unchanged.

How to check a full UPC by hand

You don’t have to work out the check digit to test a code. Use all 12 digits. Multiply the 1st, 3rd, 5th, 7th, 9th and 11th digits by 3, leave the others as they are, and add everything up. If the total ends in 0, the number is well-formed.

Take 036000291452. The digits in the odd positions are 0, 6, 0, 2, 1 and 5, which add up to 14, and 14 × 3 = 42. The digits in the even positions are 3, 0, 0, 9, 4 and 2, which add up to 18. Then 42 + 18 = 60, which ends in 0, so the code is valid.

What to do when a code fails

  1. Compare it with the source. Look at the digits on your certificate, spreadsheet or label. Most failures are copying mistakes.
  2. Count the digits. A UPC-A has 12. Leading zeros often get dropped by spreadsheets, so a code that starts with 0 can lose it when opened in Excel. Format the column as text to keep it.
  3. Check the small digits. The first and last digits are printed smaller, outside the main groups, and they’re easy to miss.
  4. Ask the seller. If a code you bought still fails, ask for a replacement.

A code that passes this test is well-formed, and that’s all it proves. It doesn’t show that the number is licensed to you or that nobody else is using it. Our guide to what a UPC code is explains the rest of the number, and our barcode generator turns a valid code into print-ready images.

Check digit questions

What is a check digit?

It is the last digit of a UPC, EAN or GTIN. It is calculated from the other digits, so a scanner can catch a misread or a typo before it reaches the till.

Is the check digit the same for UPC and EAN?

Yes. UPC-A, EAN-13, EAN-8 and GTIN-14 all use the GS1 mod 10 method. A 12-digit UPC with a 0 in front is the same number as a 13-digit EAN, and it has the same check digit.

My code has a valid check digit. Can I use it on Amazon?

Not by that alone. A valid check digit only means the number is well-formed. Amazon and retailers also need the code to be assigned to your company, and a made-up number that passes the check can still be rejected or already belong to another product.

What does "wrong check digit" mean?

The last digit you typed doesn’t match the one calculated from the others. The number was probably copied wrong, so compare it with your certificate or the barcode label.

Is my code sent anywhere?

No. The calculator runs in your browser, and nothing you type is sent to us or stored.

Why does Excel change my UPC?

Excel treats a UPC as a number, so it drops leading zeros and may show long codes in scientific notation. Format the column as text before you paste your codes, or import the file and set that column to text.

Can I work out a missing digit in the middle of a code?

Yes, if only one digit is missing and you know the check digit. Try each digit from 0 to 9 and see which one makes the code valid. Don’t use this to invent a code, though. A valid number can still belong to someone else.

Need real UPC codes for your products?

A correct check digit only proves a number is well-formed. To sell on Amazon and in stores, each product needs a code that is assigned to you. Ours arrive by email, usually within 15 minutes, with a certificate, for a one-time price.

Buy UPC codes