UPC & EAN Modulo-10 check digit formula

The last digit of every UPC-A, EAN-13, and GTIN-14 is computed from all preceding digits using GS1's Modulo-10 algorithm—catching single-digit typos and adjacent transpositions at the scanner.

CZCrane ZhouVerified November 14, 2026 4 min read

One universal rule for UPC-A, EAN-13, and GTIN-14

People often get confused because UPC-A multiplies odd positions by 3 while EAN-13 multiplies even positions by 3. That only happens if you count from the left! GS1's actual specification counts from the rightmost payload digit leftward—starting with weight 3 every time, regardless of code length:

  • Step 1: Drop the check digit so you have the payload (11 digits for UPC-A, 12 for EAN-13, 13 for GTIN-14).
  • Step 2: Starting from the rightmost payload digit and moving left, alternate weights 3, 1, 3, 1, 3, 1...
  • Step 3: Multiply each digit by its weight and add all products together.
  • Step 4: Find the remainder mod 10. If it is 0, the check digit is 0; otherwise subtract the remainder from 10: (10 − (sum mod 10)) mod 10.
Payload (03600029145)DigitsCalculationResult
Weight ×3 positions (1st, 3rd, 5th, 7th, 9th, 11th)0, 6, 0, 2, 1, 5(0 + 6 + 0 + 2 + 1 + 5) × 342
Weight ×1 positions (2nd, 4th, 6th, 8th, 10th)3, 0, 0, 9, 43 + 0 + 0 + 9 + 416
Total & Modulo-10 check digit42 + 16 = 58Next multiple of 10 is 60 → 60 − 582 (036000291452)

Copy-paste Excel & Google Sheets formula for 11-digit UPC payloads

If cell A2 contains an 11-digit UPC payload stored as text (for example, 03600029145), this formula returns the complete 12-digit UPC-A string with its check digit:

=A2 & MOD(10 - MOD(3*(MID(A2,1,1)+MID(A2,3,1)+MID(A2,5,1)+MID(A2,7,1)+MID(A2,9,1)+MID(A2,11,1)) + (MID(A2,2,1)+MID(A2,4,1)+MID(A2,6,1)+MID(A2,8,1)+MID(A2,10,1)), 10), 10)

Remember that fixing a check digit only makes the symbol mathematically scannable—it does not register a number with GS1. If a 12-digit UPC from your supplier fails verification, check whether a payload digit was mistyped before overwriting the 12th digit.

Instant Check Digit Calculator

Single PNG or SVG free. Full sheets: 3 free on sign-up.

Verify a check digit now

Questions

It catches 100% of single-digit errors (typing 5 instead of 6) and ~89% of adjacent transpositions (swapping 12 to 21—every pair except 09/90, 18/81, 27/72, 36/36, 45/54 where |a − b| = 5).