How Barcode Check Digits Work
A check digit is a redundancy check used for error detection on identification numbers. It is the final digit of a barcode, and it is calculated based on the preceding digits using a specific mathematical formula.
Why Do Barcodes Need Check Digits?
Check digits are designed to catch human errors, such as:
- Transcription errors: Typing a digit incorrectly (e.g., 5 instead of 6).
- Transposition errors: Swapping two adjacent digits (e.g., 12 instead of 21).
When a barcode is scanned or manually typed, the computer performs the check digit calculation. If the result doesn't match the last digit, the system knows the data is invalid.
Step-by-Step EAN-13 Calculation
Let's calculate the check digit for an EAN-13 number. We'll start with the first 12 digits: 400638133393.
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Digits | 4 | 0 | 0 | 6 | 3 | 8 | 1 | 3 | 3 | 3 | 9 | 3 |
| Weights | x1 | x3 | x1 | x3 | x1 | x3 | x1 | x3 | x1 | x3 | x1 | x3 |
| Product | 4 | 0 | 0 | 18 | 3 | 24 | 1 | 9 | 3 | 9 | 9 | 9 |
- Sum the products: 4 + 0 + 0 + 18 + 3 + 24 + 1 + 9 + 3 + 9 + 9 + 9 = 89.
- Find the next multiple of 10: The next multiple of 10 after 89 is 90.
- Subtract the sum: 90 - 89 = 1.
The check digit is 1. The complete EAN-13 number is 4006381333931.
What Check Digits Do Not Prove
It is important to understand that a valid check digit only proves the number is mathematically consistent. It does not prove:
- Product Existence: A valid check digit doesn't mean a product actually exists with that number.
- Authenticity: Counterfeiters can easily calculate valid check digits for fake barcodes.
- Ownership: A valid check digit does not provide legal proof of brand ownership or GS1 registration.
Need to validate a code?
Use our instant validator to check if a UPC or EAN number has a mathematically correct check digit.
Validate a UPC or EAN number