What Is a Check Digit?
A check digit is a single digit appended to a code to detect transcription errors. It's calculated from the preceding digits using a mathematical formula, enabling automated validation systems to catch common mistakes: transposed digits, dropped digits, or accidental insertions.
Check digits appear throughout global commerce and finance. You'll find them in:
- Bank account numbers and wire transfers
- ISBN and ISSN publication identifiers
- Credit card numbers (Luhn algorithm)
- Product barcodes under GS1 standards
- International shipping container codes
When a barcode is scanned, the system recalculates the check digit from the first digits. If the result doesn't match the final digit, the scan is rejected—preventing mislabeled items from entering stock.
Understanding GTIN Standards
GTIN—Global Trade Item Number—is the universal standard for product identification, maintained by GS1 (the international standards organization). Different GTIN formats serve different supply chain tiers:
- GTIN-8 (EAN-8): 7 digits + check digit; compact format for small items
- GTIN-12 (UPC-A): 11 digits + check digit; dominant in North American retail
- GTIN-13 (EAN-13): 12 digits + check digit; standard across Europe, Asia, and most international markets
- GTIN-14 (ITF-14): 13 digits + check digit; identifies shipping cases and multipacks
- GSIN: 16 digits + check digit; tracks shipments globally
- SSCC: 17 digits + check digit; identifies individual shipping containers
Each format includes a country code (the first 2–3 digits), identifying where the manufacturer is registered—not necessarily where the product originates.
The Modulo 10 Check Digit Algorithm
The check digit is calculated by weighting alternate positions, summing results, and deriving the final digit from the nearest multiple of 10. Here's the procedure:
Step 1: Sum all digits in even positions and multiply by 3
Even Sum = (d₂ + d₄ + d₆ + ...) × 3
Step 2: Sum all digits in odd positions
Odd Sum = d₁ + d₃ + d₅ + ...
Step 3: Add the two sums
Total = Even Sum + Odd Sum
Step 4: Subtract from the next highest multiple of 10
Check Digit = 10 − (Total mod 10)
If result = 10, use 0
d₁, d₂, d₃...— Individual digits of the code (numbered from left to right)Even Sum— Product of 3 and the sum of digits at even positions (2, 4, 6, etc.)Odd Sum— Sum of digits at odd positions (1, 3, 5, etc.)Check Digit— The final digit computed to validate the complete barcode
Common Pitfalls When Calculating or Verifying Check Digits
Avoid these frequent mistakes when working with GTIN codes:
- Confusing position numbering — Positions are always counted left-to-right, starting at 1. The check digit itself is never included in the calculation—only the preceding digits factor into the formula. Double-check whether your code includes leading zeros; they count as valid digits.
- Using the wrong format — GTIN-12 and GTIN-13 have different position weights because they're different lengths. Always identify your barcode type first (usually printed alongside the barcode or in your product master data) before calculating. A misidentified format will yield an incorrect check digit every time.
- Forgetting leading zeros in calculations — Zeros at the start of a code are mathematically active—they contribute to the weighted sum. Many calculators or manual entries strip leading zeros, causing validation failures downstream. Preserve all digits, especially when copying codes between systems.
- Assuming one algorithm works everywhere — While GS1 uses modulo 10 consistently, ISBN uses modulo 11, and credit cards use Luhn (a variant). Verify which algorithm applies to your identifier type before coding or troubleshooting verification failures.
Step-by-Step Example: GTIN-12 Barcode
Let's calculate the check digit for the code 11234556780 (11 digits; GTIN-12 format):
Step 1: Identify even-position digits (2, 4, 6, 8, 10)
Positions: 1 2 3 4 5 6 7 8 9 10 11
Digits: 1 1 2 3 4 5 5 6 7 8 0
Even: 1 3 5 6 8
Even Sum = 1 + 3 + 5 + 6 + 8 = 23
Multiply by 3: 23 × 3 = 69
Step 2: Sum odd-position digits (1, 3, 5, 7, 9, 11)
Odd digits: 1, 2, 4, 5, 7, 0
Odd Sum = 1 + 2 + 4 + 5 + 7 + 0 = 19
Step 3: Add the sums
Total = 69 + 19 = 88
Step 4: Calculate check digit
Next multiple of 10 = 90
Check Digit = 90 − 88 = 2
Complete GTIN-12: 112345567802