Guide
GTIN, EAN and UPC barcodes: check digits for products, pallets and serials
The black-and-white barcode on a product encodes a Global Trade Item Number, GTIN, and the human-readable digits below it end in a check digit. Retailers, marketplaces and warehouses depend on that digit to reject mis-scans, and anyone who generates product codes, imports a catalogue or builds a label template needs to be able to compute it. This page validates codes of every GS1 length and calculates the digit that is missing.
The check digit formula
Take the code without its last digit, and number the remaining digits from the right, starting with the one next to the check digit. Multiply the digits in odd positions by 3 and those in even positions by 1, add the products, and the check digit is the number that brings the total up to the next multiple of 10 (0 if it is already one). The same rule applies to GTIN-8, 12, 13 and 14 and to the 18-digit SSCC that labels logistics units, because only the position from the right matters.
A worked example
Press Sample to check six codes. 4006381333931 is a valid GTIN-13 (EAN-13) with check digit 1, and its GS1 prefix 400 belongs to GS1 Germany, with the note that this is the office that issued the company prefix and not necessarily where the product was made. 036000291452 is a valid GTIN-12 (UPC-A), 73513537 a valid GTIN-8 (EAN-8), 0378-5955 a valid ISSN with check character 5, and USRC17607839 a valid ISRC with country prefix US, registrant RC1, year 76 and designation 07839, printed with hyphens as US-RC1-76-07839. The last, 4006381333932, has a wrong check digit, and the page gives the correct one, 1. In the calculator, entering 400638133393 returns check digit 1 and the complete code.
GS1 prefixes
The first three digits of a GTIN-13 are a GS1 prefix assigned to a member organisation, usually a country: 400 to 440 for Germany, 500 to 509 for the United Kingdom, 690 to 699 for China. The company that bought the barcode may manufacture elsewhere, so the prefix does not show origin. Prefixes 978 and 979 are reserved for books, 977 for periodicals, and the 2xx range is for internal store use.
ISSN and ISRC
An International Standard Serial Number identifies periodicals. It has eight characters in two groups of four joined by a hyphen, and a modulo 11 check character that can be X. An International Standard Recording Code identifies a sound or video recording. It has twelve characters and no check digit, so the page validates only the structure: a two-letter country or agency prefix, a three-character registrant code, a two-digit year and a five-digit designation. A bare eight-digit number is treated as an EAN-8 unless only the ISSN rule works.
Using the tool for catalogues
Paste a column of codes from a product feed to find the rows that fail. Spreadsheets drop leading zeros from UPC codes, so a 12-digit UPC may arrive as 11 digits; format the column as text. When you issue your own codes, use the calculator to complete each one, and keep the company prefix assigned by GS1.
Limits
A valid check digit shows consistency and not registration: only GS1 and the company that licensed the prefix can say who owns a number. The page does not look up products.
Related tools
- ISBN Converter and Validator handles books, which share the EAN-13 format.
- Barcode Generator draws the barcode for a valid code.
- Luhn Validator uses a different mod-10 rule for cards.
- Container Number Validator checks shipping containers.
Checked against the current version of the GTIN, EAN and UPC Check Digit Calculator on .

