GTIN Check Digit Calculator

Calculate or verify check digits for barcodes including UPC-A, EAN-13, GTIN-14, ISBN-13, and other standard product identification codes. Uses the Mod 10 (Luhn) algorithm to ensure barcode accuracy.

Barcode Calculator

Enter the barcode digits without the last check digit

Result

5901234123457
Check Digit: 7
Barcode Type GTIN-13
Input Digits 590123412345
Check Digit 7
Complete Barcode 5901234123457

Digit Multipliers (for calculation)

×1 ×3 Check

Calculation Steps (Mod 10 Algorithm)

GTIN Types Reference

Type Total Digits Data Digits Common Names Usage
GTIN-8 8 7 EAN-8 Small products with limited space
GTIN-12 12 11 UPC-A, UPC North American retail products
GTIN-13 13 12 EAN-13, ISBN-13, JAN International retail, books
GTIN-14 14 13 ITF-14, SCC-14 Case/carton identification

What is GTIN?

GTIN (Global Trade Item Number) is a unique identifier for products and services in global commerce. Managed by GS1 (the organization behind barcode standards), GTINs enable products to be tracked through the supply chain and identified at point of sale.

GTINs come in various lengths depending on their application:

What is a Check Digit?

A check digit is the last digit of a barcode that verifies the accuracy of the preceding digits. It's calculated using a specific algorithm and helps detect errors in data entry, printing, or scanning. If even one digit is incorrect, the check digit will not match, alerting the system to an error.

Check digits catch common errors including:

The Mod 10 Algorithm

GTIN check digits are calculated using the Mod 10 algorithm (also known as the Luhn algorithm variant for GTINs). The algorithm uses alternating multipliers of 1 and 3, starting from the rightmost data digit.

1. Assign multipliers (1 or 3) from right to left, starting with 3
2. Multiply each digit by its assigned multiplier
3. Sum all the products
4. Check Digit = (10 - (Sum mod 10)) mod 10

Why Mod 10?

The modulo 10 operation ensures the check digit is always a single digit (0-9). The alternating multipliers (1 and 3) are chosen because they catch the most common data entry errors while remaining computationally simple.

Step-by-Step Calculation

Let's calculate the check digit for EAN-13 barcode 590123412345?:

Step 1: Assign Multipliers

Starting from the rightmost data digit and moving left, assign alternating multipliers of 3 and 1:

Position: 1 2 3 4 5 6 7 8 9 10 11 12
Digits: 5 9 0 1 2 3 4 1 2 3 4 5
Mult: 1 3 1 3 1 3 1 3 1 3 1 3

Step 2: Multiply and Sum

5×1 + 9×3 + 0×1 + 1×3 + 2×1 + 3×3 + 4×1 + 1×3 + 2×1 + 3×3 + 4×1 + 5×3
= 5 + 27 + 0 + 3 + 2 + 9 + 4 + 3 + 2 + 9 + 4 + 15
= 83

Step 3: Calculate Check Digit

Check Digit = (10 - (83 mod 10)) mod 10
= (10 - 3) mod 10
= 7

The complete barcode is: 5901234123457

Anatomy of a Barcode

EAN-13 Structure

UPC-A Structure

Worked Examples

Example 1: ISBN-13

Input: 978030640615 (12 digits)

9×1 + 7×3 + 8×1 + 0×3 + 3×1 + 0×3 + 6×1 + 4×3 + 0×1 + 6×3 + 1×1 + 5×3
= 9 + 21 + 8 + 0 + 3 + 0 + 6 + 12 + 0 + 18 + 1 + 15 = 93
Check Digit = (10 - 3) mod 10 = 7
Complete ISBN-13: 9780306406157

Example 2: UPC-A

Input: 03600029145 (11 digits)

0×3 + 3×1 + 6×3 + 0×1 + 0×3 + 0×1 + 2×3 + 9×1 + 1×3 + 4×1 + 5×3
= 0 + 3 + 18 + 0 + 0 + 0 + 6 + 9 + 3 + 4 + 15 = 58
Check Digit = (10 - 8) mod 10 = 2
Complete UPC: 036000291452

Example 3: GTIN-8

Input: 9638507 (7 digits)

9×3 + 6×1 + 3×3 + 8×1 + 5×3 + 0×1 + 7×3
= 27 + 6 + 9 + 8 + 15 + 0 + 21 = 86
Check Digit = (10 - 6) mod 10 = 4
Complete GTIN-8: 96385074

Frequently Asked Questions

What's the difference between UPC and EAN?

UPC (Universal Product Code) is the 12-digit barcode system used primarily in North America. EAN (European Article Number) is the 13-digit international system. UPC-A can be converted to EAN-13 by adding a leading zero. Both use the same Mod 10 check digit algorithm.

Can a check digit be 0?

Yes, a check digit can be 0. This occurs when the sum of the weighted digits is already a multiple of 10. For example, if the sum is 80, then (10 - 0) mod 10 = 0.

How do I verify a barcode is correct?

To verify a complete barcode: (1) Calculate what the check digit should be using the first N-1 digits, (2) Compare your calculated check digit with the actual last digit, (3) If they match, the barcode is valid. Alternatively, include the check digit in the calculation - a valid barcode will have a total sum that's a multiple of 10.

Why do multipliers alternate between 1 and 3?

The 1-3 weighting scheme was chosen because it catches all single-digit errors and most adjacent transposition errors. Using 1 and 3 specifically (rather than other numbers) means no single digit contributes more than 27 to the sum, keeping calculations manageable while maintaining error detection capability.

Is ISBN-13 the same as EAN-13?

Yes, ISBN-13 uses the same format and check digit algorithm as EAN-13. ISBN-13 codes always begin with 978 or 979 (the "Bookland" country prefixes). The calculation method is identical to any other GTIN-13.