The Check Digit

The last digit of a UPC or EAN barcode is called a check digit.
This number lets the scanner (and the computer attached to it) know if the number was scanned properly or not.   It is a very important part of the barcode.

The first 11 digits of a UPC barcode or the first 12 digit of an EAN barcode are a combination of the prefix and the numbers assigned to a particular product. The final check digit is a mathematical algorithm weaving through the first 11-digits 

The number at the far right is the check digit. In this case, it’s a 7. If you want to compute the check digit for a UPC-A Barcode in Excel, do the following: 

Positions

UPC EAN Multiply by equals
N1

0

1

0

N2

7

7

3

21

N3

5

5

1

5

N4

3

3

3

9

N5

1

1

1

1

N6

8

8

3

24

N7

2

2

1

2

N8

9

9

3

27

N9

5

5

1

5

N10

3

3

3

9

N11

4

4

1

4

N12

2

2

3

6

SUM

113

Subtract the sum from the nearest equal or higher multiple of 10. (90 would be 90, 92 would be 100, etc.)
In this example the next highest multiple of 10 is 120.

120-113 = 7: 7 is the check digit.

The number in C1 is the check digit, the number in cell D1 is the complete barcode number with check digit. 

There is no hidden data built into a barcode, there is no pricing information, there is no product information. The bars represent only the 12-digit number.

The way that it works is:

  • The manufacture affixes the barcode to the product.
  • The retailer inputs information about the product into their back-end computer that controls and communicates to all of the store’s Point of Sales systems (cash register).
  • The customer brings up their purchase to the front counter, the item is scanned and the POS system communicates to the back-end system pulling the information about the product.
  • The info is printed on the sales receipt, the price is charged and then, the items are deducted from the store’s inventory.