Barcode Check Digit Calculator (UPC, EAN)
Retail barcodes — EAN-13, UPC-A and EAN-8 — end with a single check digit computed from all the digits before it using the GS1 modulo-10 algorithm. Starting from the rightmost data digit, digits are weighted alternately by 3 and 1, the weighted values are summed, and the check digit is whatever brings that sum up to the next multiple of ten. This tool works both ways: type the data digits (12 for EAN-13, 11 for UPC-A, 7 for EAN-8) and it returns the check digit and the complete code, or paste a full barcode and it confirms whether the printed check digit is correct. Non-digit characters such as spaces and hyphens are ignored. Everything runs locally in your browser — nothing is uploaded.
Enter the data digits to compute the check digit, or the full code to verify it. Spaces and hyphens are ignored.
How to use
- Pick the barcode format: EAN-13, UPC-A or EAN-8.
- Enter the data digits without the check digit to calculate it, or the full code to verify it.
- Read the check digit and copy the complete code (its check digit is highlighted).
- Try EAN-13 data 400638133393 — the check digit is 1, giving 4006381333931.
Frequently asked questions
- How is the check digit calculated?
- Using the GS1 modulo-10 method: from the rightmost data digit, multiply digits alternately by 3 and 1, add the products, then the check digit is (10 − sum mod 10) mod 10. EAN-13, UPC-A and EAN-8 all share this algorithm.
- What is the difference between the formats?
- EAN-13 is a 13-digit code (12 data + 1 check) used worldwide; UPC-A is the 12-digit North American code (11 data + 1 check); EAN-8 is a compact 8-digit code (7 data + 1 check) for small packages.
- Does this validate ISBN barcodes?
- Yes for the barcode itself — a 13-digit ISBN printed as a barcode is an EAN-13 and uses this exact check digit. Note the older 10-digit ISBN uses a different modulo-11 scheme, so use an ISBN-specific tool for those.
Guides on this topic
Related tools
Barcode Generator
Make an EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14 barcode and download it as SVG or PNG. Runs in your browser.
ISBN Validator (ISBN-10 / ISBN-13)
Validate ISBN-10 and ISBN-13 checksums and convert between the two formats. Hyphens and spaces are handled.
BMI Calculator
Calculate Body Mass Index from height and weight, with a healthy range.
IBAN Validator
Validate an International Bank Account Number — checks country code, length, and the mod-97 checksum. Supports 75+ countries.
Credit Card Validator (Luhn + Brand)
Validate a card number with the Luhn checksum, detect brand (Visa/MC/Amex/etc), and check expected length. Local, no network.
Percentage Calculator
Work out percentages, what-percent, and percent change in one place.