How to calculate a UPC or EAN check digit by hand

Last updated October 28, 2026

The last digit of a UPC-A (12 digits), EAN-13 (13 digits) or EAN-8 (8 digits) is a check digit. Scanners and listing systems use it to catch typing mistakes. The arithmetic is short enough to do on paper, and it is the same for every GTIN length. Note that a correct check digit only means the number is well formed. It does not mean the number is licensed to you (see our guide on GS1 licensing).

The method

  1. Write down the digits without the check digit.
  2. Starting from the rightmost digit of what you wrote, multiply the digits alternately by 3 and by 1: the rightmost by 3, the next to its left by 1, then 3, then 1, and so on.
  3. Add all the products.
  4. The check digit is the number you must add to that sum to reach the next multiple of 10. If the sum is already a multiple of 10, the check digit is 0.

Example 1: a 13-digit EAN

This is the example GS1 uses on its own page. The number without its check digit is 629104150021.

Digit629104150021
Multiply by131313131313
Product66930121150023

The sum is 57. The next multiple of 10 is 60, so the check digit is 3 and the full number is 6291041500213.

Example 2: a 12-digit UPC-A

Body (11 digits): 03600029145. From the right the multipliers are 3, 1, 3, 1…, so the products are 5×3=15, 4×1=4, 1×3=3, 9×1=9, 2×3=6, 0, 0, 0, 6×3=18, 3×1=3 and 0×3=0. The sum is 58, the next multiple of 10 is 60, and the check digit is 2: 036000291452.

Checking a number you already have

Do the same calculation on all digits except the last, and compare the result with the last digit. If they differ, a digit was mistyped or two were swapped (swapped neighbours are usually, though not always, caught).

In a spreadsheet

Keep the number as text (format the column as text so leading zeros survive). Put one digit per cell with =VALUE(MID($A2,1,1)), =VALUE(MID($A2,2,1)) and so on, and a row of weights above them that ends in 3 on the right: 1, 3, 1, 3… for a 12-digit body, or 3, 1, 3, 1… for an 11-digit body. Then the sum is =SUMPRODUCT(weights,digits) and the check digit is =MOD(10-MOD(sum,10),10). Test it on the two examples above before trusting it on real data.

Barloom has a check-digit calculator and verifies UPC-A, EAN-13 and EAN-8 numbers in label lists before it draws them; it runs in your browser and does not upload the numbers.

Sources

  1. GS1, "How to calculate a check digit manually": https://www.gs1.org/services/how-calculate-check-digit-manually (read 2026-10-27)
  2. GS1, "EAN/UPC barcodes": https://www.gs1.org/standards/barcodes/ean-upc (read 2026-10-27)

Related tool: Barloom. Estimates and guidance only; check the source documents before relying on a figure.

More Barloom guides

All guides