How to calculate a GS1 check digit
- 1
Paste your number
Enter the digits without the check digit (e.g. 11 for UPC-A or 12 for EAN-13) to calculate it, or paste the full number to check if it’s valid.
- 2
Pick a format or leave on Auto
Auto detects EAN-8, UPC-A, EAN-13, GTIN-14 and SSCC-18 by length. Switch tabs if you’re checking a 12-digit EAN-13 payload vs a full UPC-A.
- 3
Check the step-by-step math
Every digit’s ×3 or ×1 weight, the weighted sum and the final check digit update live as you type.
- 4
Copy, export or draw the barcode
Copy the completed number, export a bulk CSV, or click through to generate a print-ready barcode immediately.
Supported GS1 barcode formats
Every standard GS1 identification number uses the same Modulo 10 check digit algorithm, regardless of length:
| Format | Digits without check | Full length | Used for |
|---|---|---|---|
| EAN-13 (GTIN-13) | 12 | 13 | Retail products worldwide and ISBN-13 books |
| UPC-A (GTIN-12) | 11 | 12 | Retail products in the US and Canada |
| EAN-8 (GTIN-8) | 7 | 8 | Small packages with limited print space |
| GTIN-14 (ITF-14) | 13 | 14 | Outer shipping cartons and trade cases |
| GLN | 12 | 13 | Global Location Numbers for warehouses and EDI |
| SSCC-18 | 17 | 18 | Serial Shipping Container Codes on pallets |
How the GS1 Mod-10 check digit formula works
To calculate a GS1 check digit, multiply each digit alternately by 3 and 1 starting from the right, sum the results, and find how much you need to reach the next multiple of 10.
- Take all digits except the check digit.
- Starting from the rightmost digit and moving left, multiply alternating digits by 3 and 1 (rightmost × 3, next × 1, next × 3, and so on).
- Add all the products together.
- Subtract the sum from the nearest equal or higher multiple of 10. That remainder (0 to 9) is the check digit.
Worked example (EAN-13 590123412345): from left to right, the 12 weights are 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3. That gives 5+27+0+3+2+9+4+3+2+9+4+15 = 83. The next multiple of 10 is 90, so 90 − 83 = 7, making the complete EAN-13 5901234123457.
Because you always start weighting with 3 on the right, odd-length payloads (11-digit UPC-A, 13-digit GTIN-14, 17-digit SSCC-18) start with ×3 on the left, while even-length payloads (12-digit EAN-13) start with ×1 on the left.
Excel and Google Sheets check digit formulas
Format your barcode column as Text first so Excel doesn’t strip leading zeros or turn 13-digit numbers into scientific notation. With your number (without the check digit) in cell A2:
- EAN-13 (12 digits in A2):
=MOD(10-MOD(SUMPRODUCT(--MID(A2,ROW($1:$12),1),{1;3;1;3;1;3;1;3;1;3;1;3}),10),10) - UPC-A (11 digits in A2):
=MOD(10-MOD(SUMPRODUCT(--MID(A2,ROW($1:$11),1),{3;1;3;1;3;1;3;1;3;1;3}),10),10)
Don’t want to fight spreadsheet formulas? Switch the tool above to Bulk list, paste up to 1,000 rows straight from Excel or Google Sheets, and copy the completed column back in one click.
From check digits to print-ready barcodes
A valid check digit only proves the math is right; for retail products sold in shops or on Amazon, the prefix itself still has to be licensed from GS1. Once your numbers are verified, generate single vector barcodes with our barcode generator, create up to 5,000 files in a ZIP with the bulk barcode generator, or lay them straight onto Avery sheets and thermal rolls with the barcode label generator.