How to Use the GTIN Calculator
The calculator works in two modes:
Validate: Enter a full GTIN (with check digit) to verify it's correct. The tool auto-detects whether it's GTIN-8, 12, 13, or 14 and runs the GS1 check digit algorithm.
Generate: Enter a GTIN missing its last digit, and the tool computes the correct check digit. This is useful when creating new product codes or verifying label printing.
The step-by-step visualization shows:
- Each digit paired with its weight (alternating 1 and 3, right to left)
- The product of each digit × weight
- The sum of all products
- The check digit = (10 - (sum mod 10)) mod 10
GTIN Format Guide
GS1 defines four standard GTIN lengths:
- GTIN-8 (EAN-8): 8 digits. Used for small packages where a full barcode won't fit (e.g., chewing gum packs).
- GTIN-12 (UPC-A): 12 digits. The standard barcode on products sold in the US and Canada.
- GTIN-13 (EAN-13 / ISBN-13): 13 digits. The international standard used in Europe, Asia, and for books (ISBN-13).
- GTIN-14 (ITF-14): 14 digits. Used on shipping containers and cases of products, not individual retail items.
All four formats use the exact same check digit algorithm — only the number of digits changes.
The GS1 Check Digit Algorithm
The algorithm is straightforward:
- Starting from the rightmost position (not counting the check digit), assign alternating weights of 1 and 3, moving left.
- Multiply each digit by its weight.
- Sum all the products.
- Check digit = (10 − (sum mod 10)) mod 10.
Example for UPC-A 03600029145X:
- Weights: 1,3,1,3,1,3,1,3,1,3,1
- Products: 0,9,6,0,0,0,2,27,1,12,5 = sum 62
- Check digit = (10 − (62 mod 10)) mod 10 = (10 − 2) = 8
Step-by-Step Instructions
- 1Enter a GTIN number (8, 12, 13, or 14 digits).
- 2The tool auto-detects the format (GTIN-8, UPC-A, EAN-13, or GTIN-14).
- 3In Validate mode: see if the check digit is correct.
- 4In Generate mode: enter all digits except the last to compute the check digit.
- 5View the step-by-step calculation showing weights, products, and the final sum.