Math
Instant, private, and free
Luhn Algorithm Calculator.
Validate a card or identifier digit string with the Luhn checksum.
Set your values
Results update as you type.
Results update automatically as you type.
Use Cases
Verify credit card numbers
Quickly check if a credit card number is correctly formatted according to the Luhn algorithm, which is used by most major card issuers.
Example: Enter a 16-digit card number to see if it passes the checksum.
Check other identification numbers
Validate other numbers that use the Luhn checksum, such as IMEI numbers, National Provider Identifier (NPI), and some government IDs.
Example: Enter an IMEI number to confirm its validity.
Frequently Asked Questions
- What is the Luhn algorithm?
- The Luhn algorithm, also known as the mod 10 algorithm, is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers. It works by doubling every second digit from the right, summing all digits, and checking if the total is divisible by 10.
- How do I use this calculator?
- Simply enter the digit string you want to validate into the 'Digits' field. The calculator will apply the Luhn checksum and tell you whether the number passes or fails the validation.
- Can this calculator generate valid numbers?
- No, this calculator only validates existing digit strings. It does not generate numbers that pass the Luhn checksum.
Tips & Common Mistakes
Tips
- Ensure you enter only digits (0-9) without spaces or dashes for accurate validation.
- The Luhn algorithm works from right to left, so the rightmost digit is the check digit.
- If the total sum is divisible by 10, the number passes; otherwise, it fails.
- Use this tool to catch typos in manually entered numbers before submission.
Common Mistakes to Avoid
- Including non-digit characters like spaces, hyphens, or letters, which can cause incorrect results.
- Entering an empty string or a single digit, which may not be meaningful for validation.
- Assuming that passing the Luhn check guarantees the number is real or active; it only verifies the checksum.
Last updated: August 13, 2026