What Is UPC Code – Meaning, Structure, and How It Works

TL;DR:
UPC stands for Universal Product Code. A UPC code is a 12-digit number with a barcode that identifies a product in a store. Stores use it to track items, and GS1 manages the system.

image showing UPC Code

What Is a UPC Code?

A UPC is a unique product number printed as a barcode. The barcode has black bars and white spaces. The 12 digits sit below the bars.

  • The bars are for machines. A scanner reads them.
  • The digits are for people. You can type them into a search box.
  • Every UPC is a GTIN-12, a 12-digit Global Trade Item Number under GS1 US standards.

Here is a real example: 036000291452. Look at the back of any snack packet. You see a number like this one.

UPC Symbol vs UPC Label?

People use these two words as if they mean the same thing. They do not.

  • UPC symbol: This is the printed barcode graphic. It has the bars and spaces that a scanner reads.
  • UPC label: This is the sticker or packaging tag. It holds the symbol and the human-readable numbers together.

So the symbol is one part, and the label is the whole tag.

Why Do Stores Use UPC Codes?

Stores use UPCs to speed up checkout and improve accuracy. A cashier scans the barcode at the point-of-sale (POS) system, and the system finds the product in seconds.

  • Checkout is faster, and price mistakes are fewer.
  • Stores track how many items are left on the shelf.
  • Companies see which products sell well.
  • Online marketplaces, such as Amazon and Walmart, often ask sellers for a UPC when they list a product.

What Is UPC Barcode Structure? What Do the 12 Digits Mean?

The following table shows the UPC barcode structure and the meaning of the 12 digits.

PartDigitsWhat it does
Number system digit1st digitShows the type of product
Company prefixFirst 6 digits (includes the 1st digit)Shows which company owns the code
Item reference numberNext 5 digitsShows the exact product
Check digit12th digitChecks that the code is correct

The split between company prefix and item number can change. GS1 gives longer prefixes to some companies. Many UPCs use 6 digits for the company and 5 for the item.

The first digit has a meaning too:

  • 0, 6, 7, 8, and 9 appear on regular products.
  • 2 is for items sold by weight, such as meat.
  • 3 is for drugs.
  • 4 is for a store’s own use.
  • 5 is for coupons.

How Do You Read a UPC Code?

You read a UPC from left to right. Use the table above as your guide.

  1. Look at the first digit. It tells you the product type.
  2. Read the next digits up to the sixth. They show the company.
  3. Read the next five digits. They show the exact product.
  4. Check the last digit. It confirms the code is valid.

You cannot tell the product name from the digits alone. You need a database to match the number to a name.

How Do You Calculate the UPC Check Digit?

The check digit is the last digit of the UPC. The system calculates it from the other digits, and the point-of-sale system uses it to validate the code. The math behind it is a checksum, which is a simple form of error detection.

Use the example 036000291452. The first 11 digits are 0, 3, 6, 0, 0, 0, 2, 9, 1, 4, 5.

  1. Add the digits in odd positions (1st, 3rd, 5th, 7th, 9th, 11th): 0 + 6 + 0 + 2 + 1 + 5 = 14.
  2. Multiply that sum by 3: 14 × 3 = 42.
  3. Add the digits in even positions (2nd, 4th, 6th, 8th, 10th): 3 + 0 + 0 + 9 + 4 = 16.
  4. Add the two results: 42 + 16 = 58.
  5. Find the number that makes the total a multiple of 10. 58 needs 2 more to reach 60.

The check digit is 2. It matches the last digit of the code.

Should You Use a UPC Check Digit Calculator?

A UPC check digit calculator answers in one click. It is useful when you have many codes to test. Doing the math by hand is better when you learn the idea, because you see why the digit works.

Expert insight: This check catches any single wrong digit. It also catches most swaps of two neighboring digits. It misses a swap when the two digits differ by exactly 5, such as 2 and 7.

How Does a Barcode Scanner Read a UPC Code?

A scanner reads the pattern of bars and spaces and turns it into digits. Here is how it works:

  1. The scanner shines light on the barcode. A laser or a camera does this.
  2. Dark bars reflect less light than white spaces.
  3. The scanner measures the width of each bar and space.
  4. Each digit uses a fixed pattern of 7 thin units. The whole UPC-A barcode uses 95 units.
  5. Special guard patterns mark the start, the middle, and the end of the code.
  6. The left half and the right half use different patterns. This lets the scanner read the code even when it is upside down.
  7. The scanner checks the check digit. If the digit is wrong, the scan fails.
  8. The POS system looks up the product number and finds the price.

Common myth: The barcode does not hold the price. It holds only the product number. The store keeps the price in its database. This lets a store change a price without changing the barcode.

Why Do Barcode Scanners Sometimes Fail to Read a UPC?

A scanner fails when it cannot see a clean pattern. These are the most common causes:

  • Low print contrast: Light bars on a light background are hard to see.
  • Ink bleed: Bars that spread make the thin lines too wide.
  • Curved packaging: A round bottle bends the bars and changes their width.
  • Missing quiet zone: The quiet zone is the blank white margin on both sides of the barcode. The scanner needs it to find where the code starts and ends. Text or art that touches the bars breaks the scan.
  • Damage: Scratches, wrinkles, or smudges hide parts of the code.

When a scan fails, the cashier types in the 12 digits by hand. The check digit then catches a typing mistake.

What Are the Types of UPC Codes?

The two main types of UPCs are UPC-A and UPC-E. Stores use UPC-A on almost all products. UPC-E is a shorter form for very small packages. A few older types also exist, but you rarely see them.

What Is a UPC-A Code?

UPC-A is the standard UPC. People mean this type when they say “UPC.”

  • It has 12 digits.
  • It has a number system digit, a company prefix, an item number, and a check digit.
  • It is also called a GTIN-12.
  • It works on almost all retail products, such as food, books, toys, and electronics.
  • A UPC-A barcode has 95 thin units across, including the start, middle, and end guard patterns.

Most packages have enough space to print this full code. That is why UPC-A is the most common type.

What Is a UPC-E Code?

UPC-E is a short version of UPC-A. The “E” means the code is compressed.

  • It prints 8 digits: the number system digit, 6 digits, and the check digit.
  • It fits on small packages, such as a lipstick tube, a tube of glue, or a small candy.
  • It uses zero suppression, which removes extra zeros from the company and item numbers.
  • It stands for the same 12-digit number as a UPC-A.

Not every product can use UPC-E. The full 12-digit code must have enough zeros to remove. A product without those zeros must use UPC-A.

What Is the Difference Between UPC, EAN, GTIN, SKU, and QR Code?

These terms look similar, but they are not the same. The following clarifies the difference between UPC, EAN, GTIN, SKU, and QR Code.

CodeLengthWho uses itWhat it does
UPC12 digitsUS and CanadaIdentifies a retail product
EAN-1313 digitsMost of the worldIdentifies a retail product
GTIN8 to 14 digitsGlobalThe main name for all these product numbers
SKUAny lengthOne store or sellerTracks stock inside one business
QR codeVariesAnywhereHolds more data, such as a web link

Who Invented the UPC Code, and When Did It Start?

Joe Woodland first drew a barcode in the sand on Miami Beach in 1949. His round “bull’s-eye” idea was an early step. In the early 1970s, IBM engineer George Laurer finalized the rectangular layout we know today. An industry committee chose his design over the bull’s-eye.

The first UPC scan happened at 8:01 a.m. on June 26, 1974, at a Marsh supermarket in Troy, Ohio. The item was a 10-pack of Wrigley’s Juicy Fruit gum. The register rang up 67 cents. Marsh Supermarket was the first store to scan a UPC. Other stores had tested barcode scanners before it.

How Do Businesses Get a UPC Code? (GS1 Barcode Registration)

A business gets UPCs through GS1 barcode registration. You cannot make up your own. Each code must come from GS1 so that it stays unique and valid.

  1. Count how many products and variants you sell.
  2. Register with GS1 US and get a company prefix.
  3. Give each product its own item number.
  4. Add the check digit.
  5. Print the barcode on the package.

Each variant, such as a different size or color, needs its own UPC. The cost depends on how many codes you need, so check the current price on the GS1 US website.

Warning: Some sellers offer cheap UPCs online. These codes may belong to another company’s prefix. Marketplaces can reject them, so it is safer to buy from GS1.

What I Teach My Students About UPC Codes

I ask each student to bring a common snack packet or chocolate wrapper to school. Once they place them on their desks, the exercise begins:

  1. The 12-Digit Hunt: Students locate the 12-digit UPC number printed beneath the barcode and write it down in their notebooks.
  2. The Manual Math Test: Using the exact algorithm we cover in class, they separate the odd and even positions, multiply by 3, and manually calculate the check digit.

Teaching Tip: If you are teaching, encourage students to test a deliberately altered digit (change one number by 1) and recalculate. Seeing how the math immediately flags the error provides a phenomenal, intuitive grasp of real-world data error detection and checksums.

Is the UPC Code Going Away in 2027?

No. The UPC is not going away in 2027. A change called GS1 Sunrise 2027 adds a new type of barcode next to it.

  • The goal is that by the end of 2027, retail checkout systems can read 2D barcodes. These are QR codes with a GS1 Digital Link, or GS1 DataMatrix codes.
  • The UPC is not being banned.
  • During the change, a package can carry both a UPC and a 2D code.
  • Sunrise 2027 is an industry plan, not a law.
  • A 2D code can hold more data. Examples are a web link, a batch number, or an expiry date.

A GS1 US leader said the UPC will not disappear overnight. You still learn the UPC today, and it still works at every checkout.

FAQs

What is the difference between a UPC and a SKU?

A UPC is a global product number that GS1 issues. A SKU is a private code that one store or seller creates for its own stock.

Can I make my own UPC?

No. GS1 issues UPCs so that every code stays unique. A fake or copied code can cause errors in stores and online marketplaces.

About the Author

Picture of Muneeb Tariq

Muneeb Tariq

Muneeb Tariq is a Computer Science graduate and the founder of Educatecomputer. As a dedicated Computer Science Educator, he has dedicated himself to making technology simple and easy to understand for everyone. Muneeb takes complex technical topics and breaks them down into clear, straightforward lessons so that anyone can learn without feeling overwhelmed. His goal is to help people understand technology through honest and practical guidance, empowering them to confidently use digital tools in their daily lives.

Leave a Comment