# How Do UPC Codes Work?

Have you ever wondered what that numbered zebra stripe on the box of every purchase really means? Yes, your fears are true. It does contain secret messages the manufacturer is trying to communicate to the bar code scanner. But we have a secret decoder ring you can use to figure them out using your brain powers.

So let’s take a look at the sets of numbers found on a every UPC bar code. The numbers mean the same thing as the lines, but those aren’t very user-friendly for humans. Here’s what the different numbers mean:

1st: Product category.
2-6: Manufacturer ID.
7-9: Family code – delineates the specific product, including size.
10-11: Value code – establishes any applicable coupons.
7-11: Together the family and value code form the Item Number. It is assigned by the manufacturer’s UPC code coordinator who is in charge of keeping all the UPC numbers straight and unique.
12: Check digit – a “check sum” that makes sure all the previous numbers were read correctly. It’s computed based on a formula involving all the previous numbers. This formula is called the “Mod10Method” or “Luhn algorithm” and it works like this:

1. Working from right to left, assign the first number on the right as odd, the second as even, the third as odd, etc.
2. Add up all the odd digits and multiply by 3.
3. Add up all the even digits.
4. Add up the results of 2 and 3.
5. Divide that by 10. The check digit is the number that when added to the remainder equals 10.

So now when we have to get bar codes on the back of our necks, you’ll be able to look at your friend’s and tell which fertilization plant he came from.

Learn what bar code numbers mean in the wake of major cereal recall [The Hot Word]
Universal Product Code [Wikipedia]

RELATED: Credit Card Numbers Decrypted

1. Alvis says:

Code codes?

PIN Number.

• wrjohnston91283 says:

ATM Machine

• YamiNoSenshi says:

CAT tests.

• jessjj347 says:

Chai tea latte

• aja175 says:

nic card

• NarcolepticGirl says:

RF frequency

2. jeff_the_snake says:

i got an android app that scans and saves all those keytags you need for sale prices at every single store in the world. it just displays the barcode for the cashier to scan. now i don’t have to explain to every 10th cashier how it’s impossible to hack a computer with a barcode, i can just show him a printout of this.

• PanCake BuTT says:

I think you’re the only that has that app. Watch out now !

• kosmo @ The Soap Boxers says:

CardStar? It’s on the iPhone, too. It make the cut as one of the my tech writer’s top 10 iPhone Apps ( http://www.observingcasually.com/the-best-iphone-apps/ ). I don’t have it (don’t have a smart phone) but see how it could come in handy when trying to reduce wallet/keychain clutter.

• RadarOReally has got the Post-Vacation Blues says:

Well, color me impressed!

• NarcolepticGirl says:

yeah, thats what we use, too.

• Egat says:

actually, nothing in this article changes the fact it’s completely possible to use a malformed UPC to cause unwanted behavior (hack, if you must) on a computer running a poorly written UPC scanning program…

3. Tim says:

Okay, so five digits (the family code plus value code) make the item number. What happens when a manufacturer makes more than 10,000 items?

Also, there are five digits for the manufacturer code. What happens when there are more than 10,000 manufacturers?

• nbs2 says:

Seriously though, like that’s ever going to happen. Next thing you know, you’ll be telling me that we could run out of IPv4 addresses.

• TGT says:

99,999, but it’s still a good point.

• FatLynn says:

This is actually not a set rule. The company code can be as many as 9 digits.

http://www.gtin.info/upc/

• Merricat says:

You add digits. Just like the ISBN did.

http://www.isbn.org/standards/home/isbn/transition.asp

Which is also why we have the EAN. https://secure.wikimedia.org/wikipedia/en/wiki/European_Article_Number which was designed mostly to replace the UPC and is designed to be a superset of the UPC, with 13 digits.

• kosmo @ The Soap Boxers says:

It would be 100,000 and not 10,000 (00000 through 99999). And it would be 100,00 manufacturers within a product category. Granted, it must be a pretty broad category, since category code is just a single digit.

4. grumblingmumbles says:

You know you’ve worked with UPCs too long when you can do the math for check digits in your head, especially for 14 digit ones…..

damn you re-di!

5. ReverendLoki says:

How do UPC Codes Work? It’s an Effin’ Miracle.

• hatemonger says:

I came in here hoping to see this meme, but you’re a little off… “Effing UPC codes. How do they work?”

6. PanCake BuTT says:

Does anyone else find that picture a bit disturbing ? Possible child negligence ?

I guess that is what happens to kids left unattended in coffee shops ?

• psm321 says:

Seriously?

• Clyde Barrow says:

Nah,,,I think it’s that kid for sale outside that Wal-Mart from last week.

7. TGT says:

is it just me, or should the Mod10Method mod by 10, not divide by 10?

8. vastrightwing says:

And now for the rest of the story. These codes, not the barcode itself, are controlled by GS1. Yes, these codes are proprietary and in order to get a real code, you have to pay GS1 hundreds of dollars to become a member and then you have to pay for each block of codes and give them all kinds of information on how you’re going to use these codes. Depending on what you tell these people, the cost will change. They frown on people buying blocks of codes to resell to others who only need 1 or 2 codes. Yes, it is possible to obtain 1 or 2 codes, but from other sources. This is a real scam. I know, I tried to buy a set of 4 codes and found out the cost was out of sight! I ended up making up my own code thinking that the odds of bumping into someone else’s legit code was small. And so far, I’m right. I’ve had no problem. I fail to understand how GS1 can lock down and restrict such a thing as a number sequence and squeeze so much money for a 12 digit number. It’s a total rip!

9. FatLynn says:

No Idiocracy references yet?

• Clyde Barrow says:

I am working on keeping my big mouth shut. It’s a personal goal of mine.

10. xxmichaelxx says:

11. dreamfish says:

So the barcode represents a number and the number is split into pieces that have a specific meaning.

OMG!!!! IT’S THE START OF A NEW WORLD ORDER TO CONTROL US!!! TIN FOIL HAT TIME!!!!

12. Balaenoptera says:

If you look at the manufacturer ID code on a generic item and a brand name item, will it tell you if they were made by the same company and branded differently, or is that code based on the brand?

13. calchip says:

I don’t think the article is completely accurate. My company purchased barcoding rights from GS1. For us, the first 6 digits are our manufacturer ID, the other 5 digits are individual inventory items. We have different product “families” but all of our barcodes are sequential, issued by GS1.

And the earlier poster is correct about GS1’s outrageous rates. I think we have a block of 100 or 200 barcodes available to us, and GS1 charged \$750 to set up our account and something like \$200 a year to allow us to maintain our list of 100 numbers. Total racket.

Oh, and they don’t even provide you with any means for actually generating the barcode. For that, they want you to pay an exorbitant amount of money (\$1000?) for software to generate the barcodes. We found an online application that does it for free.

14. gman863 says:

I remember a story from a few years ago (I think it was here on the Consumerist) about a guy who was busted in Wal-Mart for covering the UPC code on a \$900 TV with one from a \$10 item and attempting to fool the store by going through the self-checkout.

On an unrelated note, the days of the UPC scanner code may be numbered. Many manufacturers and stores are researching the idea of replacing them with RFID (Radio Frequency Identification) chips, similar to those used in employee ID badges and “EZ-Tag” toll road passes. Allegedly this will allow an entire cart of 100+ items to be scanned in seconds without placing any of it on the counter.

• RandomHookup says:

Soon followed by the first case of employee theft for placing a tag for a \$25 on a \$3000 flat screen TV.

• jessjj347 says:

15. summeroflove says:

I actually do make my own barcodes at work.

16. elangomatt says:

Back when I worked in retail, there were some things that I had the price memorized for because people asked about the price a lot. I used to mess with people by looking at the barcode carefully (like I was reading it) and them telling them the price. Most people would react like OMG how did you know that? I told them that I could read the barcodes, waited a few seconds for another reaction, then told them that I just had that particular price memorized.

17. Clyde Barrow says:

Is this a picture of the kid for sale outside of a Wal-Mart last week?

18. yankinwaoz says:

Anyone here old enough to remember how Mad Magazine responded when forced to put a UPC code on their magazine cover?