GTIN-14 Check Digit Calculator

Enter the first 13 digits to compute the GTIN-14 check digit.

Result

1
12345678901231

How it is calculated

The tool reads the digits you type, ignores spaces and hyphens, pads on the left with zeros if there are fewer than 13, and keeps only the first 13 if there are more. It then applies the GS1 mod-10 rule: check = (10 − (S mod 10)) mod 10, where S is the sum of the 13 digits, each multiplied by 3 or 1. Counting from the right, the 1st, 3rd, 5th… digit gets weight 3 and the 2nd, 4th, 6th… gets weight 1. The check digit is appended to give the 14-digit GTIN. The first digit (the packaging-level indicator) is treated like any other digit.

Worked example

Payload 1234567890123. From the right the weights run 3, 1, 3, 1… The weighted products are 9, 2, 3, 0, 27, 8, 21, 6, 15, 4, 9, 2, 3, which add up to S = 109. The remainder of 109 divided by 10 is 9, so the check digit is 10 − 9 = 1. The full code is 12345678901231, which the tool shows as check digit 1.

Try this example →

Common mistakes

  • Typing all 14 digits of an existing code: only the first 13 are used, so the old check digit is dropped and recalculated, and the tool does not tell you whether it was right.
  • Starting the 3-1-3-1 weighting from the left. The weight 3 belongs to the digit next to the check digit, counted from the right.
  • Entering fewer than 13 digits and expecting a warning. Short input is silently padded with leading zeros, which changes the indicator digit and the final code.
  • Pasting a full 13-digit retail EAN as the payload. Its last digit is already a check digit, so treating it as data produces a different, wrong GTIN-14; enter the 12 digits without it and type the indicator digit in front yourself, because padding only adds a zero.

About this calculator

A GTIN-14 is the barcode identifier GS1 assigns to cases, cartons, and pallets (as opposed to the GTIN-13/EAN-13 on a single retail item). Its final digit is a mod-10 check digit: starting from the rightmost of the first 13 digits, each digit is alternately multiplied by 3 and 1, the products are summed, and the check digit is whatever value brings that sum up to the next multiple of 10.

This calculator takes the first 13 digits of a case code and computes the correct 14th digit, returning a complete, scannable GTIN-14. Warehouse and logistics operators, ERP and inventory-system developers, and packaging teams use it to generate valid case codes before they're printed on cartons, since a wrong check digit causes a barcode scanner to reject the read or a shipping system to bounce the ASN.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Short input is padded with leading zeros, so the tool always returns a full-looking 14-digit code, even if you dropped a digit. Typing only 11 digits, 12345678901, produces 00123456789012, which is probably not the item you meant. Count your digits before sending anything to print, and scan one printed label before a whole run of cartons. Do you generate case codes in bulk, and would a list input help?

Popular calculators

All Calculators