GTIN Check Digit Calculator
The GTIN check digit is calculated for common GS1-style barcode identifiers. It is for GTIN, UPC, EAN, GSIN, and SSCC validation work, not for calculating a price, tax, interest rate, or investment return. The form takes the digits before the check digit, optionally adds leading zeros that were lost in a spreadsheet or import, strips non-digit characters from the code field, and applies the modulo-10 weighting method used for these identifiers.
A check digit is a small data-quality safeguard. When a barcode number is typed or transmitted, the final digit can reveal many common errors because the weighted sum no longer ends cleanly in a multiple of 10. It is not a security feature, not a product lookup, and not proof that the company prefix or item reference belongs to a particular company. It only confirms that the number pattern passes the check-digit arithmetic.
How to use the calculator
Enter the code without its existing final digit. If your source already includes a check digit, remove it first. Then add leading zeros if another system stripped them. The form permits 0 through 10 leading zeros and prepends them before calculating. It also removes non-digit characters from the code field, so spaces or hyphens used for readability will not count.
After calculation, review four outputs: the check digit, the completed code, the detected standard, and the weighted sum. The detected standard is based on the number of digits before the check digit after leading zeros and digit filtering. For commerce-related calculations around the same product workflow, you may also need the sales tax calculator, the percent off calculator, or the budget calculator. Those pages calculate money; this one validates an identifier.
Supported input lengths
The form accepts only the lengths in its supported-length table:
| Digits before check | Completed identifier |
|---|---|
| 7 | GTIN-8 / EAN-8 |
| 11 | GTIN-12 / UPC |
| 12 | GTIN-13 / EAN-13 |
| 13 | GTIN-14 |
| 16 | GSIN |
| 17 | SSCC |
If the digit count is empty or not in this table, the result is invalid. That is intentional. Guessing the standard from an unsupported length could create a misleading completed code.
Formula
Starting from the rightmost digit before the check digit, multiply alternating digits by 3 and 1 as you move left. The rightmost body digit uses weight 3 in this method.
The check digit is the amount needed to reach the next multiple of 10:
The final modulo matters when the weighted sum already ends in zero. In that case, the check digit is 0. Without the second modulo, the arithmetic would produce 10, which is not a single digit.
Worked example
Use the default code body: 03600029145, with zero leading zeros added. The form keeps the digits as 03600029145 because there are no non-digit characters to remove. The length is 11 digits before the check digit, so the detected standard is GTIN-12 / UPC.
Now calculate from the right side. The digits from right to left are 5, 4, 1, 9, 2, 0, 0, 0, 6, 3, and 0. The weights from right to left are 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, and 3. The products are 15, 4, 3, 9, 6, 0, 0, 0, 18, 3, and 0. Their weighted sum is 58. The next multiple of 10 is 60, so the check digit is 2. Using the formula, (10 - (58 mod 10)) mod 10 = (10 - 8) mod 10 = 2. The completed code displayed by the calculator is 036000291452.
Practical use cases
Use this calculator when preparing product records, checking data imports, validating labels, or diagnosing why a barcode number fails a system’s format check. It can be especially helpful when spreadsheets convert identifiers into numbers and remove leading zeros. Since leading zeros are part of the code structure, restoring them can change the detected standard and the check digit.
For operational use, treat the check digit as one control among several. You may still need to verify the product’s assigned GTIN, packaging level, company prefix, and label quality in the appropriate GS1 or retailer system. A number can pass check-digit math and still be assigned to the wrong product record.
Common mistakes
- Including the old check digit in the input body.
- Letting spreadsheet formatting remove leading zeros.
- Calculating weights from the left instead of from the rightmost body digit.
- Treating a valid check digit as proof of product identity.
- Assuming hyphens or spaces matter; the form strips non-digit characters before calculation.
Sources
Source version: issuer pages current when accessed July 9, 2026; no unstated effective year is assumed.
- GS1 US, Check digit calculator — official GS1 US tool and context for calculating check digits.
- GS1 US, UPCs, barcodes, and prefixes — GS1 US overview of barcode identifiers used in product records.