Price File Desk

Check digit calculator for UPC, EAN-13 and GTIN-14

A check digit is the last digit of a UPC, EAN or GTIN, calculated from the others: weight the digits 3 and 1 from the right, add them, and subtract from the next multiple of ten. Paste one code or a whole column to check length and check digit; an 11-digit UPC usually lost its leading zero.

Updated November 25, 2026 · 5 sources listed at the end

Example: an 11-digit UPC from a supplier file. Try 036000291452, a valid UPC.

Key facts
Valid lengths8, 12, 13 or 14 digits
Weights3 and 1, from the right
Example036000291452 is valid

How is a UPC check digit calculated?

GS1 calculates the last digit of every GTIN from the others. Starting from the digit just left of the check digit and moving left, multiply digits alternately by 3 and 1, add the results, and the check digit is the amount needed to reach the next multiple of ten (GS1).

StepFor 03600029145_
Weights from the right3, 1, 3, 1 ...
Weighted sum58
Next multiple of 1060
Check digit2

How do you calculate a check digit in Excel?

For an 11-digit UPC body stored as text in A2, this returns the check digit:

=MOD(10-MOD(SUMPRODUCT(--MID(A2,{1,3,5,7,9,11},1))*3+SUMPRODUCT(--MID(A2,{2,4,6,8,10},1)),10),10)

For a 12-digit EAN-13 body the weights swap, because the 3s fall on the even positions counting from the left:

=MOD(10-MOD(SUMPRODUCT(--MID(A2,{1,3,5,7,9,11},1))+SUMPRODUCT(--MID(A2,{2,4,6,8,10,12},1))*3,10),10)

Check them against known codes: 03600029145 returns 2 (UPC 036000291452) and 400638133393 returns 1 (EAN 4006381333931). Keep the column as text, or Excel drops the leading zero first (Microsoft Support).

Why do supplier files have bad UPCs?

  • Excel removed a leading zero, leaving 11 digits instead of 12
  • Excel showed a long number in scientific notation and the file was saved that way, so the hidden digits were lost
  • Someone typed the UPC by hand
  • The file mixes 12-digit UPCs and 14-digit case GTINs in one column

Excel stores numbers to 15 significant digits and shows long numbers in scientific notation unless the column is formatted as text (Microsoft Support). Ask suppliers to send barcode columns as text.

Which lengths are valid?

TypeDigitsCommon use
GTIN-88Small items
GTIN-12 (UPC-A)12Items sold in the US and Canada
GTIN-13 (EAN-13)13Items sold elsewhere
GTIN-1414Cases and inner packs
SSCC-1818Pallets and shipping units

All of these use the same mod-10 check digit, so the calculator accepts any of them. Case codes have their own tools: the GTIN-14 converter and the ITF-14 barcode generator.

Where is the check digit on a UPC?

The check digit is the last digit of the UPC, the 12th, printed at the right of the numbers under the bars. It is calculated from the first 11: weight them 3 and 1 starting from the right, add, and subtract from the next multiple of ten. For UPC 990497300014 the check digit is 4.

How is the check digit for 990497300014 worked out?

Sum 86; next multiple of ten 90; 90 − 86 = check digit 4
PositionDigitWeightProduct
19327
2919
3030
4414
59327
6717
7339
8010
9030
10010
11133

The method is GS1's (GS1); the UPC is the example used in GS1 Canada's GTIN-14 guide (GS1 Canada). For a 12-digit UPC, the 3 weight starts on the 11th digit, so it falls on the 1st, 3rd, 5th and other odd positions.

Is the check digit in the same place on EAN-13 and GTIN-14?

Yes, always last, and calculated the same way. GS1's own worked example is a GTIN-13 (GS1). GS1 US's guide describes the check digit as the final digit, calculated from the preceding 11 numbers of a UPC (GS1 US).

What does a correct check digit prove?

That the number is well formed, not that it is real. A typo can still produce a valid-looking code by chance, and a well-formed code may not have been assigned. Verified by GS1 checks whether a GTIN exists and who assigned it, free for up to 30 queries a day on gs1.org (GS1).

Common questions

Why does my UPC have 11 digits?

Usually because a spreadsheet dropped the leading zero. Add a zero at the front and check the check digit; if it validates, that was the cause.

Is a 14-digit GTIN the same as a UPC?

No. A GTIN-14 usually identifies a case or inner pack. It shares digits with the item's UPC but adds a packaging indicator at the front and has its own check digit.

Can I fix a UPC shown as 7.61E+11?

No. The digits after the first few are already gone in the file. Ask the supplier to resend the column formatted as text.

How can I find the check digit in a UPC code?

It is the last digit. To calculate it, weight the first 11 digits 3 and 1 from the right, add them and subtract from the next multiple of ten.

Can I check a GTIN number online?

Yes. Verified by GS1 checks whether a GTIN is valid and which company assigned it; gs1.org allows 30 free queries a day.

What if the check digit does not match?

The code was mistyped or damaged, often by a spreadsheet; ask the supplier for the correct UPC.

First supplier file free. Pilot $500 for up to 5 files. Then $950 a month for up to 15 files, $60 per extra file. Every file back within 24 hours, or it is free.

Send your first file