GTIN Check Digit Calculator (GS1 Modulo 10)
Compute the GS1 check digit for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14, validate a complete barcode number, or process a whole list at once. Free, no signup — everything runs in your browser.
How the GS1 check digit is calculated
- Start with the rightmost digit of the GTIN body (the check digit itself is not included) and count positions from the right: 1, 2, 3, …
- Multiply the digits in odd positions by 3 and the digits in even positions by 1.
- Add all the products together to get the sum.
- The check digit is the smallest number that brings the sum up to a multiple of 10: (10 − (sum mod 10)) mod 10.
Worked example from GS1 UK — GTIN body 501234567890: alternate digits from the right 0+8+6+4+2+0 = 20, ×3 = 60; the remaining digits 9+7+5+3+1+5 = 30; 60 + 30 = 90; 90 is already a multiple of 10, so the check digit is 0 → complete GTIN 5012345678900.
GTIN check digit — frequently asked questions
What is a GTIN check digit?
A GTIN check digit is the last digit of a Global Trade Item Number. It is computed from all the preceding digits with the GS1 modulo-10 algorithm, and it catches typos and scanning errors. Retail scanners and marketplaces like Amazon reject a barcode when its check digit does not match the algorithm.
How is the GTIN check digit calculated?
The GS1 check digit uses a modulo-10 calculation: starting with the rightmost digit of the GTIN body (the check digit itself is excluded), multiply the digits in odd positions by 3 and the digits in even positions by 1, add everything up, and the check digit is the smallest number that brings that sum up to a multiple of 10. Equivalently: check digit = (10 - (sum mod 10)) mod 10.
What is the difference between GTIN-8, GTIN-12, GTIN-13 and GTIN-14?
GTIN-8 is a short 8-digit code for small packages, GTIN-12 is the 12-digit UPC-A used mainly in North America, GTIN-13 is the 13-digit EAN-13 used internationally, and GTIN-14 is used for trade units and cases. All four use the exact same modulo-10 check digit algorithm; only the length differs.
Do I enter the GTIN with or without the last digit?
Use calculate mode when you have a GTIN body without its last digit: enter 7 digits for GTIN-8, 11 for GTIN-12, 12 for GTIN-13, or 13 for GTIN-14, and the tool computes the check digit. Use validate mode when you have a complete barcode number (8, 12, 13 or 14 digits) and want to check whether its last digit is correct.
What does it mean if my GTIN is invalid?
An invalid result means the last digit does not match the GS1 modulo-10 algorithm for the preceding digits — the number was mistyped or the check digit was computed wrong. Replace the last digit with the correct one shown by this tool; an incorrect check digit will not scan at retail checkouts.
Can the check digit be 10?
No. The check digit is always a single digit from 0 to 9. When the weighted sum is already a multiple of 10, the formula (10 - (sum mod 10)) mod 10 gives 0, never 10.
Why do barcodes need a check digit?
A barcode carries no error correction, so one wrong digit would identify a completely different product. The check digit detects the most common human errors — a single mistyped digit or two swapped adjacent digits — before the number is printed on packaging.
Can I use this for ISBN-13 and UPC-A numbers?
Yes. ISBN-13 is just a GTIN-13 with a 978 or 979 prefix, and UPC-A is GTIN-12, so both use the same modulo-10 check digit. You can validate any ISBN-13 or UPC-A number with this tool's validate mode.
Can I calculate check digits for many GTINs at once?
Yes. Paste one GTIN per line into the batch box and the tool computes or validates every line at once, then shows all results in a table. GS1 members with many numbers to generate can process a whole list without clicking per item.
What if my number contains spaces or hyphens?
Yes. Spaces and hyphens are stripped automatically, so 590 1234 1234 5 and 590-1234-1234-5 both work. Any other non-digit character is rejected with an error message, because a valid GTIN contains digits only.
Is my GTIN data sent anywhere?
Your numbers never leave your device. This tool runs 100% client-side in your browser with JavaScript; nothing is uploaded to any server, and you can verify that in the DevTools network tab. That also means it works offline once the page is loaded.
How does this compare to the official GS1 check digit calculator?
The official GS1 check digit calculator at gs1.org implements the same modulo-10 algorithm this tool uses, so results agree digit for digit. This page adds what the official one lacks: a validation mode for complete GTINs, batch processing of many numbers at once, and a visible step-by-step breakdown of the calculation.
Related tools
- Product Schema Generator — add your GTIN to valid schema.org Product markup for Google rich results.
- File Checksum Verifier — verify file integrity with checksums, another flavor of error detection.
Free tool by NRTechStudio