Skip to content
ScanHatch

Check Digit Calculator

Enter the digits of an EAN, UPC or ITF-14 number without the last digit, and see its check digit and how it was worked out.

Format

Enter the first 12 digits of the EAN-13. Spaces and hyphens are ignored.

Privacy: Checks run in your browser. Images and values aren't sent to ScanHatch or stored. Privacy policy

How the GS1 check digit works

EAN-13, EAN-8, UPC-A and ITF-14 all use the same GS1 “mod 10” method. Starting from the digit next to the check digit and moving left, multiply the digits alternately by 3 and 1. Add up the results, then find the amount needed to reach the next multiple of 10. That amount (0–9) is the check digit.

The weighting is always anchored at the right-hand end, which is why the same rule works for 8, 12, 13 and 14 digits: the digit immediately before the check digit is always multiplied by 3.

Why barcodes have check digits

The check digit lets a scanner or system catch mistakes. The GS1 method detects every error where a single digit is wrong, and most cases where two neighbouring digits are swapped. The exception is a swap of two digits that differ by 5 (such as 1 and 6), which produces the same total.

EAN-13 example: 4006381333931

Twelve digits, then the check digit. Weights alternate 1, 3, 1, 3… from the left, so the digit next to the check digit is multiplied by 3.

EAN-13 example calculation
Digit400638133393
× Weight131313131313
= Product40018324193999
  1. 1. Add the products: 4 + 0 + 0 + 18 + 3 + 24 + 1 + 9 + 3 + 9 + 9 + 9 = 89
  2. 2. Round up to a multiple of 10 (unchanged if it already is one): 90
  3. 3. Subtract: 90 − 89 = 1. The check digit is 1.

EAN-8 example: 96385074

Seven digits. Because the count is odd, the weights start with 3 on the left: 3, 1, 3, 1, 3, 1, 3.

EAN-8 example calculation
Digit9638507
× Weight3131313
= Product2769815021
  1. 1. Add the products: 27 + 6 + 9 + 8 + 15 + 0 + 21 = 86
  2. 2. Round up to a multiple of 10 (unchanged if it already is one): 90
  3. 3. Subtract: 90 − 86 = 4. The check digit is 4.

UPC-A example: 036000291452

Eleven digits, weighted 3, 1, 3, 1… from the left. It's the same calculation as EAN-13 with a leading 0, which is why UPC-A and EAN-13 check digits always agree.

UPC-A example calculation
Digit03600029145
× Weight31313131313
= Product0318000693415
  1. 1. Add the products: 0 + 3 + 18 + 0 + 0 + 0 + 6 + 9 + 3 + 4 + 15 = 58
  2. 2. Round up to a multiple of 10 (unchanged if it already is one): 60
  3. 3. Subtract: 60 − 58 = 2. The check digit is 2.

ITF-14 example: 15400141288763

Thirteen digits, weighted 3, 1, 3… from the left. The first digit is the packaging indicator and is included in the calculation.

ITF-14 example calculation
Digit1540014128876
× Weight3131313131313
= Product35120011216824718
  1. 1. Add the products: 3 + 5 + 12 + 0 + 0 + 1 + 12 + 1 + 6 + 8 + 24 + 7 + 18 = 97
  2. 2. Round up to a multiple of 10 (unchanged if it already is one): 100
  3. 3. Subtract: 100 − 97 = 3. The check digit is 3.

UPC-E is different

A UPC-E check digit isn't calculated from its own 8 digits. First expand it to the full UPC-A number, then apply the method above. For example, UPC-E 0425261 expands to UPC-A 04210000526, whose check digit is 4, so the complete UPC-E is 04252614. The EAN/UPC Validator includes a converter that does this for you.