GTIN Check Digit Calculator
Calculate or verify the GS1 check digit for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, and SSCC barcode numbers.
Understanding GTIN and GS1 Check Digits
A Global Trade Item Number (GTIN) is a unique international identifier used to identify trade items, products, or services. Standard barcode formats—including GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, and SSCC-18—all rely on a final single-digit check digit to ensure data integrity and prevent scanning errors.
The GS1 Check Digit Calculation Algorithm
The official GS1 algorithm computes the check digit using a modulo 10 weighted sum. Starting from the rightmost payload digit and moving leftward, digits are multiplied by alternating weights of 3 and 1.
Step-by-step formula:
$$\text{Weighted Sum} = \sum_{i=1}^{n} (\text{Digit}_i \times \text{Weight}_i)$$
$$\text{Check Digit} = (10 - (\text{Weighted Sum} \pmod{10})) \pmod{10}$$
Supported Barcode Standards
- GTIN-12 (UPC-A): 11 data digits + 1 check digit (used primarily in North America).
- GTIN-13 (EAN-13): 12 data digits + 1 check digit (used worldwide for retail products).
- GTIN-8: 7 data digits + 1 check digit (used on small retail items).
- GTIN-14: 13 data digits + 1 check digit (used for wholesale cartons and cases).
- SSCC: 17 data digits + 1 check digit (Serial Shipping Container Code for logistics).
Frequently Asked Questions
Why is a check digit necessary on barcodes?
The check digit acts as a mathematical safeguard against typographical and scanner read errors. It detects single-digit misreads and most transposed adjacent digits.
Can I calculate check digits for UPC and EAN barcodes with this tool?
Yes. UPC-A is identical to GTIN-12, and EAN-13 is identical to GTIN-13. Both use the standard GS1 modulo 10 algorithm.
What happens if the weighted sum ends in a zero?
If the weighted sum is already a multiple of 10 (e.g. 90), the modulo calculation yields 0, making the check digit 0.