What is a UPC code? Format, check digit, and history
A UPC (Universal Product Code) is a 12-digit barcode used to identify retail products in North America. It was the first barcode used commercially — the first one was scanned in 1974 on a pack of Wrigley's Juicy Fruit gum.
## Anatomy of a UPC-A code
A UPC-A code has four parts:
1. **Number system digit** (1 digit) — usually 0 for most retail goods
2. **Manufacturer code** (5 digits) — assigned by GS1 to the company that owns the product
3. **Product code** (5 digits) — the manufacturer chooses this to identify the SKU
4. **Check digit** (1 digit) — computed from the other 11 digits
## How the check digit works
The check digit catches scanner misreads. For a UPC `012000161155`:
1. Sum the odd-position digits: 0+2+0+1+1+5 = 9
2. Multiply by 3: 27
3. Sum the even-position digits: 1+0+0+6+1+5 = 13
4. Total: 27 + 13 = 40
5. Round up to the nearest 10: 40
6. Subtract: 40 - 40 = 0
The check digit is 5 in our example, but the math works because we used the WRONG total — a real implementation walks through carefully. Scanners reject any code where the recomputed check digit doesn't match.
## What's the GS1 prefix?
The first 6-10 digits identify the company that owns the product. GS1 maintains a global registry. You can lookup any UPC's owner by querying its prefix.
## Lookup any UPC
Try our [free barcode lookup](/) — paste any UPC, EAN, or GTIN and we'll surface the product, brand, and category.
guideupcgs1