Logistics calculators

Check Digit Calculator

Updated Sep 15, 2026 By Infinity Calculator
Rate Formulas
Auto-Detect Check Digit Calculator
12 of 17 digits entered
Detected format
Supported lengths: 7, 11, 12, 13, 16 or 17 digits.
Check Digit Result
Check digit
Full number
Step-by-Step Solution — how this was calculated for your number
Weighted Value of Each Digit
Odd position from the right (× 3) Even position from the right (× 1)
Multi-Format Calculator
Check digit calculator with one row per supported GS1 format
Format ID Number Check Digit Actions
GTIN-88 digits total · enter 7
GTIN-12 / UPC12 digits total · enter 11
GTIN-13 / EAN / GLN13 digits total · enter 12
GTIN-1414 digits total · enter 13
SSCC18 digits total · enter 17
Bill of Lading17 digits total · enter 16

Introduction

A check digit is the last number in a barcode. It is a safety number. It proves the other digits were typed or scanned right. If one digit is wrong, the check digit will not match, and the mistake gets caught.

This Check Digit Calculator works out that last digit. Type your number without the check digit, and the tool picks the right format on its own. It handles GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN and GLN), GTIN-14, SSCC, and Bill of Lading numbers.

The math is the GS1 modulo-10 rule, the same rule used across supply chains worldwide. You get the check digit, the full number, a step-by-step breakdown, and a chart that shows how each digit adds up. One click copies the finished number.

Use it to build new barcodes, check labels before printing, or fix a number that will not scan. Right numbers mean fewer shipping errors, fewer returns, and less wasted time.

How to use our Check Digit Calculator

Type your GS1 number without its last digit. The calculator shows the correct check digit plus the full, finished number.

Enter your number (without the check digit): Type or paste the digits in the main box. Use 7, 11, 12, 13, 16, or 17 digits. Spaces and hyphens are removed for you.

Detected format: Watch this box. It tells you which format your number matches, such as GTIN-13, SSCC, or Bill of Lading. If it says "No match," check how many digits you typed.

Calculate Check Digit button: Click it to get your check digit, the full number, the step-by-step math, and the chart. Pressing Enter does the same thing.

View as GTIN-14 button: Click it to see your number padded with zeros to 14 digits. Click again to go back to the original format.

Copy button: Click it to copy the full number, check digit included, so you can paste it into your label or system.

Reset button: Click it to put back the sample numbers and start over.

GTIN-8 row: Type the first 7 digits, then click Calculate to get the 8th digit.

GTIN-12 / UPC row: Type the first 11 digits, then click Calculate to get the 12th digit.

GTIN-13 / EAN / GLN row: Type the first 12 digits, then click Calculate to get the 13th digit.

GTIN-14 row: Type the first 13 digits, then click Calculate to get the 14th digit.

SSCC row: Type the first 17 digits of your pallet label, then click Calculate to get the 18th digit.

Bill of Lading row: Type the first 16 digits, then click Calculate to get the 17th digit.

Clear buttons: Click Clear on any row to empty that row and type a new number.

What Is a Check Digit?

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

How the GS1 Check Digit Works

Almost all supply chain barcode numbers use the same rule, called GS1 Modulo 10. Here is the idea in plain steps:

  1. Count the digit spots from the right, starting at 1.
  2. Multiply digits in odd spots by 3.
  3. Multiply digits in even spots by 1.
  4. Add all those answers together.
  5. Round that total up to the next multiple of 10.
  6. The gap between the total and that multiple of 10 is your check digit.

If the total already lands on a multiple of 10, the check digit is 0.

Numbers That Use a Check Digit

  • GTIN-8 is 8 digits. Small items like gum or candy bars.
  • GTIN-12 (UPC) is 12 digits. Common on store shelves in the U.S. and Canada.
  • GTIN-13 (EAN) is 13 digits. Used worldwide. A GLN (Global Location Number) also has 13 digits and names a company or a place, like a dock door or warehouse.
  • GTIN-14 is 14 digits. Used on cases and pallets of the same item.
  • SSCC is 18 digits. A one-of-a-kind number for a single pallet or carton. It is the number on most shipping labels and ASN files.
  • Bill of Lading is 17 digits. Tracks a shipment from pickup to drop-off.

Why It Matters in Logistics

Every pallet, case, and shipping label moves through many hands. Labels get smudged, scanners misread, and people type numbers by hand. A check digit stops most of these errors before they enter your system. A bad number can mean a lost pallet, a wrong invoice, a chargeback from a retailer, or a failed EDI message.

You need to work out a check digit when you make new item numbers, print your own labels, build SSCC codes for shipping, or check a number that a partner sent you.

Things to Remember

  • Enter only the digits before the check digit. The tool adds the last one for you.
  • Only numbers 0 through 9 work. No letters, dashes, or spaces.
  • Keep leading zeros. A zero at the front changes the math and the final digit.
  • A short number like a GTIN-12 can be padded with zeros on the left to make a GTIN-14. The check digit stays the same, since zeros add nothing to the total.
  • A check digit catches single wrong digits very well, but it can miss some swapped-pair errors. It is a safety net, not a full proof.

Formulas used

Position weight (counted from the right)
w_i = \begin{cases} 3, & \text{if } p_i \text{ is odd} \\ 1, & \text{if } p_i \text{ is even} \end{cases}, \quad p_i = n - i + 1
Weighted sum of all digits
S = 3 \sum_{p_i \text{ odd}} d_i + 1 \sum_{p_i \text{ even}} d_i
Check digit (GS1 modulo-10)
C = (10 - (S \bmod 10)) \bmod 10
Check digit via next multiple of 10
C = 10 \times \left\lceil \frac{S}{10} \right\rceil - S
Full identification number
N_{\text{full}} = \text{(base digits)} \times 10 + C

Frequently asked questions

How do you calculate a check digit by hand?

Take your number without the last digit. Then:

  1. Number the digits from the right, starting at 1.
  2. Multiply digits in odd spots by 3.
  3. Multiply digits in even spots by 1.
  4. Add all the answers.
  5. Round the total up to the next multiple of 10.
  6. Subtract the total from that multiple. That gap is your check digit.

Example: for the 11 digits 03600029145, the sum is 56. The next multiple of 10 is 60. So 60 − 56 = 4, and the full UPC is 036000291454.

Is the check digit part of the GTIN?

Yes. The check digit is the final digit and it counts toward the total length. A GTIN-13 is 12 digits plus the check digit. A GTIN-12 is 11 digits plus the check digit. An SSCC is 17 digits plus the check digit. Never drop it when you send a number to a partner or load it into a system.

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

A UPC (GTIN-12) has 12 digits and is common in the United States and Canada. An EAN (GTIN-13) has 13 digits and is used around the world. They use the same check digit math. You can turn a UPC into a GTIN-13 by adding one zero to the front. The check digit stays the same because a leading zero adds nothing to the total.

How do I know if a barcode number is valid?

Run the check digit math on all the digits except the last one. If the answer matches the last digit printed on the label, the number passes. If it does not match, a digit was typed, scanned, or copied wrong. A valid check digit only proves the math works. It does not prove the number was issued to your company by GS1.

What kinds of errors does a check digit catch?

It catches every single wrong digit, which is the most common mistake people make. It also catches many swapped digit pairs, like typing 21 instead of 12. But it can miss some swaps, such as 0 and 5 in certain spots, because both give the same total. Think of it as a strong safety net, not perfect proof.

Why do leading zeros matter in a GTIN?

Leading zeros hold the number in the right length, and length decides which digits get multiplied by 3. Drop a zero and every digit shifts one spot, so the math changes and the check digit can change too. Spreadsheets often strip zeros from the front of a number. Format those cells as text so 0036000291454 does not turn into 36000291454.

What is an SSCC number used for?

An SSCC (Serial Shipping Container Code) is an 18-digit number that names one shipping unit, like a single pallet or carton. No two shipping units share one. It is printed on the GS1-128 shipping label and sent in the ASN, so the receiver can scan one label and know everything inside. It is built from your GS1 company prefix, a serial number you pick, and the check digit.

Can an SSCC number be reused?

Not right away. GS1 rules say an SSCC must not be used again for at least one year after the shipment. Many retailers and carriers ask for longer, and some ask that you never repeat it. Reusing one too soon can match two shipments to the same record and cause a lost pallet or a chargeback.

What is a GLN and does it use the same check digit?

A GLN (Global Location Number) is 13 digits and names a company, a warehouse, a store, or even one dock door. It uses the exact same modulo-10 check digit rule as a GTIN-13. The digits look alike, so the only way to tell a GLN from a product number is by how it is used in the message or label.

Is the GS1 check digit the same as the Luhn algorithm?

No. Credit cards use Luhn, which doubles every other digit and adds the two halves of any answer over 9. GS1 multiplies by 3 and 1 and never splits the answer. Both end with a modulo-10 step, but they give different results. Using a Luhn tool on a GTIN will give you the wrong digit.

Why will my barcode not scan?

Check the check digit first. If the last digit is wrong, many scanners and systems reject the read. Other common causes are a bar width that is too small, low ink or print contrast, no quiet zone (the blank space on each side), a curved or shiny surface, and the wrong symbol type for the number length. Fix the number first, then the print quality.

Where do I get the digits that come before the check digit?

They come from your GS1 company prefix plus a number you assign. GS1 gives your company a prefix when you join. You add your own item reference or serial number after it, then work out the check digit to close the number. You cannot make up a prefix, because retailers check that the number belongs to the brand owner.

What is a 17-digit Bill of Lading number?

It is a standard shipment number built like an SSCC but one digit shorter. It uses your GS1 company prefix, a serial number for that shipment, and a check digit at the end. Carriers and retailers use it to match the paperwork, the load, and the invoice. Because it carries a check digit, a mistyped BOL number gets caught before it hits the system.