Barcodes & labels

EAN and UPC check digit calculator

Type a barcode number without its last digit to get the check digit, or type the whole number to see whether it’s right. Paste a column to check hundreds at once.

In: NumbersOut: Result · CSV

Type a number

Nothing uploaded · Works offline · Check it yourself

Or check a whole list

Got the right number? Make the barcode with the barcode generator.

Something not working? Report a problem (opens your email app). Please don’t attach your file.

What a check digit is for

The last digit of every EAN, UPC, GTIN-14 and SSCC number is a check digit, calculated from the digits before it. When a scanner reads a barcode, it does the same sum; if the answer doesn’t match the last digit, it knows the read was wrong and tries again. The same check catches typing mistakes: a single wrong digit, and most pairs of swapped neighboring digits, change the result.

The calculation

All of these numbers use the same method, from GS1:

  1. Starting from the rightmost digit (not counting the check digit), multiply the digits by 3, 1, 3, 1 … alternately.
  2. Add up the results.
  3. The check digit is what you must add to reach the next multiple of 10. If the total is already a multiple of 10, it is 0.

Because the weights start from the right, the same rule works for every length. The calculator shows the full working for whatever you type.

Which lengths are which

GS1 number lengths
TypeDigits without check digitFull lengthUsed for
EAN-8 (GTIN-8)78Very small packs
UPC-A (GTIN-12)1112Retail products in the US and Canada
EAN-13 (GTIN-13)1213Retail products elsewhere; books (ISBN-13)
GTIN-14 (ITF-14)1314Cartons and cases
SSCC1718Shipping containers and pallets (make the barcode)

Some lengths could be either kind: 12 digits may be a full UPC-A or an EAN-13 without its check digit, and 13 digits may be a full EAN-13 or a GTIN-14 without its check digit. The calculator shows both readings, so you can pick the one you meant.

When the check digit is wrong

A wrong check digit almost always means a different digit is wrong — mistyped, or swapped with its neighbor. Simply changing the last digit to the “right” one makes the number pass the check, but it may now be a different product’s number. Go back to the source, such as your GS1 account or the supplier’s list, before changing it.

From number to barcode

Once the number is right, make the barcode with the barcode generator, the EAN-13 generator or the UPC generator. They work out or check the digit too, and for a whole list the bulk barcode generator checks every row.

Worked examples

Check digits for one number of each length
You typeRead asCheck digitFull number
9638507EAN-8496385074
03600029145UPC-A2036000291452
400638133393EAN-1314006381333931
1540014128876GTIN-14315400141288763
10614141123456789SSCC7106141411234567897

What the check digit catches — and what it doesn’t

The 3-and-1 weighting catches every single wrong digit. It also catches most swaps of two neighboring digits, but not all: swapping two neighbors changes the total by twice their difference, so a swap of digits that differ by exactly 5 — 0 and 5, 1 and 6, 2 and 7, 3 and 8, 4 and 9 — gives the same check digit and slips through. Two separate mistakes can also cancel each other out. A number that passes is very likely typed correctly, but not certainly.

Why numbers fail the check

  • Excel dropped a leading zero. The UPC 036000291452 becomes 36000291452, which is 11 digits, so it is read as a different kind of number. Format the column as Text and paste the codes again; the bulk generator spots and fixes this for whole lists.
  • Two digits were swapped while typing.
  • A digit was misread from a printed or handwritten list: 1 and 7, 3 and 8, 5 and 6 are easy to confuse.
  • The wrong column was copied — a SKU, ASIN or price instead of the GTIN.

How your data stays private

The calculation runs in this page, in your browser. The numbers you type or paste are never sent anywhere.

What this tool can’t do

  • Tell you who owns a number. A correct check digit only means the number is well formed, not that it is registered. GS1’s own lookup shows the company a number belongs to.
  • Check ISBN-10 or other systems. ISBN-10, IMEI and credit card numbers use different check methods.
  • Lists over 5,000 numbers. Check longer lists in parts.

Frequently asked questions

How do I calculate an EAN-13 check digit?

Multiply the first 12 digits by 1 and 3 alternately, add the results, and take the amount needed to reach the next multiple of 10. The calculator does this and shows the working.

Is the UPC check digit calculated the same way?

Yes. EAN-8, UPC-A, EAN-13, GTIN-14 and SSCC all use the same weights of 3 and 1, counted from the right.

My barcode number fails the check. Can I just change the last digit?

Only if you are sure every other digit is right. Usually another digit was mistyped, so check the source first.

Does a valid check digit mean the barcode is registered?

No. It only means the number is well formed. GS1’s lookup shows which company a number is licensed to.

Can I check a whole column of numbers?

Yes. Paste them into “Check a whole list”, one per line, and download the results as a CSV.