| Key facts | |
|---|---|
| GTIN lengths | 8, 12, 13 or 14 digits (GS1 US) |
| Check digit weights | 3 and 1, starting next to the check digit |
| GS1 example | 61414121022 has check digit 0 |
| Excel | 12+ digits shown in scientific notation (Microsoft) |
What lengths can a GTIN be?
| Type | Digits | Used for |
|---|---|---|
| GTIN-12 (U.P.C.) | 12 | Mainly North America; the only GTIN type in a UPC-A barcode |
| GTIN-13 (EAN) | 13 | Mainly outside North America |
| GTIN-14 | 14 | Groupings such as a case or set pack; never starts with zero; not for point of sale |
| GTIN-8 | 8 | Small items |
From GS1 US (GS1 US). In a jan-san or packaging price file, a case-level GTIN-14 and an each-level GTIN-12 for the same product can sit side by side.
How is the check digit calculated?
The last digit of a GTIN is a check digit that protects the rest of the number (GS1 UK). Starting from the digit next to the check digit and moving left, multiply digits alternately by 3 and 1, add the results, and subtract the sum from the next multiple of ten (GS1).
| Step | GS1's GTIN-12 example: 61414121022? |
|---|---|
| Digits weighted by 3 | 6 + 4 + 4 + 2 + 0 + 2 = 18, times 3 = 54 |
| Digits weighted by 1 | 1 + 1 + 1 + 1 + 2 = 6 |
| Sum | 54 + 6 = 60 |
| Check digit | 60 is already a multiple of ten, so the check digit is 0: 614141210220 |
A single wrong or dropped digit almost always fails the check, which is why the check digit is the fastest test on a supplier's UPC column. The free UPC check digit calculator does it for one code; the price file checker does every row.
Why do UPCs arrive with the wrong length?
- Excel removed the leading zero, leaving 11 digits (Microsoft Support)
- The file came from a system that pads every GTIN to 14 digits, as GS1 XML does, or strips leading zeros, as EANCOM does (GS1)
- The supplier put a case-level GTIN-14 in the column you match on each-level UPCs
- A 13-digit code starting with 0: drop the zero and it is usually the 12-digit UPC; a P21 user hit exactly this (Epicor User Help Forum)
What does scientific notation do to a UPC?
Excel's General format shows numbers of 12 or more digits in exponential notation (Microsoft Support), so a 12-digit UPC displays as 7.61235E+11. While the cell still holds the full number, formatting it as text brings the digits back. If the file was saved as a CSV in that state, only the digits shown were written, and the code cannot be rebuilt. Codes longer than 15 digits lose everything past the 15th digit, which Excel rounds to zero (Microsoft Support).
How do you stop it happening?
- Open supplier CSVs with Data > From Text/CSV and set the UPC and part number columns to Text before loading
- Ask suppliers to send UPC columns formatted as text, and to say which level each GTIN identifies
- Store GTINs as 14 digits with leading zeros if your ERP allows it, and compare on that
- Check every code's length and check digit before the file is imported
Common questions
Why does my UPC have 11 digits?
Almost always because a spreadsheet dropped its leading zero. Add a zero and test the check digit; if it passes, that is the UPC.
Is a 14-digit GTIN the same as a UPC?
Not exactly. A GTIN-14 identifies a grouping such as a case. A 12-digit UPC padded with two leading zeros is also 14 digits, so check whether the first digits are zeros.
How do I calculate a UPC check digit?
From the right, weight the digits 3, 1, 3, 1 and so on, add them, and subtract the total from the next multiple of ten.
First supplier file free. Pilot $500 for up to 5 files. Then $950 a month for up to 15 files, $60 per extra file. Every file back within 24 hours, or it is free.
Send your first file- GS1 US: What is a GTIN?
- GS1 UK: What is a check digit?
- GS1: How to calculate a check digit manually
- GS1: Required format of GTIN in GS1 EDI standards
- Microsoft Support: Keeping leading zeros and large numbers
- Microsoft Support: Display numbers in scientific notation
- Epicor User Help Forum: Pricing file updates, October 2026