How to Read a UPC Barcode: What the 12 Digits, the Bars and the Check Digit Mean

Every product on a store shelf carries the same little rectangle of black bars and twelve digits. Most people never look twice at it — until they're creating their own product listings, troubleshooting a code that won't scan, or wondering what those numbers actually say. So how do you read a UPC barcode?

The direct answer: a UPC is a 12-digit number. The first digit is the number system, the next ten identify the company prefix and the specific item, and the last digit is a check digit that proves the number was read correctly. The bars are simply that same number written in a pattern a scanner can read in a fraction of a second. Below we'll decode each part, show you how to verify a UPC by hand, and clear up what a barcode does not tell you.

Diagram of a UPC-A barcode showing the number system digit, the company prefix and item number, and the check digit The three parts of a 12-digit UPC: number system, company prefix plus item number, and the check digit.

The 12 Digits, Decoded

Take the classic example code 0 12345 67890 5. It breaks into three parts:

Part Digits in the Example What It Tells You
Number system 0 The type of code (regular product, weighed item, pharmacy, coupon)
Company prefix + item number 12345 67890 The block the number comes from, and the specific product within it
Check digit 5 A calculated digit that catches misreads and typos

The first digit: number system

The first digit, printed to the left of the bars, tells a register how to treat the code:

  • 0, 1, 6, 7, 8: regular retail products — the codes you'll use for your own products.
  • 2: random-weight items like meat, cheese, and produce, labeled in the store with the weight or price built into the code.
  • 3: pharmaceuticals and health products, which build the drug code into the UPC.
  • 4: in-store use, such as loyalty cards and store-printed labels.
  • 5 and 9: coupons.

The middle ten digits: company prefix and item number

The next ten digits do two jobs. The first part (often called the manufacturer code) identifies the block of numbers the code was issued from; the rest identifies one specific product. How the ten digits split depends on the size of the block: a large block has a shorter prefix and more digits left for items. For reading purposes, the important point is that the full 12-digit number is unique to one product.

The last digit: check digit

The final digit, printed to the right of the bars, is calculated from the other eleven. When a scanner (or you) runs the calculation and gets a different answer, something was misread. That's why a UPC with one wrong digit is rejected instead of ringing up the wrong product. We'll do the calculation step by step below.

How the Bars Work

The bars and spaces are the same twelve digits in a form a scanner can read:

  • Each digit takes up the same width — seven narrow "modules" — made of two bars and two spaces of varying thickness.
  • The longer bars at the left, middle, and right are guard bars. They mark the start, the center, and the end, so the scanner knows where the code begins and how wide each module is.
  • The left six digits and the right six digits are encoded differently, as mirror images of each other. That's how a scanner can read a code upside down or back to front and still get the right number.
  • Scanners see light, not ink. Dark bars absorb the scanner's light and white spaces reflect it. That's why black bars on a white background scan best, and why a code in red ink often won't scan at all. (Troubleshooting: why won't my barcode scan?)

What a Barcode Does Not Tell You

  • The price. The code only identifies the product. The price lives in each store's own system, which is why the same item can cost different amounts in different stores.
  • The product name or description. That information sits in store and marketplace databases that look the code up. (More: UPC databases and UPC lookup.)
  • Where the product was made. The digits don't reveal a country of manufacture. (Explained: the country-code myth.)

Step-by-Step: Check a UPC by Hand

Here's how to verify the check digit of 0 12345 67890 5:

  • 1

    Add the Digits in the Odd Positions

    Positions 1, 3, 5, 7, 9, and 11: 0 + 2 + 4 + 6 + 8 + 0 = 20.

  • 2

    Multiply That Sum by 3

    20 × 3 = 60.

  • 3

    Add the Digits in the Even Positions

    Positions 2, 4, 6, 8, and 10: 1 + 3 + 5 + 7 + 9 = 25.

  • 4

    Add the Two Results

    60 + 25 = 85.

  • 5

    Find What Rounds It Up to a Multiple of 10

    85 needs 5 to reach 90 — and 5 is exactly the last digit, so the code is valid. Rather not do the math? Paste any code into our free check digit calculator.

Other Barcodes You'll See

  • EAN-13: the 13-digit version used outside North America. Any UPC becomes an EAN-13 by adding a zero in front: 012345678905 is 0012345678905. (More: do you need both a UPC and an EAN?)
  • UPC-E: a compressed 8-digit form for very small packages, which only works for certain numbers.
  • ITF-14 / SCC-14: the 14-digit code printed on shipping cases. (Explained: master carton codes.)
  • Code 128: used on shipping labels and on Amazon's FNSKU labels. (More: Amazon FNSKU explained.)
  • QR codes and other 2D codes: square codes that can hold web links and much more data. (More: getting started with 2D barcodes.)

Frequently Asked Questions

What do the numbers under a barcode mean?

They're the same number the bars encode, printed so people can read it. On a UPC, that's the number system digit, the company prefix and item number, and the check digit.

Can I read a barcode with my phone?

Yes. Most phone cameras and free barcode apps will show the number. Any product name you see comes from a database lookup, not from the barcode itself.

Can two products have the same UPC?

They shouldn't. Each UPC should identify exactly one product. When two different products share a code, marketplaces and registers mix them up — which is why you should never copy a code from another product or make one up.

How do I get UPC codes for my own products?

Buy them. A barcode generator can draw an image, but it can't give you a legitimate number of your own. (Why: online barcode generators. How many to buy: how many UPC codes do I need?)

Get UPC Codes for Your Products

Authentic 12-digit UPC codes delivered in minutes, with barcode images ready to print. Buy once and own them forever.

Buy UPC Barcodes Now

How useful was this page?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.