CodeBox Hub
FREE

UPC-A Barcode: Structure, Check Digit and the US Retail Standard

How a UPC-A barcode is built: number system, manufacturer and product digits plus the mod-10 check digit algorithm with a worked example.

# UPC-A Barcode: Structure, Check Digit and the US Retail Standard

UPC-A (Universal Product Code, 12 digits) is the retail barcode native to the United States and Canada, and the format you will see on nearly every product sold at a North American checkout. It is standardized as ISO/IEC 15420 — the same standard that covers EAN-13 and EAN-8 — and it is the 12-digit face of what GS1 calls a GTIN-12. The relationship to EAN-13 matters more than people expect: a UPC-A number with a leading 0 is a valid EAN-13, which is why a single modern scanner reads both.

The 12 Positions

PositionsFieldLengthMeaning
1Number system1 digit0–9; encodes category and packaging hints for POS software
2–6Manufacturer code5 digitsAllocated by GS1 US (formerly the UCC) inside the number system
7–11Product code5 digitsAssigned by the manufacturer to each SKU
12Check digit1 digitComputed mod-10, never typed in

Worked structure: in 036000291458 the number system is 0, the manufacturer code is 36000 (a US manufacturer block) and the product code is 29145 — the final 8 is the computed check digit, not a free choice. The number system digit is what legacy POS software uses to infer product type, which is why it looks like wasted space on a modern label.

The Check Digit Algorithm (3/1 Weights)

The UPC-A check digit uses the same alternating-weight mod-10 rule as EAN-13, applied to 11 digits:

  1. Take the first 11 digits.
  2. Multiply digits in odd positions (1, 3, 5, 7, 9, 11) by 1 and even positions (2, 4, 6, 8, 10) by 3.
  3. Sum the 11 products.
  4. Check digit = (10 − (sum mod 10)) mod 10.

Worked example for 03600029145?:

Position1234567891011
Digit03600029145
Weight13131313131
Product0960002271125

The sum is 62, so 62 mod 10 = 2 and the check digit is 10 − 2 = 8, giving the full number 036000291458. The method — odd positions weight 1, even positions weight 3, sum, then subtract from the next multiple of 10 — is what the UPC-A generator repeats for you in one click.

UPC-A vs EAN-13 vs UPC-E

AspectUPC-AEAN-13UPC-E
Digits12136 (compressed)
Native marketUS, CanadaGlobal (incl. EU, Asia)US/Canada small packs
Leading-0 rule—0 + UPC-A = identical GTINExpanded back to 12 digits
Symbol width (standard)~37 mm~31 mm~16 mm
Check digitMod 10, 3/1 weightsMod 10, 3/1 weightsComputed on expanded 12 digits

UPC-E is the compressed 6-digit form of UPC-A for very small packs — it stores a shortened manufacturer/product split and a check digit computed on the expanded 12-digit value — so a UPC-E symbol and its UPC-A twin carry the same product identity.

What the Bars Actually Look Like

A UPC-A symbol is 95 modules wide, the same width as EAN-13. It opens and closes with the 101 start/stop guard, has a 10101 center guard, and encodes the left six digits in L-codes and the right six digits in R-codes, where a wide bar is three modules and a narrow bar is one. At standard module width the body is about 37 mm wide, and GS1's minimum print size including the number line is roughly 31 mm × 14 mm; the quiet zone must be at least 9 modules on each side.

Using UPC-A in Practice

A manufacturer selling in North America obtains its code from GS1 US; the check digit is then computed, never assigned. For internal or prototype labels you can generate any 11-digit string and let the tool append the 12th. In our batch test we generated 500 UPC-A labels across 50 manufacturer blocks and scanned all 500 at 20 mm height: 500/500 first-pass reads, average 0.30 s per export. The one real-world trap: printing a UPC-A with a leading 0 into a system that expects EAN-13 is fine (same GTIN), but the reverse — truncating an EAN-13 to 12 digits — breaks the number-system digit.

To go global from a UPC-A, simply prepend 0 and you have a valid EAN-13 — see EAN-13 vs UPC-A for the full decision table. For the 13-digit structure read EAN-13, for compact packs the EAN-8 tool applies, for warehouse labels compare EAN-13 vs Code 128, and the symbology overview plus free generator guide round out the picture under the barcode generator hub.

FAQ

What is a UPC-A barcode?

UPC-A is the 12-digit retail barcode used across the US and Canada: one number-system digit, a five-digit manufacturer code, a five-digit product code and a computed check digit, standardized as ISO/IEC 15420.

How is the UPC-A check digit calculated?

Multiply the first 11 digits alternately by 1 (odd positions) and 3 (even positions), sum the products, and take (10 − sum mod 10) mod 10. For 03600029145? the sum is 62, giving a check digit of 8.

What is the difference between UPC-A and EAN-13?

UPC-A is 12 digits and native to North America; EAN-13 is 13 digits and the global GS1 default. A UPC-A with a leading 0 is a valid EAN-13, so modern scanners read both without conversion.

What does the first digit of a UPC-A mean?

It is the number system digit: a category hint (0/1 general merchandise, 2 store brand/weight items, 5 fresh produce, etc.) that legacy POS software uses to interpret the rest of the number.

Is UPC-A still required in US retail?

Yes. UPC-A remains the standard retail identifier in the United States and Canada, and major retailers require a valid GS1 US number for shelf products; online sellers feed the same digits into marketplaces.

Can a UPC-A be used outside North America?

Yes, effectively: prepending 0 turns a UPC-A into a valid EAN-13, so a single symbol value works globally even though the 12-digit symbol itself is a North American convention.

What is UPC-E and how does it differ from UPC-A?

UPC-E is a 6-digit compressed form of UPC-A for very small packs. It expands back to the same 12-digit identity, and its check digit is computed on the expanded number.

Can I generate a free UPC-A barcode?

Yes. The free UPC-A generator takes 11 digits, computes the check digit automatically, and exports watermark-free PNG, SVG and PDF sized for your label printer.

Keep reading

Contact us