Saved

Press the star next to a tool's name to save it.

All my tools

GTIN Check Digit Calculator

Use this GTIN check digit calculator to work out the check digit for GTIN-8, UPC-A, EAN-13 and GTIN-14 barcode numbers, or check that a full number is valid.

Restored your last values ·

To make a check digit, enter the barcode number without its last digit: 7 digits for GTIN-8, 11 for UPC-A, 12 for EAN-13 or 13 for GTIN-14. To check a barcode, switch the task and enter the full number.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Fill in the boxes and press Calculate.

See full result

A GTIN check digit calculator works out the last digit of a barcode number, the check digit that lets scanners catch typing and reading errors. Enter the barcode digits without the check digit, and the calculator gives the check digit and the full number for GTIN-8 (EAN-8), GTIN-12 (UPC-A), GTIN-13 (EAN-13) and GTIN-14. Switch the task to check a full barcode number and see whether its check digit is correct.

The check digit formula

Starting from the rightmost data digit, multiply the digits by 3, 1, 3, 1, …
Add the products
Check digit = the amount needed to reach the next multiple of 10

GS1 UK gives the method: starting with the right-hand digit of the number, add all the alternate digit values, multiply that by 3, add all the other digits, and the check digit is the smallest number that must be added to the sum to reach a multiple of 10. That means the final data digit has a weight of 3, the check digit has a weight of 1, and the weights alternate counted from the right whatever the length of the code. GS1 US describes the check digit as the final digit of a GTIN, calculated from the preceding digits and used to check that the data has been correctly composed.

How to use the GTIN check digit calculator

  1. Choose the task: work out a check digit, or check a full number.
  2. Enter the digits. Spaces and hyphens are ignored.
  3. Press Calculate.

Worked example

Take the UPC-A number 03600024145. Adding the digits in odd positions from the left gives 0 + 6 + 0 + 2 + 1 + 5 = 14, and three times that is 42. Adding the even positions gives 3 + 0 + 0 + 4 + 4 = 11. The total is 53, which leaves 3 when divided by 10, so the check digit is 10 − 3 = 7 and the full barcode is 036000241457. GS1 UK's own example, the GTIN 501234567000 with its check digit still to find, gives a sum of 57 and a check digit of 3, making 5012345670003. The same rule gives 1 for the EAN-13 data 400638133393, making 4006381333931, and 7 for the EAN-8 data 7351353, making 73513537.

Why the weights alternate

Using weights of 3 and 1 means a single wrong digit always changes the total, so the check digit no longer matches. It also catches most cases where two neighbouring digits are swapped, a common typing mistake, because the two digits are multiplied by different weights. It cannot catch every error, which is why the check digit is a safeguard rather than proof that a number is genuine.

Barcode lengths

The rule is the same for every length, because the weights are counted from the right. GS1 US says the GTIN-12 is the only GTIN used in UPC-A barcodes, the GTIN-13 the only one in EAN-13 barcodes and the GTIN-8 the only one in EAN-8 barcodes; the GTIN-14 is used for packaging levels. Adding a zero in front of a number doesn't change its check digit, because the zero adds nothing to the weighted sum.

Checking a barcode number

In Check mode, enter the full number including its last digit. The calculator recomputes the check digit from the other digits and compares. Try 4 003994 155486 as a complete EAN-13 number; entering it shows that it is valid. Changing any single digit makes it invalid and shows the digit it should have had. This is useful when typing barcode numbers into a spreadsheet or online shop, where a single slip can attach the wrong product to a listing.

Getting barcode numbers

The check digit only makes a number well formed. GS1 US explains that a GS1 Company Prefix is a globally unique number licensed to a company by a GS1 Member Organization, so barcode numbers used on products for sale are issued through GS1, and making up a number with a valid check digit doesn't register it. For reading barcodes with a camera, try the barcode scanner.

Doing it by hand

To work out a check digit without the calculator, write the data digits in a row and mark every other digit starting from the rightmost one. Multiply each marked digit by three and leave the others as they are. Add everything up, then look at the last digit of the total. If it is zero, the check digit is zero; otherwise subtract it from ten. For the EAN-8 example 7351353, the marked digits are 7, 5, 3 and 3 counted from the right, giving 21 + 15 + 9 + 9 = 54, plus 3 + 1 + 5 = 9 for the others, a total of 63, so the check digit is 7.

Checking many numbers

When you have a list of barcode numbers, for example in a product spreadsheet, check each one before uploading it to a shop or marketplace. A number with a wrong check digit is almost certainly mistyped. The same calculation is easy to add to a spreadsheet formula once you know the rule, and the calculator gives you a quick way to confirm that your formula gives the right answer for a few test numbers, such as the examples on this page.

Common mistakes

  • Including the check digit when making one. Leave the last digit off.
  • Counting weights from the left for EAN-13. Count from the right.
  • Dropping a leading zero. Leading zeros are part of the number.
  • Assuming a valid check digit means a registered barcode. It doesn't.

What next

Use this often? Add GTIN Check D to your Home screen.

Frequently asked questions

How does a GTIN check digit calculator work?

It weights the digits 3, 1, 3, 1 from the right, adds them, and picks the digit that brings the total to a multiple of 10.

What is the check digit for 03600024145?

7, giving the UPC-A number 036000241457.

Does the rule work for EAN-13 and GTIN-14?

Yes. The weights are counted from the right whatever the length.

Can I check an existing barcode?

Yes. Switch to Check and enter the full number.

Does a valid check digit mean the barcode is registered?

No. Product barcode numbers are issued through GS1.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Finance Tools