1.5.2. Check Digit Calculation

In the UPC-A system, the check digit is calculated as follows:

  1. Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.
  2. Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result.
  3. Find the result modulo 10 (i.e. the remainder when divided by 10.. 10 goes into 58 5 times with 8 leftover).
  4. If the result is not zero, subtract the result from ten.

For example, a UPC-A barcode (in this case, a UPC for a box of tissues) 03600029145X" where X is the check digit, X can be calculated by

  1. adding the odd-numbered digits (0 + 6 + 0 + 2 + 1 + 5 = 14), multiplying by three (14 × 3 = 42),
  2. adding the even-numbered digits (42 + (3 + 0 + 0 + 9 + 4) = 58),
  3. calculating modulo ten (58 mod 10 = 8),
  4. subtracting from ten (10 - 8 = 2).

The check digit is thus 2.

This should not be confused with the real numeral "X" which stands for a value of 10 in modulo 11.