
If the checkout scanner fails while you're rushing to grab a last-minute gift for a birthday party, don't worry—the cashier can still process your purchase by entering the number beneath the barcode. While that lengthy string of digits may appear random to you, there's actually a very structured system behind it.
The barcode found on most retail products in the U.S. and Canada is called a UPC-A, which stands for universal product code, and consists of 12 digits. As stated by Geeky Camel, the first digit signifies the product's category; for example, the number 3 represents health-related items, while 2 is used for certain weighted products like meat.
The following five digits identify the company that produced the product (assuming you’ve memorized a list of manufacturers’ UPC numbers). There's typically a space separating this number from the next set of five digits, which corresponds to the specific product.
The last digit is known as the check digit, which the system uses to confirm that all the other digits in the barcode have been correctly scanned or entered. This check digit is determined using a formula based on all the preceding numbers. To simplify, let’s say you're working with a three-digit number, where the final digit serves as the check digit. You calculate it by subtracting the first two digits from each other. For example, if the first two digits are 4 and 3, your check digit would be 1. If the cashier mistakenly types 421 instead of 431, the system would detect the mismatch in the check digit and trigger an error alert.
Naturally, UPC-A barcodes aren't the only type available. According to BizFluent reports, for smaller items that can't fit a full 12-digit barcode, UPC-E barcodes are used, which condense category, manufacturer, and product details into just six digits. Additionally, EAN-13 barcodes, common worldwide, include the same details as UPC-A barcodes but add a number representing the country where the barcode was registered. Various barcode formats also exist for books, mail, sheet music, and other items.
