Logistics calculators

GS1 Check Digit Calculator

Updated Sep 16, 2026 By Infinity Calculator
Rate Formulas
Digits 0–9 only. The check digit is calculated for you and appended automatically.
12 / 12 digits entered
Computed Check Digit
Complete the number to calculate

Full Identifier With Check Digit
Original format

Enter all digits to calculate the check digit.

The highlighted final digit is the calculated check digit.
Identifier Type
GTIN-13 / GLN
Total Length
13
Weighted Sum
Sum mod 10
Step-by-Step Solution
Digit Weighting Breakdown
Weights alternate 3 and 1 from the right-most entered digit.
Identifier Structure
SegmentDigitsLength

Introduction

This GS1 Check Digit Calculator finds the last digit of a barcode number for you. Type in the digits you have, and the tool adds the correct check digit at the end.

The check digit is a safety digit. Scanners use it to make sure the rest of the number was read right. If one digit is wrong or two digits get swapped, the check digit will not match, and the scan fails. That stops bad data from moving through your supply chain.

The calculator works with these GS1 numbers:

  • GTIN-8 — enter 7 digits (small packs)
  • GTIN-12 — enter 11 digits (UPC)
  • GTIN-13 / GLN — enter 12 digits (EAN and location numbers)
  • GTIN-14 — enter 13 digits (cases and pallets)
  • SSCC — enter 17 digits (shipping labels)
  • Bill of Lading — enter 16 digits

Pick your format, type your digits, and the answer shows up right away. You also get the math laid out step by step, a chart of how each digit is weighted, and a table that breaks the number into its parts. You can copy the full number with one click, or view it padded out to 14 digits for GTIN work.

How to use our GS1 Check Digit Calculator

Pick your barcode format and type in your number without the last digit. The calculator works out the GS1 check digit, shows the full identifier, and walks you through each step of the math.

Format tabs: Click the tab that matches your number — GTIN-8, GTIN-12, GTIN-13 / GLN, GTIN-14, SSCC, or Bill of Lading. Each tab sets how many digits you need to enter.

Number field: Type your digits here, using only 0–9. Leave off the check digit. The counter under the box tells you how many digits you still need. For a GTIN-14, the first digit must be 1 through 8.

Calculate button: Press this (or hit Enter) to get your check digit and the full number. The result, the step-by-step math, and the chart all update at once.

Clear button: Press this to empty the box and start a new number in the same format.

View as 14-digit GTIN button: Press this to add leading zeros and see your GTIN in the 14-digit form used in many data feeds. Press it again to go back to the normal view.

Copy result button: Press this to copy the finished number, check digit and all, straight to your clipboard.

What Is a GS1 Check Digit?

A GS1 check digit is the last number in a barcode number. It is not random. It is worked out from all the other digits using a simple math rule. Its job is to catch mistakes. If someone types or scans a digit wrong, the check digit will not match, and the scanner knows the number is bad.

Where GS1 Numbers Are Used

GS1 numbers run through the whole supply chain. They sit on retail products, cases, pallets, and shipping papers. Each number type has a set length, and the final digit is always the check digit.

  • GTIN-8 – 8 digits. Used on small items with little label space.
  • GTIN-12 (UPC) – 12 digits. Common in the United States and Canada.
  • GTIN-13 (EAN) – 13 digits. Used on most retail products worldwide. A GLN (Global Location Number) also has 13 digits and uses the same rule.
  • GTIN-14 – 14 digits. Used for cases and cartons. The first digit is an Indicator Digit from 1 to 8, which shows the pack level.
  • SSCC – 18 digits. A one-of-a-kind number for a pallet or shipping unit.
  • Bill of Lading – 17 digits. Used on freight papers to track a shipment.

How the Check Digit Math Works

The rule is the same for every GS1 number. It is called Modulo 10.

  1. Write down the digits you have, without the check digit.
  2. Give the digit on the far right a weight of 3. Then go left and switch: 1, 3, 1, 3, and so on.
  3. Multiply each digit by its weight.
  4. Add all those answers together. This is the weighted sum.
  5. Divide that sum by 10 and keep the remainder.
  6. Take 10 minus the remainder. If you get 10, use 0. That answer is your check digit.

Example: for the GTIN-12 number 03600029145, the weighted sum is 57. The remainder is 7. So 10 − 7 = 3, and the full GTIN-12 is 036000291452... wait — the check digit is 2, giving 036000291452.

Why the 14-Digit Format Matters

Many warehouse and trading systems store every GTIN as 14 digits. Shorter numbers get zeros added to the front. A GTIN-13 like 4006381333931 becomes 04006381333931. The zeros do not change the number or the check digit. They just make all records the same length so computers can match them.

Tips for Getting It Right

  • Never make up a check digit. One wrong digit can stop a pallet at a receiving dock.
  • Use only digits 0 through 9. Letters and dashes are not part of a GS1 number.
  • Keep leading zeros. A zero at the front is a real digit and changes the math.
  • Check the digit again after any edit to the number.
  • A GTIN-14 must start with 1 through 8. Zero and 9 are not allowed as Indicator Digits.

Formulas used

Alternating weight for each digit (position counted from the right)
w_p = \begin{cases} 3, & p \text{ odd} \\ 1, & p \text{ even} \end{cases} \quad (p = 1 \text{ is the right-most entered digit})
Weighted sum of the digits
S = \sum_{i=1}^{n} d_i \times w_i
Remainder of the weighted sum modulo 10
r = S \bmod 10
GS1 check digit
C = (10 - (S \bmod 10)) \bmod 10
Full identifier with check digit appended
N = d_1 d_2 \cdots d_n \, C, \qquad \text{length}(N) = n + 1
Leading zeros added for the 14-digit GTIN form
z = 14 - \text{length}(N) = 14 - (n + 1)

Frequently asked questions

What is the difference between a UPC and an EAN barcode?

A UPC holds a 12-digit number (GTIN-12) and is used mostly in the United States and Canada. An EAN holds a 13-digit number (GTIN-13) and is used in most other countries.

Both follow the same GS1 rules and the same check digit math. Most modern scanners read both. A GTIN-12 can be stored as a GTIN-13 by adding one zero to the front.

What is a GS1 Company Prefix?

A GS1 Company Prefix is the block of digits GS1 gives your business when you join. It sits at the start of every GTIN, GLN, and SSCC you create.

Short prefixes give you more numbers to use. A long prefix gives you fewer. You pick the digits that follow the prefix yourself, then add the check digit at the end.

Why does GS1 use weights of 3 and 1 in the check digit math?

The 3-and-1 pattern makes the math catch more mistakes. Because the two weights are different, swapping two digits next to each other usually changes the total, so the check digit no longer matches.

If every digit had the same weight, a swap like 45 to 54 would give the same sum and the error would slip through.

What kinds of errors does a check digit catch?

A check digit catches every single wrong digit. If you type one digit wrong anywhere in the number, the math fails.

It also catches most swapped pairs of digits. The one gap: if you swap two side-by-side digits that differ by exactly 5 (like 27 to 72), the check digit still matches. That is rare, but it is why you should still read numbers back carefully.

Can a GS1 check digit be 0?

Yes. If the weighted sum divides evenly by 10, the remainder is 0 and the check digit is 0.

A zero check digit is just as real as any other. Never drop it or treat it as blank space.

Why does my barcode say the check digit is invalid?

The most common reasons are:

  • One digit was typed or read wrong.
  • A leading zero was dropped, often by a spreadsheet.
  • The number was pasted into the wrong format, so the length is off.
  • Someone guessed the last digit instead of calculating it.

Re-enter the number without the last digit and work the check digit out again. If it does not match what is printed, the printed number is wrong.

What is a GLN used for?

A GLN, or Global Location Number, names a place or a business party. It can point to a warehouse, a dock door, a store, a company, or a bill-to address.

It is 13 digits long and uses the same check digit rule as a GTIN. Trading partners use GLNs in orders and shipping notices so everyone knows exactly where goods go.

How long must an SSCC stay unique?

GS1 says not to reuse an SSCC for at least one year after the shipment is done. Many companies wait longer, and some never reuse one at all.

Each pallet or carton you ship gets its own SSCC. If two shipments carry the same number at the same time, tracking breaks and the wrong goods get matched to the wrong papers.

Is the check digit encoded in the barcode bars or just printed?

It is both. The check digit is part of the number, so it is encoded in the bars and also printed in the human-readable line underneath.

When a scanner reads the bars, it does the math itself and compares the answer to the last digit. If they do not match, it refuses the read.

When do I need a new GTIN for my product?

You need a new GTIN when a change would make a shopper or a buyer see it as a different product. Common triggers:

  • Net weight, size, or count changes
  • Brand name changes
  • Formula or key ingredients change
  • A new pack level, like a 12-pack instead of a 6-pack

Small art tweaks, new colors on the label, or a price change on the shelf do not need a new GTIN.

What is an ITF-14 barcode?

ITF-14 is the barcode symbol often printed on shipping cases. It carries a 14-digit GTIN and nothing else.

It has thick black frame lines called bearer bars around it. Those help scanners read it on rough cardboard. The last digit it holds is still the standard GS1 check digit.

What is the difference between a GTIN and a SKU?

A GTIN is a global number. GS1 controls the format, and it means the same thing to every retailer and carrier in the world.

A SKU is your own internal code. You make it up, and it only has meaning inside your company. A SKU has no check digit and no set length.

Most businesses keep both and link them in their system.