EDGE ENGINE SUB-2MS DETERMINISTIC V8 EXECUTION • ZERO DATA RETENTION • EXPLORE API SPECS →
Client-side check No sign-up No data upload GTIN Check Digit Calculator

GTIN Check Digit Calculator (GTIN-8, GTIN-12, GTIN-13, GTIN-14)

A GTIN check digit calculator computes the final digit of a GTIN-8, GTIN-12, GTIN-13, or GTIN-14 by applying the GS1 modulo-10 algorithm to the preceding digits.

Calculate or verify the GS1 Mod-10 check digit for GTIN-8, GTIN-12, GTIN-13, and GTIN-14 codes.

Calculate a GTIN check digit

Mode
Test data:

Enter a value and run the check. Everything runs locally in this page.

Runs entirely in your browser. The value you type is never sent to a server.

How to calculate a GTIN check digit

  1. Enter the GTIN — Type the digits without the check digit to calculate it, or paste the complete GTIN to verify it.
  2. Weight the digits from the right — Starting at the rightmost digit of the base number, alternate weights of 3 and 1.
  3. Reduce modulo 10 — Sum the weighted digits; the check digit is (10 - (sum mod 10)) mod 10.

What the check verifies

The check verifies the GS1 modulo-10 check digit that ends every GTIN-8, GTIN-12, GTIN-13, and GTIN-14. Digits are weighted 3 and 1 alternately from the right, summed, and reduced modulo 10; the check digit makes the total a multiple of 10.

The calculator weights the digits of the base number alternately 3 and 1 starting from the rightmost digit, sums the products, and derives the check digit as (10 - (sum mod 10)) mod 10. The same algorithm applies to GTIN-8, GTIN-12, GTIN-13, and GTIN-14.

Enter the base digits to calculate the missing check digit, or paste the complete code to verify that its final digit matches the GS1 modulo-10 calculation.

GTIN lengths and formats

FormatDigits
GTIN-88
GTIN-12 (UPC-A)12
GTIN-13 (EAN-13)13
GTIN-1414

Worked example: 5901234123457. The weighted sum of 590123412345 is 83, and (10 - (83 mod 10)) mod 10 = 7, which matches the final digit.

Frequently Asked Questions

How is the GTIN check digit calculated?

Weight the digits alternately 3 and 1 from the right, sum the products, and take (10 - (sum mod 10)) mod 10. The result is the final digit of the GTIN.

What is the difference between GTIN-13 and GTIN-14?

GTIN-13 is the 13-digit number printed in an EAN-13 retail barcode. GTIN-14 is the 14-digit number used for cases and logistics units; it is the same identifier with a leading packaging indicator digit.

Is EAN-13 the same as GTIN-13?

Yes. GTIN-13 is the GS1 term for the 13-digit identifier commonly called EAN-13, and the check digit algorithm is identical.

Does the calculator accept UPC-A numbers?

Yes. UPC-A is the 12-digit GTIN-12 format, so entering 12 digits in verify mode validates it with the same modulo-10 algorithm.

Can I validate many GTINs at once?

The free calculator handles one code at a time. The Stanza GS1 Decoder API is the server-side option and also decodes full GS1 element strings and Digital Link URIs.

Free browser tool vs Stanza API

CapabilityFree browser toolStanza API
Where it runsYour browserCloudflare edge
AuthenticationNoneBearer API key
Rate limitNonePublished per-tier limits
Data handlingNever leaves your deviceIn-memory, zero retention
GS1 element string decoding through the GS1 Decoder APINoYes
Digital Link URI parsing with all application identifiersNoYes

Sources & standards