GTIN · Guides

How to calculate a GTIN/EAN check digit

The last digit is calculated from the preceding digits by alternating weights of 3 and 1.

Short answer

Starting from the right, multiply the body digits alternately by 3 and 1, add them and choose the digit that completes the next multiple of ten.

Start beside the check digit

The existing rightmost digit is excluded from the calculation.

Alternate weights 3 and 1

The rightmost body digit receives weight 3, the next 1, then 3 again.

Complete the next ten

Use the remainder modulo 10; the amount needed to reach ten is the check digit.

A checksum is not proof of assignment

This catches structural errors but cannot establish who issued the number.

GTIN / EAN Validator

Check one or more GTIN, EAN or UPC codes. Find length and check-digit errors and understand exactly what is wrong.

Open the GTIN validator