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. A full 13-digit code is verified, while the first 12 digits produce 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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The check digit catches typing slips, which makes it handy when you key codes in by hand. Because the weights are 1 and 3, any single wrong digit always changes the check digit, and so does swapping two neighbours unless they differ by exactly 5. A Valid status still says nothing about whether the code belongs to the product in your hand. Do you work with 12-digit UPC codes, and would a separate UPC-A mode help?