Skip to content

GTIN check digit calculator

Type a GTIN, GLN or SSCC without its last digit to get the check digit, or the whole number to check it. Every step of the GS1 calculation is shown, and a wrong number comes with its likely fix.

GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GLN or SSCC. Spaces and dashes are ignored.

What to do

Automatic verifies 8, 12, 13, 14 and 18 digits and calculates for 7, 11, 16 and 17.

Valid GTIN-13 (EAN-13) or GLN

5901234123457

The check digit is correct.

Draw this barcode
How it was calculated
Digit590123412345
× weight131313131313
= product52703294329415

Sum 83. The next multiple of 10 is 90, so the check digit is 7.

How the GS1 check digit works

GTINs, GLNs and SSCCs all end in a check digit worked out with the same method, which GS1 publishes. Take the digits before the check digit. Starting with the one next to it and moving left, multiply them by 3, then 1, then 3, and so on, and add the results. The check digit is what you add to that sum to reach the next multiple of ten.

GS1’s own example is the number 629104150021: the weighted sum is 57, the next multiple of ten is 60, and the check digit is 3, giving 6291041500213. Type it above to see the same steps.

GS1 keys and their length with the check digit
KeyDigits with check digitBarcode
GTIN-88EAN-8
GTIN-1212UPC-A
GTIN-13 or GLN13EAN-13
GTIN-1414ITF-14, GS1-128, GS1 DataBar
SSCC18GS1-128 (00)

A correct check digit only means the number is consistent. It does not show that the number is registered to a product or company.

Checking a whole list of GTINs

The calculator above takes one number. For a product list or a feed, the GTIN validator checks every row of a pasted column or a CSV file with the same method, points out wrong check digits, UPCs that lost their leading zeros and duplicates, and gives you the report as a CSV.

UPC-A check digit, step by step

A UPC-A has 12 digits: 11 for the number and a check digit as the twelfth. Type the 11 digits in the calculator above and the check digit is added; type all 12 and it is verified. Here is the calculation for 03600029145:

  1. Add the digits in odd positions, counting from the left (1st, 3rd, 5th, 7th, 9th, 11th): 0 + 6 + 0 + 2 + 1 + 5 = 14. Multiply by 3: 42.
  2. Add the digits in even positions (2nd, 4th, 6th, 8th, 10th): 3 + 0 + 0 + 9 + 4 = 16.
  3. Add the two results: 42 + 16 = 58. The next multiple of ten is 60, so the check digit is 2.
  4. The full UPC-A is 036000291452.

Type 03600029145 in the calculator to see the same steps, or draw the barcode with the UPC-A barcode generator.

Questions about check digits

How is a GS1 check digit calculated?

Starting from the digit next to the check digit and moving left, multiply the digits by 3, 1, 3, 1 and so on, and add the results. The check digit is the number you add to reach the next multiple of 10 (0 if the sum already is one).

Does a correct check digit mean the number is registered?

No. It only shows the number is internally consistent, which catches most typing errors. Whether a GTIN is assigned to a product is recorded by GS1 and the brand that owns it.

My number has 12 digits. Is it a UPC or an EAN without its check digit?

Both are possible. By default 12 digits are read as a full UPC-A and checked; choose “Calculate” to treat them as the first 12 digits of an EAN-13.

How do I calculate the check digit of a UPC-A?

Type the first 11 digits. Add the digits in odd positions from the left (1st, 3rd and so on up to 11th) and multiply that total by 3. Add the digits in even positions (2nd up to 10th). Add the two results; the check digit is what brings the total up to the next multiple of 10.

Sources