Check Digit Calculator

Calculate or verify the GS1 check digit for UPC, EAN, GTIN-14 and SSCC numbers, one at a time or 500 at once. See exactly how the digit is worked out, then turn the number into a barcode.

Free, no sign upCalculate or verifyUp to 500 at onceRuns in your browser

1. Pick the number type

2.

Spaces and hyphens are ignored, so you can paste the number as it is printed.

The method

How the Check Digit Is Calculated

Every GS1 number uses the same four steps, whatever its length. Here they are for the UPC-A number 03600029145, which is missing its last digit.

  1. 1. Start from the right and multiply every other digit by 3

    The rightmost digit gets a weight of 3, the next one 1, then 3 again, and so on to the left. Counting from the right is why a leading zero never changes the answer.

    Digit03600029145
    Weight31313131313
    Product0318000693415
  2. 2. Add up the products

    The digits weighted 3 add up to 14, and 14 × 3 = 42. The digits weighted 1 add up to 16. Together that is 58.

  3. 3. Find the next multiple of 10

    The next multiple of 10 at or above 58 is 60.

  4. 4. The difference is the check digit

    60 − 58 = 2, so the full number is 036000291452. If the sum is already a multiple of 10, the check digit is 0.

Formats

Which Digits Do I Enter?

To calculate, enter every digit except the last one. To verify, enter the whole number. Always pick the number type first. Twelve digits could be a complete UPC-A or an EAN-13 with its check digit missing, and the two give different answers, so the calculator never guesses from the length.

Number typeAlso calledTo calculateTo verifyUsed for
UPC-AGTIN-1211 digits12 digitsRetail products in the US and Canada
EAN-13GTIN-13, ISBN-13, GLN12 digits13 digitsRetail products everywhere else, books, locations
EAN-8GTIN-87 digits8 digitsSmall packs with no room for an EAN-13
GTIN-14ITF-1413 digits14 digitsCases and cartons of a product
SSCC-18Serial shipping container code17 digits18 digitsPallets and shipments

An ISBN-13 is an EAN-13 that starts with 978 or 979, so book numbers work here too. To print one on a cover, use the ISBN barcode generator.

Spreadsheets

Calculate Check Digits in Excel or Google Sheets

Put the number without its check digit in cell A1, stored as text so leading zeros are kept. This formula returns the check digit for any length, from EAN-8 to SSCC. It uses SEQUENCE, so it needs Excel 365, Excel 2021 or Google Sheets.

=MOD(10-MOD(SUMPRODUCT(MID(A1,SEQUENCE(LEN(A1)),1)*(1+2*(MOD(LEN(A1)-SEQUENCE(LEN(A1)),2)=0))),10),10)

To build the full number in another cell, join them: =A1&B1 if the formula is in B1. If you would rather not maintain a formula, paste the column into the Bulk tab above and download the results as a CSV.

Before you print

A Valid Check Digit Is Not a Registered Barcode

The check digit only proves that a number is well formed. Anyone can give any number a correct check digit, so passing this check says nothing about who the number belongs to.

What makes a GTIN yours is the company prefix at the start of it, which is licensed from GS1. Many retailers and marketplaces look that prefix up in the GS1 database before they list a product. The UPC and EAN barcode generator pages explain where barcode numbers come from.

Why it matters

What a Wrong Check Digit Does

A scanner recalculates the check digit on every read. If it does not match, the scan is rejected, and at a checkout that means someone types the number in by hand. The check catches every single mistyped digit, and every swap of two neighboring digits unless they differ by exactly 5.

Our barcode generator checks it too. Give it a full number with the wrong last digit and it will not draw the barcode, so a typo cannot reach your labels.

Check Digit Calculator: Frequently Asked Questions

Number Checks Out? Turn It Into a Barcode

The free barcode generator draws UPC-A, EAN-13, EAN-8 and ITF-14 barcodes and exports PNG, SVG or PDF with no account. Selling online with a GS1 number? A GS1 Digital Link QR code carries the same GTIN in a code shoppers can scan with a phone.