Skip to content
Store Standards
Store Standards

Choose a language and region

English

Other languages

Calculator

Barcode check digit calculator

Check a barcode is valid before it goes into Shopify.

Tom Beckwith

Your numbers

With or without the last digit. Spaces and hyphens are fine.

The answer

Full barcode

Check digit
Format

How the check digit works

Every EAN and UPC ends in a digit worked out from the others.

1. Take the digits from the right, not counting the check digit.
2. Multiply the first, third, fifth and so on by three. Multiply the rest by one.
3. Add it all up.
4. The check digit is whatever takes that total up to the next multiple of ten.

The weighting runs from the right. Getting that direction backwards gives you a number that looks right and fails at the till, which is why it is worth checking rather than working out by hand.

A worked example

Take the payload 03600029145, which is eleven digits and so a UPC-A waiting for its last one.

From the right: 5 times three is 15, 4 times one is 4, 1 times three is 3, 9 times one is 9, and so on down the number. The total comes to 58.

The next multiple of ten is 60, so the check digit is 2. The full barcode is 036000291452.

Which lengths mean what

Digits typed What it is treated as
7 EAN-8 payload, completed
8 Whole EAN-8, checked
11 UPC-A payload, completed
12 Whole UPC-A, checked
13 Whole EAN-13, checked
14 Whole GTIN-14, checked

Twelve and thirteen digits are each two things at once. A twelve digit number is a finished UPC-A and also an EAN-13 missing its check digit. The tool reads both as finished, because checking what you typed cannot invent a digit for a barcode that was already complete.

Why this matters at goods in

A barcode that does not scan gets typed instead, and a typed barcode is where counting errors come from. Getting the number right in the barcode field before the first delivery is far cheaper than fixing it afterwards.

If you are setting up scanning for the first time, the goods in checklist covers the order to do things in. The article on barcode types explains which barcode belongs on which product.

Questions people ask

What is a check digit?

It is the last digit of a barcode, worked out from all the ones before it. A scanner recalculates it every time it reads a label. If it does not match, the scan is rejected rather than passed on wrong.

Can I make up a barcode?

Not for retail. A barcode you invent may already belong to somebody else, and it will fail as soon as the product reaches a shop that checks. Real numbers come from GS1.

What goes in Shopify's barcode field?

The whole number printed on the product, check digit included, with no spaces. One per variant. Getting this right is what makes scanning work at goods in and at the till.

Why does a 13 digit number get checked rather than completed?

Because 13 digits is a finished EAN-13 far more often than it is a GTIN-14 waiting for a digit. Checking what you typed is the safer reading, since completing it would invent a digit for a barcode that was already done.

Does this work for QR codes?

No. A QR code is a different thing entirely and has no check digit of this kind. It also does not belong in the Shopify barcode field.

Words used on this page

Try one of these next