How to calculate a check digit
- Type the number without its last digit, for example the first 11 digits of a UPC or the first 12 of an EAN-13. The type is detected from the length.
- Read the check digit and the full code. Click Copy to use it.
- Check the working table: each digit, its weight (3 or 1), the products and the sum.
- To check an existing barcode, switch to Verify and paste the full code.
- Click Generate this barcode to turn the completed number into a printable barcode.
How the GS1 check digit is calculated
Starting from the rightmost digit of the number (not counting the check digit), multiply the digits alternately by 3 and 1. Add the products. The check digit is the amount you need to add to reach the next multiple of 10. If the sum already ends in 0, the check digit is 0.
Worked example for the UPC-A 03600029145_:
| Digit | 0 | 3 | 6 | 0 | 0 | 0 | 2 | 9 | 1 | 4 | 5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 0 | 3 | 18 | 0 | 0 | 0 | 6 | 9 | 3 | 4 | 15 |
The products add up to 58. The next multiple of 10 is 60, and 60 − 58 = 2, so the full UPC is 036000291452. The same steps work for every GS1 length; the weight next to the check digit is always 3.
Supported codes
| Code | Digits before check | Full length | Method |
|---|---|---|---|
| EAN-8 (GTIN-8) | 7 | 8 | GS1 mod 10 |
| UPC-A (GTIN-12) | 11 | 12 | GS1 mod 10 |
| UPC-E | 7 | 8 | Mod 10 on the UPC-A expansion |
| EAN-13 (GTIN-13), GLN | 12 | 13 | GS1 mod 10 |
| ISBN-13 | 12 | 13 | GS1 mod 10 |
| GTIN-14 | 13 | 14 | GS1 mod 10 |
| GSIN (shipment ID) | 16 | 17 | GS1 mod 10 |
| SSCC-18 | 17 | 18 | GS1 mod 10 |
| ISBN-10 | 9 | 10 | Mod 11 (X = 10) |
| ISSN | 7 | 8 | Mod 11 (X = 10) |
Lengths 12 and 13 can be ambiguous (12 digits is a full UPC-A or an EAN-13 without its check digit), which is why the tool has separate Calculate and Verify modes. Pick a type from the menu to override auto-detection, or choose GS1 mod 10 (any length) for internal numbering schemes that use the same algorithm.
Check digits for a specific code
Each of these pages uses the same engine with a worked example for that code: UPC check digit calculator, EAN check digit calculator, GTIN check digit calculator and ISBN check digit calculator. To check a complete code and see its issuing country, use the barcode validator.
Frequently asked questions
How do you calculate a barcode check digit?
Multiply each digit by 3 or 1, alternating from the right (the digit next to the check digit gets 3), add the results, then subtract the total from the next multiple of 10. For 03600029145 the weighted sum is 58, the next multiple of 10 is 60, so the check digit is 2.
Which barcodes use the GS1 mod 10 check digit?
All GS1 numbers do: UPC-A, UPC-E, EAN-8, EAN-13, GTIN-14, ISBN-13, ISSN barcodes (EAN-13 977), SSCC-18, GLN and GSIN. Only the length changes, and the weights always start with 3 at the right.
How is an ISBN-10 check digit different?
ISBN-10 uses modulo 11 instead of modulo 10. The nine digits are multiplied by 10, 9, 8 … 2, the products are added, and the check digit is whatever brings the total to a multiple of 11. A result of 10 is written as X.
Why does the check digit exist?
It catches typing and scanning mistakes. The mod 10 scheme detects every single-digit error and most swaps of two neighbouring digits, so a scanner or system rejects a misread number instead of charging for the wrong product.
What is the difference between Calculate and Verify?
Calculate takes the number without its last digit and works out the check digit. Verify takes the complete code and tells you whether its last digit is correct, and what it should be if not.
Can I calculate check digits for a whole list?
Yes. Switch to Bulk, paste one number per line, and download the results as CSV or copy them into a spreadsheet. Each line is detected by its length, so you can mix UPC, EAN and GTIN-14.
Does a correct check digit mean the barcode is registered?
No. Anyone can make a number with a valid check digit. Only GS1 licensing proves who owns it; use the barcode validator to see which GS1 office issued the prefix.