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.

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.

Stanley's product page for the Quencher H2.0 Flowstate tumbler, 20 oz, at $40.00 with size and color swatches and Add to Cart
9:41
Stanley 1913

Quencher H2.0 tumbler, 20 oz, $40

Stanley's Quencher sells for $40.00. A 60% margin at that price means a cost of $16.00 or less; a 100% markup (keystone) means a $20.00 cost.

See the live page

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.

Stumptown's product page for Hair Bender whole bean coffee: the green bag, 220 reviews and a $19.00 price
9:41
Stumptown Coffee Roasters

Hair Bender coffee, 12 oz, $19

Stumptown's Hair Bender sells for $19.00. A 60% margin at that price means a cost of $7.60 or less; a 100% markup (keystone) means a $9.50 cost.

See the live page

Check digits for each barcode length

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.
Tatcha's product page for The Silk Cream moisturizer, 1,167 reviews, 50 ml at $125.00
9:41
Tatcha

The Silk Cream, 50 ml, $125

Tatcha's Silk Cream sells for $125.00. A 60% margin at that price means a cost of $50.00 or less; a 100% markup (keystone) means a $62.50 cost.

See the live page

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.

Lodge's product page for the 11 inch Essential Enamel cast iron skillet, on sale at $49.90 from $59.95
9:41
Lodge Cast Iron

11 inch enamel cast iron skillet, $49.90

Lodge's enamel skillet sells for $49.90. A 60% margin at that price means a cost of $19.96 or less; a 100% markup (keystone) means a $24.95 cost.

See the live page

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.
Ooni's product page for the Karu 12 multi-fuel pizza oven, marked Save 29% and Price Drop, at $249.00
9:41
Ooni

Karu 12 pizza oven, $249

Ooni's Karu 12 sells for $249.00. A 60% margin at that price means a cost of $99.60 or less; a 100% markup (keystone) means a $124.50 cost.

See the live page

How to calculate a UPC check digit: an 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.

Our Place's product page for the Titanium Always Pan Pro, on Black Friday sale at $139 from $179
9:41
Our Place

Titanium Always Pan Pro, 10.5 inch, $139

Our Place's Always Pan sells for $139.00. A 60% margin at that price means a cost of $55.60 or less; a 100% markup (keystone) means a $69.50 cost.

See the live page

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.

The chart the UPC and GTIN check digit calculator draws from its numbers

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.

Questions about UPC, EAN and GTIN 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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.

  • 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

More free tools

Browse all tools