A Luhn algorithm is designed to validate social security numbers or credit card numbers. This algorithm is named as a Luhn formula or modulus 10. It is used to sum up, the digits in the card and check whether the sum is equal to what is expected or if there is an error in the sequence. If the total of modulus ten will be equal to 0, then the number is valid according to the luhn method.