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.