Skip to main content

UPC, EAN and GTIN check digit calculator

The check digit is the last digit of a barcode number, worked out from the others so scanners and marketplaces catch a typo. Paste one UPC or EAN to check it or add it, or a whole column to check them all and get the fixed code for each wrong one.

The last digit of a barcode number is a check digit, worked out from the others so a typo gets caught. Paste one code to check it, or a whole column to check them all.

Paste rows, or drop a CSV here, or
UPC-A, EAN-13, EAN-8 and GTIN-14, or any of them one digit short. A product export with a barcode column works as it is; nothing is uploaded.

How it works, on the UPC-A 03600029145

2

GTIN-12 (UPC-A)

One digit short: check digit added.

036000291452

Full code: 036000291452

A matching check digit means the number is well formed. It doesn't prove the code was licensed from GS1; look it up in Verified by GS1 for that.

Digit036000291452
× weight31313131313
= 0318000693415

Sum = 58. The next multiple of 10 is 60, so the check digit is 60 − 58 = 2.

Format
GTIN-12 (UPC-A)
As EAN-13
0036000291452
As GTIN-14 (for feeds)
00036000291452
Prefix issued by
GS1 US (United States and Canada)

How to read your number

A check digit is the last digit of a UPC, EAN or other GTIN barcode, calculated from the digits before it so scanners and feeds can catch a typo. For the UPC 03600029145, the digits in odd positions from the left (0, 6, 0, 2, 1, 5) add to 14 and are tripled to 42; the even ones (3, 0, 0, 9, 4) add to 16. 42 + 16 = 58, and the next multiple of 10 is 60, so the check digit is 2 and the full UPC is 036000291452.

Why it matters

Google Shopping, Amazon and most retailers validate the check digit on every GTIN you submit. A single mistyped digit gets a product disapproved or listed without the identifier, which hurts how it ranks and where it shows. Checking codes before they go into a feed catches typos while they're cheap to fix.

Automations

Check your UPC on a schedule

Describe the job once. Replo runs it on your data from Shopify, Google Drive and Slack and posts what needs your attention.

Formula

Check digit = (10 − (sum of digits × weights) mod 10) mod 10, with weights 3, 1, 3, 1… from the rightmost digit before the check digit

The same rule covers GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14. Because the weights start from the right, a UPC-A and the EAN-13 made by adding a leading zero share the same check digit.

Other ways to calculate UPC, EAN and GTIN check digit

UPC-A (12 digits)
odd positions × 3 + even positions × 1, counting from the left
North American retail barcodes. Positions 1, 3, 5… from the left get weight 3.
EAN-13 (13 digits)
odd positions × 1 + even positions × 3, counting from the left
Barcodes issued outside North America, and books (ISBN-13). The weights look flipped versus UPC only because the code is one digit longer.
GTIN-14 (14 digits)
weights 3, 1, 3… from the left
Cases and cartons (ITF-14). The first digit is the packaging level indicator.
Validate a full code
sum of all digits × weights, including the check digit with weight 1, is a multiple of 10
Checking a code someone sent you, without separating out the last digit.

What is a check digit?

A check digit is the last digit of a barcode number, worked out from the digits before it so that scanners and software can catch a misread or a typo. UPC, EAN and every other GTIN use the same modulo-10 method published by GS1.

It catches every single wrong digit and most swaps of two neighboring digits. It doesn't tell you whether the number belongs to a real, licensed product.

UPC vs. EAN vs. GTIN

  • GTIN (Global Trade Item Number) is the family name. Feeds like Google Merchant Center ask for a GTIN and accept any of the lengths below.
  • UPC-A is the 12-digit GTIN-12 used mostly in the US and Canada.
  • EAN-13 is the 13-digit GTIN-13 used in the rest of the world. Any UPC-A becomes an EAN-13 by adding a leading 0.
  • EAN-8 is a short GTIN-8 for small packs; GTIN-14 identifies cases and cartons.

How to calculate UPC, EAN and GTIN check digit: a worked example

A store needs the check digit for the UPC-A 03600029145.

  • Odd positions from the left: 0 + 6 + 0 + 2 + 1 + 5 = 14, × 3 = 42
  • Even positions: 3 + 0 + 0 + 9 + 4 = 16
  • 42 + 16 = 58; the next multiple of 10 is 60; 60 − 58 = 2

The check digit is 2: the full UPC-A is 036000291452, and its EAN-13 is 0036000291452.

Where you need a valid GTIN

Shopping feeds. Google Merchant Center requires a GTIN for products that have one from the manufacturer, and rejects invalid ones. Find the category the product belongs in with the Google product category lookup.

Marketplaces. Amazon, Walmart and Target check codes against GS1's registry, not just the check digit, so buy your company prefix from GS1 rather than reselling services.

Your own products. If you make the product, license a GS1 company prefix, then number your items and let this calculator add each check digit.

Questions about UPC, EAN and GTIN check digit

How do you calculate a UPC check digit?
Add the digits in odd positions (1st, 3rd, 5th… from the left) and multiply by 3. Add the digits in even positions. Add the two results, and the check digit is what brings that total up to the next multiple of 10. For 03600029145 that's 58, so the check digit is 2.
How do you calculate an EAN-13 check digit?
The same way as a UPC, counting the weights from the right: multiply the 12 digits before the check digit by 1, 3, 1, 3… from the left, add them up, and the check digit brings the sum to the next multiple of 10. For 400638133393 the sum is 89, so the check digit is 1 and the EAN-13 is 4006381333931.
How do I convert a UPC to an EAN-13?
Add a 0 to the front. The UPC 036000291452 is the EAN-13 0036000291452, and the check digit stays the same. Going the other way, an EAN-13 that starts with 0 becomes a UPC-A when you drop that zero.
Does a valid check digit mean the barcode is real?
No. It only means the number is well formed. To check that a GTIN was licensed to a company, look it up in GS1's Verified by GS1 service. Retailers and Amazon check that registry too.
What is a GTIN-14?
A 14-digit GTIN for a case or carton of products, often printed as an ITF-14 barcode. The first digit is a packaging indicator. Any shorter GTIN can be written as a GTIN-14 by adding leading zeros, which some feeds ask for.
Why did my UPC codes lose their leading zero?
Spreadsheets read barcodes as numbers and drop leading zeros, so the UPC 036000291452 becomes the 11-digit 36000291452, which feeds reject. Format the column as text before you paste, or paste the list here: codes missing their zero are caught and given back.
Can I make up my own UPC numbers?
Not for selling in stores or on marketplaces. UPCs are built from a company prefix licensed by GS1, and retailers check it. For items sold only in your own store, prefixes starting with 2 are reserved for in-store use.

Sources

Do it with Replo

Check every GTIN in your catalog

Replo reads your products and flags any barcode with a wrong check digit or a missing GTIN.

Prompt: “flag products with an invalid or missing barcode”

More free calculators

Browse all tools