Check Digit Calculator

Enter a barcode number without its last digit. The calculator returns the GS1 check digit and the full code. For example, 03600029145 has check digit 2, so the UPC is 036000291452.

By Mustansar Iqbal Khan, independent developerUpdated

Check Digit Calculator

Result

Working it out…

How is a UPC check digit calculated?

Starting from the rightmost digit, multiply digits alternately by 3 and 1 and add them up. The check digit is the amount needed to round that sum up to the next multiple of 10.

Check digit = (10 − (Weighted sum mod 10)) mod 10

Barcode lengths

TypeDigits enteredTotal digits
EAN-878
UPC-A1112
EAN-131213
GTIN-141314

Frequently asked questions

Why do barcodes have a check digit?

It catches scanning and typing errors. If one digit is wrong, the check digit will not match.

Can I make my own UPC numbers?

No. Retail barcodes must use a company prefix licensed from GS1 US.

Does this work for ISBN-13?

Yes. ISBN-13 uses the same EAN-13 method.

Sources