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


Edit Your Comment

  1. Alvis says:

    Code codes?

  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.

  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?

  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 ?

  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?

  10. xxmichaelxx says:

    Impress your friends: (related)

  11. dreamfish says:

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


  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.

  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?

    • Clyde Barrow says:

      LOL,,,awesome and thank you. I remember that mag and I was 16 and I bought it. Awww, the good ole days.

    • Fafaflunkie Plays His World's Smallest Violin For You says:

      You may be dating yourself, as will I right now – but if you also remember, MAD would also caption that UPC code with some humourous sentence. They kept doing this through much of the 80s; methinks they stopped it around 1988, but I’m not totally sure. Keep looking through those MAD covers beyond 198–I think they kept doing the UPC joke until around issue 240.

  19. jessjj347 says:

    Does 10-11: Value code – establishes any applicable coupons
    then relate to the codes on coupons?