Check digits: what are they?

Print anything with Printful



Check digits are used for error detection and can refer to a digit associated with a multi-digit number or a measure used to test the accuracy of a collection of data. They are used in various numbering and coding systems and can detect common data entry errors. There are different algorithms for calculating check digits, such as the Luhn formula, which adds a check digit to the end of the number being tested. Check digits can also be used to limit forgery of tax-related numbers.

A check digit is an integral part of an error detection method. It can refer to one of two things: the actual digit, associated with a multi-digit number, which represents whether or not that multi-digit number is accurate. Alternatively, a check digit refers to the measure used to test the accuracy of a collection or block of data, as opposed to a single number. In either case, the process of this type of redundancy checking can be referred to as a check digit computation or check digit algorithm. The check digit method can take many different approaches and is used internationally for many different purposes. Some common numbering or coding systems that use check digits include, among others, the Universal Product Code (UPC) and the International Standard Book Number (ISBN).

The check digit is designed to detect particular types of common data entry errors, whether the data was read and entered by the same person on a keyboard or telephone keypad, or whether the data was read by a person and entered by another. The most common data entry error in this regard is to simply enter a single digit incorrectly. This accounts for between 60 and 95 percent of all data errors. Related second are the omission or addition of a single digit on one side and the transposition of adjacent digits on the other. Other errors that are possible, but occur much less frequently, include reversing the order of three digits so that 123 is entered as 321, for example; and phonetic errors, confusing 16 and 60.

Check digits can actually be added to the number they need to check. In the vehicle identification number (VIN), which has 17 characters, the check digit is in the ninth position. However, in a 13-digit ISBN number, the check digit appears at the end, as the 13th number.

There are several commonly used algorithms for calculating check digits, and the same algorithm is not always used for the same purpose internationally. For example, the algorithm developed and named after scientist Hans Peter Luhn, also called Mod 10, is the formula used in the United States for credit and debit card numbers and in Canada for Social Security number authentication ( SIN). The Luhn algorithm is also used for international European Article Number (EAN13) barcodes, while a different formula, Mod11, is used for some barcodes in Germany and Tax Numbers (TFN) in Australia.

Luhn’s formula adds the check digit to the end of the number it tests. From right to left, including the check digit, every second digit is doubled. If any of the doubled digits becomes a multi-digit number, the individual numbers of those multi-digit numbers are added together. The remaining numbers are added up. If the resulting sum is divisible by 10, the multi-digit number is valid according to Luhn’s formula. If the resulting sum is not divisible by 10, a check digit will be added which will make the resulting sum divisible by 10. So if the number to validate is 1234, it would not be valid without a check digit of 6 tacked at the end. This is because (1+1) + 2 + (3 + 3) + 4 = 14 which is not divisible by 10. Adding a check digit of 6, however, will make the resulting sum divisible by 10 and therefore valid for Luhn’s formula.
In Australia, there has been an attempt to use check digits for a second purpose: to limit people’s ability to forge valid numbers for tax purposes. Despite government efforts to keep the check digit algorithm a secret, people have been able to figure it out and continue to fake tax-related numbers.




Protect your devices with Threat Protection by NordVPN


Skip to content