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 11digits
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 UPCA Barcode in Excel, do the following:
Positions  UPC  EAN  Multiply by  equals 
N_{1} 
0 
1 
0 

N_{2} 
7 
7 
3 
21 
N_{3} 
5 
5 
1 
5 
N_{4} 
3 
3 
3 
9 
N_{5} 
1 
1 
1 
1 
N_{6} 
8 
8 
3 
24 
N_{7} 
2 
2 
1 
2 
N_{8} 
9 
9 
3 
27 
N_{9} 
5 
5 
1 
5 
N_{10} 
3 
3 
3 
9 
N_{11} 
4 
4 
1 
4 
N_{12} 
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. 120113 = 7: 7 is the check digit.