Skip to content
OverCalculator
  1. Home
  2. Financial
  3. GTIN Check Digit Calculator
Financial

GTIN Check Digit Calculator

Calculate the GS1 modulo-10 check digit for GTIN, UPC, EAN, GSIN, and SSCC codes after adding any needed leading zeros.

Published

Check digit
Check digit
2
Completed code
036000291452
Detected standard
GTIN-12 / UPC
Input length
11 digits before check
Weighted sum
58

The completed GTIN-12 / UPC code is 036000291452. The check digit makes the weighted sum end in zero after the digit is appended.

Use this if a system stripped zeros from the beginning of the code.
Enter digits only, excluding the final check digit.

Results update as you type.

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 checkCompleted identifier
7GTIN-8 / EAN-8
11GTIN-12 / UPC
12GTIN-13 / EAN-13
13GTIN-14
16GSIN
17SSCC

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.

weighted sum=digit×alternating weight\text{weighted sum} = \sum \text{digit} \times \text{alternating weight}

The check digit is the amount needed to reach the next multiple of 10:

check digit=(10(weighted summod10))mod10\text{check digit} = (10 - (\text{weighted sum} \bmod 10)) \bmod 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.

Frequently asked questions

What does a GTIN check digit do?
A GTIN check digit is the final digit used to help validate a barcode identifier. It is calculated from the preceding digits with a GS1 modulo-10 method. The digit can catch many data-entry or scanning errors, but it does not prove the product description, company prefix, or item record is correct.
Do I include the existing check digit?
No. Enter only the digits before the final check digit. The calculator adds any leading zeros you request, strips non-digit characters from the code field, checks whether the remaining length is supported, and then calculates the final digit and completed identifier.
Which lengths are supported by the form?
The form supports 7 digits before the check digit for GTIN-8 or EAN-8, 11 for GTIN-12 or UPC, 12 for GTIN-13 or EAN-13, 13 for GTIN-14, 16 for GSIN, and 17 for SSCC. Other lengths are treated as invalid rather than guessed.

Related calculators

GTIN Check Digit Calculator updated at