Search

Free calculator

GTIN check digit calculator

Calculate the check digit from the first 7, 11, 12 or 13 digits of a GTIN, or validate a full GTIN-8, UPC (GTIN-12), EAN (GTIN-13) or GTIN-14 before it goes into your product feed. Every step of the mod-10 sum is shown.

Berend Vrakking, founder. Last updated .

7, 11, 12 or 13 digits. Spaces and dashes are ignored.

Your result

The check digit for 871234567890 is 6. The full GTIN is 8712345678906, a GTIN-13 (EAN-13).

Check digit
6
Format
GTIN-13
Full GTIN
8712345678906

The sum, digit by digit

Weights and products for each digit, counted from the right
Position from the rightDigitWeightProduct
10× 30
29× 19
38× 324
47× 17
56× 318
65× 15
74× 312
83× 13
92× 36
101× 11
117× 321
128× 18
Sum114
Next multiple of ten120
Check digit6

The start values are illustrative data.

Every step of the check digit, worked through for the start value.

Illustrative data. The first 12 digits of a GTIN-13 are 871234567890. Number them from the right, weight them 3, 1, 3, 1 and so on, and add the products.

Worked example for the calculator’s start value
StepCalculationResult
Digit 1: 00 × 30
Digit 2: 99 × 19
Digit 3: 88 × 324
Digit 4: 77 × 17
Digit 5: 66 × 318
Digit 6: 55 × 15
Digit 7: 44 × 312
Digit 8: 33 × 13
Digit 9: 22 × 36
Digit 10: 11 × 11
Digit 11: 77 × 321
Digit 12: 88 × 18
Sum0 + 9 + 24 + 7 + 18 + 5 + 12 + 3 + 6 + 1 + 21 + 8114
Next multiple of ten114 rounded up120

The check digit is 6, so the full GTIN is 8712345678906. To validate a GTIN, run the same sum on every digit except the last and compare the result with the last digit. Weighting the check digit too, with weight 1, brings the total to 120, a multiple of ten.

The same sum covers every format, only the length changes.

Merchant Center treats UPC, EAN, JAN, ISBN-13 and ITF-14 codes as GTINs. The calculator tells them apart by length, and by the 978 or 979 start of an ISBN-13.

GTIN formats by length
DigitsFormatBarcode names
8GTIN-8EAN-8, JAN
12GTIN-12UPC (North America)
13GTIN-13EAN (Europe), JAN, ISBN-13 for books
14GTIN-14ITF-14, for multipacks

Google asks for 12-digit codes instead of 8-digit UPC-E codes, and for ISBN-13 instead of ISBN-10. This calculator does not convert either: it reads 8 digits as a GTIN-8.

A valid check digit only catches typing mistakes, and Merchant Center asks for more.

A valid number may be made up

About 1 in 10 random numbers has a correct check digit. Google says to submit a GTIN only when you are sure it is correct, and to leave it out when in doubt.

Restricted and coupon ranges

Google says not to submit numbers that start with 02, 04 or 2 (restricted) or 05, 98 or 99 (coupon). The calculator flags them for 8, 12 and 13 digit codes.

Every variant has its own GTIN

A different colour or size has its own GTIN, so check each variant row, not the product once.

Leading zeros disappear in spreadsheets

A UPC that starts with 0 loses it when a spreadsheet stores the number as a number. Add the zero back before you validate, and keep the column as text.

Source: Google Merchant Center Help: GTIN [gtin]

GTIN check digit questions, answered.

How do you calculate a GTIN check digit?

Number the digits without the check digit from the right and weight them 3, 1, 3, 1 and so on. Add the products and subtract the sum from the next multiple of ten. For 871234567890 the sum is 114, the next multiple of ten is 120, so the check digit is 6 and the GTIN is 8712345678906. The method is the same for GTIN-8, 12, 13 and 14.

How do you check whether a GTIN is valid?

Take every digit except the last, calculate the check digit as above, and compare it with the last digit. If they differ, the number has a typing mistake or is not a real GTIN. Switch the calculator to "Validate a GTIN" to see the comparison. Merchant Center asks for a check digit that is present and correct.

Does a valid check digit mean the GTIN belongs to my product?

No. The check digit only shows that the digits are consistent with each other. Google says to provide a GTIN only if you are sure it is correct, and the right number is the one the manufacturer assigned to that product and variant. Take it from the packaging, the manufacturer or your supplier.

Is the check digit the same for UPC, EAN and ISBN-13?

Yes for UPC (12 digits), EAN (13), ITF-14 (14) and ISBN-13: all use the same 3 and 1 weights. An ISBN-10 uses a different method, so convert it to ISBN-13 first, which is what Google asks for anyway.

What does Merchant Center do with a wrong GTIN?

Google says products with a missing or incorrect GTIN may have limited visibility, and that matching to a product cannot be assured without one. It lists a present and correct check digit, no restricted or coupon ranges and no GTIN for products that have none (for example your own store brand) as requirements.

Embed this calculator

Paste this script tag into your own page to show the calculator there, with the same maths and no sign-up. It fits the width of your page, resizes with the calculator and follows the visitor’s light or dark setting.

The script adds the calculator and a link to the full version under it. Keep the attribution link: it credits the calculator.

Once the feed is right, see which products drive revenue, and which don’t.

Product Metrics does not edit your feed. It segments your products by advertising clicks and return against your target, then writes each segment to a Merchant Center label your campaigns use.

Analyse your products for freeLog in with Google, no credit card