Learn › Tool

Check digit calculator for EAN, UPC and ITF-14

Type the digits of a barcode number. The calculator finds a missing check digit or checks the last digit of a complete number. For 12- and 13-digit inputs, it shows both interpretations and the calculation step by step.

4 min read · updated 25 September 2026

Open as a barcode in the studio

What the calculator accepts

You typeIt is treated asResult
7 digitsEAN-8 without check digitcheck digit calculated
8 digitsEAN-8 (GTIN-8)validated
11 digitsUPC-A without check digitcheck digit calculated
12 digitsUPC-A (GTIN-12) or EAN-13 without check digitUPC-A validated; EAN-13 check digit calculated
13 digitsEAN-13 (GTIN-13) or GTIN-14 without check digitEAN-13 validated; GTIN-14 check digit calculated
14 digitsGTIN-14 (for example, in ITF-14)validated
17 digitsSSCC without check digitcheck digit calculated
18 digitsSSCC (logistics unit identifier)validated

Spaces and dashes are ignored, so you can paste a number straight from a spreadsheet or a GS1 certificate.

How the check digit is calculated

GTIN-8, GTIN-12, GTIN-13, GTIN-14 and SSCC use the same modulo-10 method:

  1. Start from the rightmost digit before the check digit and move left.
  2. Multiply that digit by 3, the next one by 1, the next by 3, and so on, alternating.
  3. Add all the results together.
  4. The check digit is the amount needed to reach the next multiple of 10. If the sum is already a multiple of 10, the check digit is 0.

Worked example: EAN-13 978020137962?

Digit978020137962
Weight131313131313
Product92180201972766

The products add up to 96. The next multiple of 10 is 100, so the check digit is 4 and the full number is 9780201379624.

Because the weights are counted from the right, the same rule works for every length. That is also why putting a 0 in front of a UPC-A to make an EAN-13 does not change the check digit.

What a check digit catches, and what it does not

Other barcodes and their checks

Frequently asked questions

What is a check digit?

A check digit is the last digit of a GTIN or SSCC. It is calculated from the preceding digits so that validation can detect any single-digit substitution and most swaps of neighboring digits.

Is the check digit the same for UPC-A and EAN-13?

Yes. An EAN-13 made by adding a leading 0 to a UPC-A has the same check digit, because the extra zero adds nothing to the weighted sum.

Does Code 128 have a check digit?

Code 128 has its own built-in checksum, a modulo-103 character that the barcode generator adds automatically and that is not printed in the human-readable text. You do not calculate it yourself. If you encode a GTIN inside a GS1-128 barcode, the GTIN still carries its normal modulo-10 check digit.

Why does my barcode generator say the number is invalid?

A wrong check digit or a missing final digit may be the cause. Enter the number here to see which digit it should be.

Keep reading