EAN-13 Barcode Check Digit Calculator
Check or generate the check digit of an EAN-13 barcode.
Result
How it is calculated
The tool strips everything except digits, then works on the first 12. Starting from the left, digits in odd positions (1st, 3rd, 5th…) are multiplied by 1 and digits in even positions (2nd, 4th…) by 3. The weighted digits are added up, giving check = (10 − (sum mod 10)) mod 10. With 13 digits entered, the result compares this computed digit with your 13th digit and reports Valid or Invalid. With 12 digits entered, it reports the check digit and the complete 13-digit code. Any other length returns nothing. A valid check digit only means the code is internally consistent; it does not prove the product is registered.
Worked example
Check the code 4006381333931. Take the first 12 digits: 4 0 0 6 3 8 1 3 3 3 9 3. Odd positions (×1): 4 + 0 + 3 + 1 + 3 + 9 = 20. Even positions (×3): (0 + 6 + 8 + 3 + 3 + 3) × 3 = 23 × 3 = 69. Total: 89. 89 mod 10 = 9, and 10 − 9 = 1. The computed check digit is 1, which matches the last digit of the code, so the status is Valid.
Common mistakes
- Entering a 12-digit UPC-A code and expecting validation. With 12 digits the tool treats them as the base and computes a new check digit. To validate a UPC-A, put a 0 in front to make 13 digits.
- Typos or transposed digits in the base. Swapping two adjacent digits usually changes the check digit, so a mismatch may point to a wrongly typed code, not a wrong barcode.
- Entering 8-digit EAN-8 codes. Only 12 or 13 digits are accepted; other lengths return nothing.
- Assuming a valid result means the product exists. Only the arithmetic is checked, not registration.
- Leaving in spaces or hyphens and worrying about them. Non-digits are removed automatically, but a stray letter in place of a digit shifts every position.
About this calculator
This calculator validates or completes an EAN-13 barcode (the standard used on most retail products worldwide, and compatible with UPC-A). The check digit is computed by alternately weighting the first 12 digits by 1 and 3, summing them, and taking the amount needed to round up to the next multiple of 10.
Retailers, inventory and logistics staff, and developers building point-of-sale or warehouse systems use it to catch mistyped or corrupted barcodes before they cause scanning errors, and to generate a valid check digit when assigning a new product code. Enter a full 13-digit code to verify it, or the first 12 digits to compute the missing check digit.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)