MarkingBear

Bulk Barcode & QR Generator

Home Academy
Barcode & QR Academy

Barcode basics

How Modulo-10 Check Digits Work in EAN-13, UPC-A, and ITF-14 (With Examples)

August 11, 2026 3 min readBarcode & QR Academy Team

The last digit of an EAN-13, UPC-A or ITF-14 barcode is not part of your product number. It is a checksum that scanners recalculate on every read. If it does not match, the scanner stays silent — which is why a batch of labels can look perfect and still fail at the till. The rule behind it is simple arithmetic, and once you have seen it done by hand you will never mistype a code again.

Why a check digit exists at all

Barcodes are read in tough conditions: creased film, smudged thermal ink, a scanner swept at an angle. A checksum gives the reader a cheap way to ask "did I really read that correctly?" before it sends the number to your point of sale.

Because the check digit is calculated from the digits in front of it, a single misread or transposed digit almost always breaks the sum. The scanner throws the read away instead of charging a customer for the wrong item.

The Modulo-10 formula, step by step

EAN-13, UPC-A and ITF-14 all share the same idea: weight the digits alternately by 1 and 3, add them up, then pad to the next multiple of ten.

  1. 1Write the code without its final digit.
  2. 2Working from the right-hand end of that shortened code, weight the digits 3, 1, 3, 1, … so the rightmost digit gets a weight of 3.
  3. 3Multiply each digit by its weight and add the results together.
  4. 4Round the total up to the next multiple of 10.
  5. 5Subtract the total from that multiple. The remainder is your check digit. If the total is already a multiple of 10, the check digit is 0.

Worked examples you can follow on paper

EAN-13: 590123412345 → 5901234123457

Weight the twelve digits alternately 1, 3, 1, 3 … starting with weight 1 on the leftmost digit: (5×1) + (9×3) + (0×1) + (1×3) + (2×1) + (3×3) + (4×1) + (1×3) + (2×1) + (3×3) + (4×1) + (5×3) = 83.

The next multiple of ten above 83 is 90, and 90 − 83 = 7. The finished code is 5901234123457. Change one digit anywhere in the number and that final 7 changes too — which is exactly the point.

UPC-A: 03600029145 → 036000291452

UPC-A carries 11 data digits plus one check digit. Weight from the right with 3, 1, 3, 1 …, add, pad to the next ten, subtract. For 03600029145 the sum lands on 58, the next multiple of ten is 60, and the check digit is 2.

ITF-14: 1540141253521 → 15401412535210

ITF-14 is used on outer cases and shipping cartons. It holds 13 data digits and the same Modulo-10 check digit, so the arithmetic is identical — only the length and the printed shape differ. For 1540141253521 the weighted total is 70, which is already a multiple of ten, so the check digit is 0.

Digit counts at a glance

MarkingBear accepts the short form and appends the check digit for you. Paste the full-length version instead and it is verified rather than extended — if the last digit is wrong the error names the digit that should be there.

What to type into a generator, and what it produces
FormatDigits you typeDigits after the check digitTypical use
EAN-1312 (or 13 to verify)13Retail products outside North America
UPC-A11 (or 12 to verify)12Retail products in the US and Canada
ITF-1413 (or 14 to verify)14Cases, cartons and pallet labels

Common mistakes that break a whole print run

  • Spreadsheets silently dropping leading zeros — format the code column as text before exporting a CSV.
  • Long codes turning into scientific notation (5.90123E+12) on export.
  • Copying codes with spaces or hyphens; these formats are digits only.
  • Reusing a supplier's check digit after editing the product number in front of it.
  • Trusting a screen preview instead of scanning one printed test label.