Check Digit Calculator

Compute or validate Luhn, ISBN, EAN/UPC, GTIN, ISSN, IBAN and VIN check digits.

About this tool

Choose a scheme and type a number. Enter it without the check digit to calculate one, or with it to validate it; if it's wrong, the tool shows the corrected number. Luhn numbers, which have no fixed length, are validated and the tool also shows what to append if you left the check digit off. Spaces and hyphens are ignored, and each scheme loads a sample to try.

How check digits catch mistakes

A check digit is calculated from the other digits of an identifier and added to it, so that most typing mistakes produce a number that fails the check. The Luhn algorithm, used for payment card numbers, IMEI phone numbers and many national IDs, doubles every second digit from the right, subtracts 9 from any result over 9, and makes the total a multiple of 10; it catches every single-digit error and most swapped neighbours. EAN-13 barcodes, ISBN-13s, UPC-A and other GTINs weight the digits alternately 3 and 1. The ISBN-13 978-0-306-40615 needs the check digit 7. ISBN-10 and ISSN use weights that count down and a remainder modulo 11, so the check can be 10, written as X. IBANs, the international bank account format, put two check digits after the country code: the tool moves the first four characters to the end, turns letters into numbers (A = 10 โ€ฆ Z = 35) and requires the remainder modulo 97 to be 1. North American vehicle identification numbers convert letters to values, multiply by position weights and put the remainder modulo 11 in the ninth position. Honest limits: a valid check digit means only that a number is well-formed. It doesn't prove a card, book, account or vehicle exists, and some European VINs don't use a check digit at all. Use sample or test numbers rather than real card details. The barcode generator turns EAN and UPC numbers into barcodes and the barcode scanner reads them.

Frequently asked questions

How does the Luhn algorithm work?

From the right, double every second digit, subtract 9 from results over 9, add everything up, and the total must be a multiple of 10.

Why does an ISBN-10 end in X?

Its check digit is calculated modulo 11, so it can be 10; that's written as X.

Does a valid IBAN mean the account exists?

No. It only means the number is correctly formed; the bank must confirm the account.

Is my data saved?

No. The calculation runs in your browser and nothing is stored or sent.