Skip to content

Tools

Calculate the check digit

The check digit is the last digit of a barcode. It isn't product data: it's calculated from the others so that the till can detect a reading error. Type the code of an EAN-13, EAN-8, UPC-A or GTIN-14 without that last digit and we'll work it out for you, step by step.

12 digits for an EAN-13, 7 for an EAN-8, 11 for a UPC-A or 13 for a GTIN-14.

Frequently asked questions about the check digit

What is a barcode's check digit?

It's the last digit. It says nothing about the product: it's calculated from the others so that the reader can detect whether a digit has been read or typed wrongly. Full definition in the glossary (in Spanish)

How is the check digit of an EAN-13 calculated?

Take the first 12 digits and, starting from the right, multiply them alternately by 3 and by 1. Add up the results; the check digit is what's needed to reach the next multiple of ten (if the sum already ends in 0, it's 0). For example, for 841000000000 the sum is 21 and the digit is 9.

Is it calculated the same way for EAN-8, UPC-A and GTIN-14?

Yes. It's the same method (GS1 modulo 10) for EAN-13, EAN-8, UPC-A and GTIN-14. The only difference is how many digits the code has without its last digit: 12, 7, 11 and 13.

What happens if the check digit is wrong?

The code is malformed: a reader that checks the digit will reject it or give a reading error. Before printing a code, it's worth checking the full code. Check a full code

Does the check digit say the country or the company?

No, it only serves to detect errors. The country linked to a code is in its first three digits (the GS1 prefix) and, even so, it doesn't show where the product was made. See the GS1 prefixes

Can I check many codes at once?

Yes. Paste the list or upload your Excel or CSV file in the catalogue reviewer: it checks the check digit, the length and duplicates of up to 5,000 codes, without them leaving your browser. Review a catalogue of codes

Other tools

See all the tools

Where to start with barcodes? Start here (in Spanish): short, free paths in the Academy, depending on what you're here to do.