What Does Luhn Formula Mean?

The Luhn formula is a simple checksum formula that is used in the validation of various identification numbers such as credit card numbers, social security numbers, IMEI numbers and many others. The algorithm validates the number against an included check digit in the number itself, usually the last digit. The Luhn formula is now in the public domain and is widely used in various industries and specified in ISO/IEC 7812-1.

Techopedia Explains Luhn Formula

The Luhn Formula was devised by Hans Peter Luhn, an IBM scientist, who filed a patent for the formula in 1954, which was granted in 1960. The formula was not designed to be a cryptographically secure hash function, but rather as a simple way to protect against accidental errors in creating unique identification numbers. Many government agencies and private institutions used the formula for distinguishing valid numbers from mistyped, incorrect or simply fraudulent numbers.

9

2

7

6

3

8

5 is the check digit

4

12

16

sum = 45; 45 × 9 = 405 (mod 10) = 5