GTIN check digit calculator
A GTIN is one number that can be written in four lengths. The UPC 036000291452 is a GTIN-12; put a zero in front and it's the GTIN-13 0036000291452, two zeros and it's the GTIN-14 00036000291452, which is the form most product databases store. The check digit stays 2 in all three, because a leading zero adds nothing to the weighted sum. Pick the length first, then type the digits. The calculator never guesses the length from what you typed, and the mistakes below show why.
Where it is used
- Filling the 14-digit GTIN field in a product feed or a retailer's item form from a 12-digit UPC or a 13-digit EAN
- Working out the ITF-14 number for a case: an indicator digit from 1 to 8 replaces the leading zero, and the check digit has to be computed again
- Checking a supplier's list of GTINs before import, where one wrong digit means an item the till can't find
How it compares
This page and the UPC check digit calculator run the same GS1 arithmetic. The difference is the question they start from. The UPC calculator is organised by code type and covers UPC-E and ISBN too; this one is organised by GTIN length, with GTIN-14 first, because that's the length people get stuck on. It's the only one whose check digit changes once an indicator other than zero goes in front: 10036000291459 and 50036000291457 are the same item packed in two different cases, and their last digits differ for exactly that reason. With an indicator of 0 the GTIN-14 is just the shorter number with zeros in front, and the check digit stays put.
Common mistakes
- Letting a calculator or a spreadsheet guess the length. Twelve digits can be a complete GTIN-12 or a GTIN-13 still missing its last digit. Typed in as the start of a GTIN-13, 036000291452 becomes 0360002914522, a valid-looking number for a different item, because every digit has moved one place along and picked up a different weight.
- Keeping the item's check digit when building an ITF-14. The case number is the indicator plus the item's GTIN-13 without its last digit, and a new check digit is computed over those 13. Gluing the indicator onto the whole item number gives 14 digits whose last digit is wrong nine times out of ten.
- Letting a spreadsheet drop leading zeros. A GTIN-14 that starts with 00 turns into a 12-digit number the moment the column is formatted as a number, and the calculator then sees the right digits at the wrong length.
Frequently asked questions
- How do I convert a UPC to a GTIN-14?
- Put two zeros in front: 036000291452 becomes 00036000291452, and the check digit doesn't change because zeros add nothing to the sum. That's the GTIN-14 of the item itself. A case of them gets an indicator digit in place of the first zero and a newly computed check digit.
- Is the GTIN check digit the same as the UPC or EAN one?
- Yes. GTIN-8, GTIN-12, GTIN-13 and GTIN-14 all use the same modulo 10 with weights of 3 and 1 counted from the right, so the last digit of a UPC-A is also the last digit of its GTIN-14 with zeros in front.
- Why do I have to choose the length?
- Because the same digits mean different things at different lengths. Twelve digits are either a full GTIN-12 to check or a GTIN-13 without its last digit, and the two answers differ. Choosing the length tells the calculator which of the two questions you're asking.
- Does a correct check digit mean the GTIN is registered?
- No. It only proves the number was typed consistently. Whether the company prefix belongs to anyone is a question for GS1's own Verified by GS1 lookup.