Luhn Algorithm Calculator

Luhn Check Digit Calculator

Walter T. Luhn invented the Luhn algorithm1 in 1950. He developed the algorithm to help him create better checksums for his job as an accountant. He was responsible for creating the first programmable electronic adding machine. He also invented the first commercial telephone answering machine. He invented the first automatic book-keeping machine in 1933.

The Luhn algorithm is used to check whether the number entered by the user is correct or not. We use this algorithm to validate various identification numbers, such as:

  • The numbers on the front of credit cards.
  • Social security numbers
  • IMEI of a phone

The last number of a Luhn sequence is the control digit. The algorithm will calculate a different checksum if you enter a digit incorrectly. So, the Luhn algorithm is well suited for checking numbers entered by people. If they have a typo in their sequence, the last digit will fail the validation.

If you want to see the validation method, take a look at this answer.