GTIN Check Digit Calculator
Paste the digits without the check digit (7, 11, 12 or 13 of them) and get the completed barcode — with the whole calculation shown, not just the answer.
🔒 Your data never leaves your browser.
How each input length is interpreted
This tool never guesses. Lengths that could mean two things show both readings:
| You paste | Interpretation |
|---|---|
| 7 digits | GTIN-8 payload → completed to 8 digits |
| 8 digits | Complete GTIN-8 → check digit verified |
| 11 digits | UPC-A payload → completed to 12 digits |
| 12 digits | Both: EAN-13 payload (completed) and complete UPC-A (verified) |
| 13 digits | Both: GTIN-14 payload (completed) and complete EAN-13 (verified) |
| 14 digits | Complete GTIN-14 → check digit verified |
How to calculate a GTIN check digit by hand
The check digit is a GS1 Mod-10 checksum. Working from the rightmost digit of the payload leftwards, multiply digits alternately by 3 and 1, then sum the products. The check digit is the number that lifts the sum to the next multiple of ten.
Example for the EAN-13 payload 400638133393: the weighted sum is 89, the next
multiple of ten is 90, so the check digit is 90 − 89 = 1 and the complete barcode
is 4006381333931. Paste any payload above to see this table computed for your own
number.
Why the same rule works for UPC and EAN
All GTIN lengths share one checksum definition anchored at the right end of the number. That is why a UPC-A with a leading zero added becomes its EAN-13 form with the same check digit — and why this calculator can handle every format with one algorithm.
Every rule this tool applies (9 rules)
INPUT-001 Empty input
Nothing remains after trimming whitespace and formatting characters.
Fix: Enter a GTIN: 8, 12, 13 or 14 digits.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-002 Scientific notation corruption (Excel)
Input looks like "8.71E+12". Excel converts long numbers to scientific notation and permanently discards the middle digits — the original GTIN cannot be recovered from this value.
Fix: Go back to the source file. In Excel, format the column as Text (or prefix values with an apostrophe) before the numbers are converted, then re-export.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-003 Formatting characters removed
Spaces, dashes, thousands separators or invisible characters (zero-width spaces, BOM, non-breaking spaces) were stripped before validation. Common when copying from spreadsheets, PDFs or web pages.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-004 Full-width digits converted
Full-width digits (123, common in CJK input methods and documents) were converted to standard ASCII digits.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-005 Non-numeric characters
After cleaning, the input still contains characters that are not digits. A GTIN consists of digits only.
Fix: Remove letters and symbols. If your data has an internal SKU mixed in, extract the numeric barcode column.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-006 11 digits — leading zero likely stripped
UPC-A codes starting with 0 lose their leading zero when Excel treats them as numbers. An 11-digit value is not a valid GTIN, but it is very often a UPC-A missing its first 0.
Fix: Prepend a 0 and re-validate. To prevent this, format the barcode column as Text in Excel.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
INPUT-007 Invalid length
A GTIN must be exactly 8 (GTIN-8/EAN-8), 12 (GTIN-12/UPC-A), 13 (GTIN-13/EAN-13) or 14 (GTIN-14/case code) digits.
Fix: Check for truncation or concatenated values. 7-digit values may be a GTIN-8 that lost a leading zero.
INPUT-008 Trailing ".0" removed (spreadsheet number conversion)
Input like "4006381333931.0" indicates the value passed through a tool that treated it as a floating-point number (Excel, pandas). The ".0" was stripped and validation continued — but check the rest of the column for worse corruption (scientific notation, lost zeros).
Fix: Format the column as Text at the source to stop numeric conversion.
Source: Yaktool data-hygiene rule — derived from real-world spreadsheet and copy-paste corruption patterns, not from a GS1 specification. Every case is covered by a regression test in our test suite.
CHECK-001 Check digit mismatch
The last digit must equal the GS1 Mod-10 checksum (weights 3,1,3,1… from the right) of the preceding digits. A mismatch means a typo, an OCR error, or a fabricated code.
Fix: Compare against the number printed under the barcode on the physical product. Do not simply replace the check digit unless you are sure the other digits are correct.
The check digit itself is computed rather than judged, so it appears in the result rather than as a finding — CHECK-001 is listed here because it is the algorithm being applied. Range and placeholder checks belong to the full validator; this tool does not make those claims.