UPC-A Specification

The UPC-A barcode is the most common and well-known symbology in the United States. You can find it on virtually every consumer goods in your local supermarket, as well as books, magazines, and newspapers. There are a number of UPC variants, such as UPC-E, UPC 2-digit Supplement, UPC 5-digit supplement.

UPC-A encodes 11 digits of numeric data along with a trailing check digit, for a total of 12 digits of barcode data.

Structure of a UPC number

A UPC-A number consists of four areas: (1) The number System; (2)The manufacturer code; (3) the product code; (4)The check digit. Normally the number system digit is printed to the left of the barcode, and the check digit to the right. The manufacturer and product codes are printed just below the barcode, separated by the guard bar.

  • Number System. The number system is the first digit in a UPC number. It identifies the type of the product. For example, if the barcode starts with digit 5, this barcode is a coupon code.

  • Manufacturer Code. The manufacturer code is assigned by the GS1 organization to each manufacturer or company which distributed goods that uses UPC-A barcode. You cand find your local GS1 organization at http://www.gs1.org.

    Traditionally manufacturer code was 5 digits in length. However the numbers have been running out and new customers are now getting 8-digit manufacturer code, meaning that there are only 100 item codes available to assign.

  • Product Code. The product code is assigned by the manufacturer. Because the combined length of manufacturer code and the product code is 10 digits, the number of product codes available depend on the length of manufacturer code.

  • Check Digit. The check digit is used to verify that the barcode is generated or scanned correctly. The check digit is calculated based on the rest of the barcode digits. Read the following section to learn how to calculate the check digit.

Table 1. Number System List

Number System (NS)Description
0Regular Item
1Regular Item
2Reserved for local use (store/warehouse), for items sold by variable weight. Variable-weight items, such as meats and fresh fruits and vegetables, are assigned a UPC by the store, if they are packaged there
3Drugs by National Drug Code number. Pharmaceuticals in the U.S. have the remainder of the UPC as their National Drug Code (NDC) number; though usually only over-the-counter drugs are scanned at point-of-sale, NDC-based UPCs are used on prescription drug packages and surgical products and, in this case, are commonly called UPN Codes.
4Reserved for local use (store/warehouse), often for loyalty cards or store coupons.
5Coupons.The last two digits determines the amount of the discount. See this link for the details. The remaining contain manufacturer and item information.
6Regular Item
7Regular Item
8Regular Item


A UPC-A symbol can be divided into two halves, each consisting of six digits separated by a center guard bar pattern. The whole symbol is surrounded by two guard bar patterns. The same digit has different encoding depends whether it is in the left haf or in the right half. The encoding pattern for digits in the left halve always starts with a space while the one for digits in the right halve always start with a bar and ends with a space.

A UPC-A symbol has the following structure:

  1. Start guard bars, always with a pattern bar+space+bar.

  2. Left halve, six digits encoded using the encoding schema A or B;

  3. Center guard bars, with a pattern space+bar+space+bar+space.

  4. Right halve, six digits encoded using the encoding schema C.

  5. Stop guard bars, always with a pattern bar+space+bar.

Check Digit Calculation

UPC-A check digit is calculated using standard Mod10 method. Here outlines the steps to calculate UPC-A check digit:

  1. From the right to left, start with odd position, assign the odd/even position to each digit.

  2. Sum all digits in odd position and multiply the result by 3.

  3. Sum all digits in even position.

  4. Sum the results of step 3 and step 4.

  5. divide the result of step 4 by 10. The check digit is the number which adds the remainder to 10.

A web-based free utility to calculate UPC-A check digit is available at http://www.morovia.com/education/utility/upc-ean.asp.