UPC Check Digit Calculator (UPC, EAN, GTIN)
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free UPC check digit calculator. Calculate or validate the check digit for UPC-A, EAN-13, EAN-8 and GTIN-14 barcodes, with the weighted sum shown.
- Format
- 0
- Check digit
- 0
- Full code
- 0
- Weighted sum
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the UPC check digit calculator
- Enter the barcode number without its check digit to calculate it: 11 digits for UPC-A, 12 for EAN-13, 7 for EAN-8 or 13 for GTIN-14.
- Or choose "Validate a full code" and enter the complete number (12, 13, 8 or 14 digits) to check whether its check digit is correct.
- Read the results. The UPC check digit calculator shows the format, the check digit, the full code and the weighted sum used in the calculation.
Spaces and hyphens are ignored.
Barcode formats
All these formats belong to the GS1 family of Global Trade Item Numbers (GTINs):
| Format | Digits | Where it's used |
|---|---|---|
| UPC-A (GTIN-12) | 12 | Retail products in the US and Canada |
| EAN-13 (GTIN-13) | 13 | Retail products in most of the world; books (ISBN-13) |
| EAN-8 (GTIN-8) | 8 | Small packages with little space for a barcode |
| GTIN-14 | 14 | Cases and cartons in logistics |
The last digit of each is a check digit, calculated from the others so that scanners and systems can detect mistakes.
How the check digit is calculated
The same method works for all GTIN formats:
- Starting from the rightmost digit (not counting the check digit), multiply the digits alternately by 3 and 1: the rightmost by 3, the next by 1, the next by 3, and so on.
- Add the results.
- The check digit is the number that brings the total up to the next multiple of 10: (10 − (sum mod 10)) mod 10.
Example: UPC-A 03600029145?
From the right: 5×3 + 4×1 + 1×3 + 9×1 + 2×3 + 0×1 + 0×3 + 0×1 + 6×3 + 3×1 + 0×3
= 15 + 4 + 3 + 9 + 6 + 0 + 0 + 0 + 18 + 3 + 0 = 58
58 mod 10 = 8, so the check digit is 10 − 8 = 2. The full UPC is 036000291452.
Example: EAN-13 400638133393?
The weighted sum is 89, so the check digit is 10 − 9 = 1: 4006381333931.
Why "starting from the right"?
Counting from the right means the same rule works for every length. For UPC-A, it's equivalent to "multiply digits in odd positions (1st, 3rd …) by 3"; for EAN-13, it's "multiply digits in even positions by 3". Starting from the right avoids having to remember which applies to which format.
What the check digit catches
The weighted check digit catches:
- Every single-digit error, such as a 7 typed as a 1.
- Most transpositions of adjacent digits, except when the two digits differ by 5 (such as 0 and 5, or 2 and 7).
It's a quick integrity check used by scanners, point-of-sale systems and inventory software. It doesn't confirm that a code is registered or belongs to a specific product.
UPC and EAN compatibility
A UPC-A code can be turned into an EAN-13 by adding a leading 0: 036000291452 becomes 0036000291452, with the same check digit. That's why scanners worldwide can read UPC barcodes. Similarly, a GTIN-14 is often created by adding a packaging-level indicator digit in front of a product's GTIN and recalculating the check digit.
Getting real barcodes
To sell products through most retailers and marketplaces, you need GTINs licensed from GS1, the global standards organisation, or its local member organisation. GS1 assigns a company prefix, and you number your products within it. Codes bought from unofficial resellers may not be accepted by major retailers and marketplaces, because the company prefix won't match your business in GS1's database.
The UPC check digit calculator is useful for checking codes, testing systems and fixing data errors; it doesn't create officially registered barcodes. Our barcode generator creates barcode images from numbers you already have.
Books and ISBNs
Books use EAN-13 barcodes that encode the ISBN-13 (starting with 978 or 979). The check digit calculation is the same. Our ISBN validator also converts between ISBN-10 and ISBN-13.
Common uses
- Checking product data before uploading to a marketplace or retailer system.
- Fixing typos in spreadsheets of product codes.
- Testing software that reads or generates barcodes.
- Creating GTIN-14 case codes from product GTINs (with the correct indicator digit).
- Learning how check digits work.
A worked example
Maya sells handmade candles through an online marketplace and has GS1-licensed UPC codes. The marketplace rejects one of her products, so she checks the codes in her spreadsheet.
In the UPC check digit calculator with "Validate a full code", her first code, 012345678905, is valid. The rejected product's code, 012345678903, is not valid: the calculator says the check digit should be 5. She finds the typo in her spreadsheet (the code should have ended in 05, not 03), corrects it, and re-uploads the listing successfully.
Who uses a UPC check digit calculator
Online sellers and retailers use it to check product codes. Warehouse and inventory staff use it to fix data errors. Developers use it to validate barcode input in their apps. Students use it to learn about check digits.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
What the check digit can't catch
The UPC check digit catches every single-digit error and most swaps of two neighbouring digits. It misses a swap when the two digits differ by 5, such as 1 and 6 or 3 and 8, because their weighted contributions change the total by a multiple of 10. It also can't detect some combinations of two or more errors that happen to cancel each other out. For this reason, barcode scanners also check the barcode's structure and guard bars, so a misread is very rare in practice.
Leading zeros and GTIN-14
Barcode numbers can look different in different systems because of leading zeros. A 12-digit UPC-A, such as 036000291452, becomes a 13-digit EAN-13 by adding a zero in front: 0036000291452. Shipping cartons often use 14-digit GTIN-14 numbers, which can add a packaging indicator digit in front. Adding zeros at the front doesn't change the check digit, because the weights are counted from the right. That's why the UPC check digit calculator, and the GS1 method in general, works for UPC-A, EAN-13, EAN-8 and GTIN-14.
Check digits in spreadsheets
Product lists in spreadsheets often lose leading zeros, because spreadsheet programs treat barcodes as numbers. A UPC like 012345678905 can turn into 12345678905, which has only 11 digits. To avoid this, format the barcode column as text before you paste the numbers in. If you're checking a list where the zeros have been lost, add them back to make 12 digits before checking. Use the UPC check digit calculator to spot numbers that were mistyped or corrupted when the list was exported.
Before you print labels
Before sending packaging or labels to print, check every barcode number with the UPC check digit calculator, then scan a printed proof with a real barcode scanner or a scanning app. Make sure the bars are dark enough against the background, the quiet zones on either side are clear, and the barcode isn't printed too small. Retailers can reject shipments or charge fees if barcodes don't scan, so these checks are worth the few minutes they take.
Working out a check digit by hand
You can check the calculator's answer yourself. For the first 11 digits of a UPC-A, add the digits in odd positions (1st, 3rd, 5th and so on) and multiply that sum by 3. Add the digits in even positions. Add the two results together. The check digit is the amount needed to reach the next multiple of 10, or 0 if the total is already a multiple of 10. Use the UPC check digit calculator to confirm your result.
Sources and further reading
- GS1: how to calculate a check digit manually, the official method.
- Universal Product Code on Wikipedia: UPC structure and history.
- International Article Number on Wikipedia: EAN-13 and EAN-8.
Frequently asked questions
How do I calculate a UPC check digit?
Multiply the digits alternately by 3 and 1 starting from the right, add them, and find the number that brings the total to the next multiple of 10.
What is the check digit of 03600029145?
2, giving 036000291452.
What's the difference between UPC and EAN?
UPC-A has 12 digits and is used mainly in North America; EAN-13 has 13 digits and is used worldwide. A UPC becomes an EAN-13 by adding a leading 0.
Can I make up my own barcode numbers?
For selling through retailers, you need codes licensed from GS1. Made-up numbers may be rejected.
Does a valid check digit mean the product exists?
No. It only means the number is correctly formed.
Is the UPC check digit calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.