Check Digit Calculator (2024)

With this check digit calculator, you can confirm the integrity of a barcode. Whether you're trying to determine the last digit of the GTIN code or simply ensuring you didn't make a typo, all you need to do is spend a few seconds copying the code into our calculator. This barcode check digit calculator works for 8, 12, 13, 14, 17, 18-digit GTIN standards. If you want to know more about the algorithm behind the calculation (mod 10 check digit) or you simply want to understand what is a check digit, keep scrolling.

What is a check digit?

Check digits are used to spot human errors - if you are typing a number manually, especially a long one, you probably mistype it by adding an extra digit, omitting one, or changing the digits' order. Check digits are the digits computed by an algorithm that can inform you about these typing errors. They are widely used nowadays, e.g., in bank account numbers, ISSN and ISBN numbers, Universal Product Codes, and European Article Numbers which all adhere to GTIN standards.

What is GTIN?

Check Digit Calculator (1)

GTIN stands for Global Trade Item Number - it's a unique identifier for trade items developed by GS1, an organization creating global business standards. The family of codes within the GTIN is:

  • GTIN-12 (UPC) is used primarily in North America; it may be shown in UPC-A, ITF-14, or GS1-128 barcodes;
  • GTIN-13 (EAN-13) - mainly used in the item registration process in supermarkets;
  • GTIN-8 (EAN-8) - shortened version of GTIN-13;
  • GTIN-14 (EAN/UCC-128 or ITF-14) - used for traded goods. It may be created from GTIN-8, GTIN-12, or GTIN-13 by zero padding (adding zeros at the beginning to obtain 14 digits).

When we use names such as UPC (Universal Product Code) or EAN (European Article Number), we refer to the Global Trade Item Number because they are both examples of GTINs. So if you are looking for a UPC check digit calculator, our tool is doing its job.

The barcode choice depends on the application: e.g., books sold internationally usually have the GTIN-13 code. GTIN-8 may be used for chewing gum (space constraints - longer GTIN-13 may simply not fit). GTIN-12 is used mainly for trade items scanned at the point of sale, and GTIN-14 is used in wholesale shipments.

What do the numbers in the barcode mean?

So, what's the meaning of the digits in the barcode?

  1. GTIN-13 (EAN-13)

GTIN-13 = Country code + Manufacturer prefix + Product code + Check digit

The First 2 or 3 digits are known as country codes. Remember that it is not necessarily the products' country of origin but the country in which the manufacturer is registered and the barcode assigned.

  1. GTIN-8 (EAN-8)

GTIN-8 = Country code + Product code

  1. GTIN-12 (UPC-12, UPC)

GTIN-12 = Manufacturers prefix + Product code + Check digit

  1. GTIN-14 (EAN/UCC-128 or ITF-14)

GTIN-14 = Quantity/Packaging Indicator + Manufacturer code + Product code + Check digit

  • 1st digit is called a logistic variant, and it indicates a packaging level ( e.g., two-pack, case, pallet; however, no standards among countries exist).
  • 2nd to 13th digit - a unique company prefix and an item reference number; these two components vary in length but sum up to 12 digits.

Check digits in all versions mentioned above are calculated from a standard modulo 10 formula. You'll find the explanation of that algorithm below.

Mod 10 check digits - formula

To calculate the check digit of, e.g., GTIN-8, you need to:

  1. Multiply the value of each position by the weight from the table. In our case, the weights are equal to 1 and 3. So the first digit is multiplied by 3, the second by 1, the third by 3, etc.

ID key format

Digit positions

GTIN-8

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

GTIN-12

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

N9N_9N9

N10N_{10}N10

N11N_{11}N11

N12N_{12}N12

GTIN-13

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

N9N_9N9

N10N_{10}N10

N11N_{11}N11

N12N_{12}N12

N13N_{13}N13

GTIN-14

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

N9N_9N9

N10N_{10}N10

N11N_{11}N11

N12N_{12}N12

N13N_{13}N13

N14N_{14}N14

GSIN

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

N9N_9N9

N10N_{10}N10

N11N_{11}N11

N12N_{12}N12

N13N_{13}N13

N14N_{14}N14

N15N_{15}N15

N16N_{16}N16

N17N_{17}N17

SSCC

N1N_1N1

N2N_2N2

N3N_3N3

N4N_4N4

N5N_5N5

N6N_6N6

N7N_7N7

N8N_8N8

N9N_9N9

N10N_{10}N10

N11N_{11}N11

N12N_{12}N12

N13N_{13}N13

N14N_{14}N14

N15N_{15}N15

N16N_{16}N16

N17N_{17}N17

N18N_{18}N18

Multiply by

333

111

333

111

333

111

333

111

333

111

333

111

333

111

333

111

333

111

  1. Sum all these values.
  2. Subtract this sum from the nearest equal or higher multiple of ten. You can find this number at our round to the nearest ten calculator — the result is your check digit! It should be the same as the final digit of your barcode.

If you do not wish to do it that way, you can use the formula:

checkdigit=10(wA(N1+N3+N5+...+Nm)+wB(N2+N4+N6+...+Nn))mod10\scriptsize \begin{split}\mathrm{check\ digit}&\! = \!10\! -\! \Big(w_{\mathrm{A}}\!\cdot\!(N_1\!+\! N_3\! +\! N_5\! +\! ...\! +\! N_m)\\&\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!+w_{\mathrm{B}}\!\cdot\!(N_2\! +\! N_4\! +\! N_6\! +\! ...\! +\! N_n)\Big)\ \mathrm{mod}\ 10\end{split}checkdigit=10(wA(N1+N3+N5+...+Nm)+wB(N2+N4+N6+...+Nn))mod10

Where

  • wAw_{\mathrm{A}}wA and wBw_{\mathrm{B}}wB — Proper weights;
  • N1+N3+N5+...+NmN_1 + N_3 + N_5 + ... + N_mN1+N3+N5+...+Nm — Consecutive odd digits;
  • N2+N4+N6+...+NnN_2 + N_4 + N_6 + ... + N_nN2+N4+N6+...+Nn — Consecutive even digits;
  • (...)mod10(...)\ \mathrm{mod}\ 10(...)mod10 — The remainder after division of (...)(...)(...) by 101010. You can find a detailed explanation of this mathematical operation at Omni's modulo calculator.

There is one essential condition to mention: if a checkdigit\mathrm{check\ digit}checkdigit calculated from the above formula equals 10, then we need to change it to a 0 to obtain a digit, not a number.

Barcode check digits

In this barcode check digit calculator, we implemented checking the last digit in common GS1 barcodes:

  • GTIN-8 (7 digits + check digit)
  • GTIN-12 (11 digits + check digit)
  • GTIN-13 (12 digits + check digit)
  • GTIN-14 (13 digits + check digit)
  • GSIN (Global Shipment Identification Number, 16 digits + check digit)
  • SSCC (Serial Shipping Container Code, 17 digits + check digit)

This calculator has an informational purpose; we want to show you how the check digit is calculated according to the modulo 10 algorithm we introduced at the Luhn algorithm calculator. However, our tool doesn't check whether the barcode exists or is a valid number. The software that creates product codes verifies the code and its check digits.

How to use the check digit calculator - example

Let's check what the barcode check digit of the fictitious code 112345567809 is:

  1. Add all digits in even positions (digits in positions 2, 4, 6, 8, 10, and 12):

1+3+5+6+8+9=321 + 3 + 5 + 6 + 8 + 9 = 321+3+5+6+8+9=32

  1. Multiply the result by 3:

323=9632 \cdot 3 = 96323=96

  1. Sum all digits in odd positions (digits in positions 1, 3, 5, 7, 9, and 11)

1+2+4+5+7+0=191 + 2 + 4 + 5 + 7 + 0 = 191+2+4+5+7+0=19

  1. Add the results of steps 2 and 3:

96+19=11596 + 19 = 11596+19=115

  1. Subtract it from the nearest equal or higher multiple of ten:

120115=5120-115=5120115=5

Here it is! Now you know what the check digit of the GTIN-13 code is. Try to find it yourself with our check digit calculator!

Check Digit Calculator (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Frankie Dare

Last Updated:

Views: 6132

Rating: 4.2 / 5 (73 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.