GTIN, UPC and EAN check digit calculator

Free · No signup · Guide approved 18 November 2026 by Nirav Italiya, founder · How we check guides

How do I calculate a UPC or EAN check digit?

Enter the digits without the last one: 11 for UPC-A, 12 for EAN-13, 7 for EAN-8 or 13 for GTIN-14. Multiply digits alternately by 3 and 1 from the right, add them up, and the check digit is what takes the total to the next multiple of 10. The calculator does this, shows each step and previews the barcode.

Check digit · UPC-A or EAN-13 without check

4

Full code: 000123456784

How it’s worked out

GS1 method
0×300×100×301×112×363×134×3125×156×3187×178×3244check

Weights alternate 3 and 1 from the right. Sum = 76; the check digit tops it up to the next multiple of 10.

Validate many codes

A correct check digit doesn’t make a code yours: marketplaces that need UPC or EAN usually want numbers licensed from GS1.

Labels sorted, listings next

Make your next catalogue in minutes

Put every new design on an AI model, in the colours you stock, without booking a shoot.

  • First 2K photo free, no card
  • Ready in about 3 minutes
  • Full commercial rights
Flat-lay photo of a sareeThe same saree on an AI model, made with DrapifyApp

How to use it

  1. Type the code without its last digit.
  2. Read the check digit and full code.
  3. See the working and the barcode preview.
  4. Paste full codes to validate many at once.

Who this is for

This calculator is for sellers and small brands who work with product numbers: completing a GTIN when a supplier gives you only the first 12 digits, checking a column of EANs before uploading a catalogue, finding the typo when a marketplace rejects a code, or building carton codes for wholesale.

It works out the check digit, shows each digit with its weight so you can follow the maths, draws a barcode preview for UPC-A and EAN-13, and validates up to 300 pasted codes at once, telling you what the last digit should be when one is wrong.

Worked example: the check digit of an EAN-13

Take the 12 data digits 400638133393. Starting from the rightmost digit, weights alternate 3, 1, 3, 1 and so on. Multiply each digit by its weight and add the results. The check digit is whatever brings the total up to the next multiple of 10.

  • Sum of products: 89.
  • Next multiple of 10: 90, so the check digit is 90 − 89 = 1.
  • Full EAN-13: 4006381333931.
  • Because weights are counted from the right, the same method works for every length. UPC-A data 03600029145 gives a sum of 58 and check digit 2, so the full code is 036000291452.
Data digits 400638133393, weights from the right
Digit400638133393
Weight131313131313
Product40018324193999

GTIN lengths and what to type

A GTIN-14 for a carton is usually built from the unit’s GTIN-13 with an indicator digit in front (1 to 8 for different packing levels), then a new check digit. Indicator 1 in front of 400638133393 gives the data 1400638133393 and check digit 8. Do not simply put a digit in front of the full EAN-13: the old check digit must be dropped and a new one calculated.

CodeFull lengthDigits to type hereTypical use
EAN-8 (GTIN-8)87Very small packs
UPC-A (GTIN-12)1211Retail items in the US and Canada
EAN-13 (GTIN-13)1312Retail items in most other countries
GTIN-141413Cartons and cases, often printed as ITF-14

What a check digit catches, and what it misses

The check digit catches every single wrong digit, which covers most typing errors. It also catches most cases where two neighbouring digits are swapped: 4006381333931 with the 9 and 3 near the end swapped becomes 4006381333391, which fails. It cannot catch a swap of neighbouring digits that differ by exactly 5, such as 1 and 6, or 0 and 5, because the 3-and-1 weighting gives the same remainder both ways. Two separate errors can also cancel out.

Worked example: using the validate box on a typo

Paste each full code on its own line. The tool strips anything that is not a digit, so codes with spaces or hyphens still work, and it checks only the lengths 8, 12, 13 and 14. Suppose the correct code is 4006381333931 but someone typed 4006381333631, with a 6 where the 9 should be. The first 12 digits now add up to 86, so the check digit should be 4, and the box reports that the last digit is wrong and shows 4006381333634 as the fix.

That “fix” is a valid-looking number, but it is not your product’s number. The mistake was the 6 in the tenth place, and the check digit was right all along. This is why the validate box is best used to find which rows of a catalogue need a second look, and the correction should come from the supplier’s sheet or your GS1 record, not from accepting the suggested last digit.

Why check digits matter

Scanners reject codes whose check digit doesn’t match, and marketplaces flag them. Checking before you print saves a batch of labels.

Valid is not the same as registered

Any number can have a correct check digit; marketplaces that need UPC or EAN usually want codes licensed from GS1.

Common mistakes

  • Typing all 13 digits into the top box, which then treats them as GTIN-14 data and adds a 14th digit. Paste complete codes into the validate box instead.
  • Letting a spreadsheet drop the leading zero of a UPC, which turns a 12-digit code into 11 digits.
  • Making up numbers that pass the check and listing them as real barcodes.
  • Turning an EAN-13 into a GTIN-14 by adding a digit in front without recalculating the check digit.
  • Fixing an invalid code by changing the last digit when the real error is earlier in the number. Check the code against the supplier’s or GS1 record first.

What this tool can’t do

  • A valid check digit does not mean the number is licensed or registered to you. Marketplaces that require GTINs may check them against GS1 data.
  • The barcode preview is drawn only for UPC-A and EAN-13. EAN-8 and GTIN-14 are calculated but not drawn.
  • It does not handle UPC-E compression or expansion, or ISBN-10.
  • The validate box checks only lengths 8, 12, 13 and 14; any other length is marked “Wrong length”.

How this guide was made: drafted with AI assistance from the tool’s own calculations and behaviour, then checked against our editorial policy and approved by the founder before publishing.

Official sources

Fees, tax rates and rules change. Confirm the current figures on the official page before you rely on a result:

Questions

How is the UPC check digit calculated?
Multiply the 11 digits alternately by 3 and 1 starting from the right, add them up, and subtract the last digit of the total from 10 (0 if it is already 0).
Can I check many codes?
Yes. Paste them one per line.
How do I calculate an EAN-13 check digit?
Multiply the first 12 digits alternately by 1 and 3, add the results, and the check digit is what brings the total up to the next multiple of 10.
What is a GTIN?
A Global Trade Item Number identifies a product. GTIN-12 is a UPC, GTIN-13 an EAN, and GTIN-14 is used on cartons.
Why does my barcode say invalid?
Usually the last digit does not match the check digit calculated from the others, often from a typo.

Related free tools

More free tools: Barcodes & QR

See all Barcodes & QR tools