---
title: GTIN Check Digit Calculator — GS1 Mod-10 for GTIN-8/12/13/14
description: Calculate or verify the GS1 Mod-10 check digit for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), and GTIN-14 barcodes, with the weighted sum shown step by step.
canonical: https://stanzaapi.com/tools/gs1-decoder/gtin-check-digit-calculator
---

[Home](/)/[API Directory](/tools/)/[GS1 Barcode & Digital Link Decoder (Sunrise 2027) API](/tools/gs1-decoder/)/GTIN Check Digit Calculator (GTIN-8, GTIN-12, GTIN-13, GTIN-14)

 Client-side checkNo sign-upNo data uploadGTIN 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.

[GS1 Barcode & Digital Link Decoder (Sunrise 2027) API API →](/tools/gs1-decoder/)[View Pricing →](/pricing)

## Calculate a GTIN check digit

Mode Verify a complete number Calculate the check digitGTINValidate GTINTest data:Valid sampleInvalid sample

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

AUTOMATE IN PRODUCTION<5ms edge latency

Automating this in your stack?

Run up to 5,000 validations/mo at <5ms edge latency with zero data retention and 99.9% availability.

```
curl -X POST https://api.stanzaapi.com/gs1-decoder/api/v1/gs1/decode \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": "5901234123457"}'
```

[Get Pro API Key — $29/mo (Instant Setup) →](/checkout/gs1-decoder/pro)[API Documentation →](/tools/gs1-decoder/)

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

## How to calculate a GTIN check digit

- **Enter the GTIN** — Type the digits without the check digit to calculate it, or paste the complete GTIN to verify it.
- **Weight the digits from the right** — Starting at the rightmost digit of the base number, alternate weights of 3 and 1.
- **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

| Format | Digits |
| --- | --- |
| GTIN-8 | 8 |
| GTIN-12 (UPC-A) | 12 |
| GTIN-13 (EAN-13) | 13 |
| GTIN-14 | 14 |

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

| Capability | Free browser tool | Stanza API |
| --- | --- | --- |
| Where it runs | Your browser | Cloudflare edge |
| Authentication | None | Bearer API key |
| Rate limit | None | Published per-tier limits |
| Data handling | Never leaves your device | In-memory, zero retention |
| GS1 element string decoding through the GS1 Decoder API | No | Yes |
| Digital Link URI parsing with all application identifiers | No | Yes |

## Sources & standards

- [GS1 Application Identifier standards](https://www.gs1.org/standards/barcodes/application-identifiers)

**Related specifications:**[GS1 AI (01) Global Trade Item Number (GTIN) & Mod-10 Checksum](/tools/gs1-decoder/ai/01-gtin)

Useful?

Bookmark it for the next check, or pass it to someone who works with these numbers.

Bookmark this pageCopy link[Share on X](https://twitter.com/intent/tweet?text=GTIN%20Check%20Digit%20Calculator&url=https%3A%2F%2Fstanzaapi.com%2Ftools%2Fgs1-decoder%2Fgtin-check-digit-calculator)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstanzaapi.com%2Ftools%2Fgs1-decoder%2Fgtin-check-digit-calculator)[Email](mailto:?subject=GTIN%20Check%20Digit%20Calculator&body=https%3A%2F%2Fstanzaapi.com%2Ftools%2Fgs1-decoder%2Fgtin-check-digit-calculator)

Press Ctrl+D to bookmark this page. Installed as an app, the tools also work offline.
