GTIN Check Digit Calculator (GTIN-8, GTIN-12, GTIN-13, GTIN-14)
A GTIN check digit calculator computes the final digit of a GTIN-8, GTIN-12, GTIN-13, or GTIN-14 by applying the GS1 modulo-10 algorithm to the preceding digits.
Calculate or verify the GS1 Mod-10 check digit for GTIN-8, GTIN-12, GTIN-13, and GTIN-14 codes.
Calculate a GTIN check digit
Enter a value and run the check. Everything runs locally in this page.
Run up to 5,000 validations/mo at <5ms edge latency with zero data retention and 99.9% availability.
curl -X POST https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data": "5901234123457"}'
Runs entirely in your browser. The value you type is never sent to a server.
How to calculate a GTIN check digit
- Enter the GTIN — Type the digits without the check digit to calculate it, or paste the complete GTIN to verify it.
- Weight the digits from the right — Starting at the rightmost digit of the base number, alternate weights of 3 and 1.
- Reduce modulo 10 — Sum the weighted digits; the check digit is (10 - (sum mod 10)) mod 10.
What the check verifies
The check verifies the GS1 modulo-10 check digit that ends every GTIN-8, GTIN-12, GTIN-13, and GTIN-14. Digits are weighted 3 and 1 alternately from the right, summed, and reduced modulo 10; the check digit makes the total a multiple of 10.
The calculator weights the digits of the base number alternately 3 and 1 starting from the rightmost digit, sums the products, and derives the check digit as (10 - (sum mod 10)) mod 10. The same algorithm applies to GTIN-8, GTIN-12, GTIN-13, and GTIN-14.
Enter the base digits to calculate the missing check digit, or paste the complete code to verify that its final digit matches the GS1 modulo-10 calculation.
GTIN lengths and formats
| Format | Digits |
|---|---|
| GTIN-8 | 8 |
| GTIN-12 (UPC-A) | 12 |
| GTIN-13 (EAN-13) | 13 |
| GTIN-14 | 14 |
Worked example: 5901234123457. The weighted sum of 590123412345 is 83, and (10 - (83 mod 10)) mod 10 = 7, which matches the final digit.
Frequently Asked Questions
Weight the digits alternately 3 and 1 from the right, sum the products, and take (10 - (sum mod 10)) mod 10. The result is the final digit of the GTIN.
GTIN-13 is the 13-digit number printed in an EAN-13 retail barcode. GTIN-14 is the 14-digit number used for cases and logistics units; it is the same identifier with a leading packaging indicator digit.
Yes. GTIN-13 is the GS1 term for the 13-digit identifier commonly called EAN-13, and the check digit algorithm is identical.
Yes. UPC-A is the 12-digit GTIN-12 format, so entering 12 digits in verify mode validates it with the same modulo-10 algorithm.
The free calculator handles one code at a time. The Stanza GS1 Decoder API is the server-side option and also decodes full GS1 element strings and Digital Link URIs.
Free browser tool vs Stanza API
| Capability | Free browser tool | Stanza API |
|---|---|---|
| Where it runs | Your browser | Cloudflare edge |
| Authentication | None | Bearer API key |
| Rate limit | None | Published per-tier limits |
| Data handling | Never leaves your device | In-memory, zero retention |
| GS1 element string decoding through the GS1 Decoder API | No | Yes |
| Digital Link URI parsing with all application identifiers | No | Yes |