Luhn Checksum Calculator
Enter a number and pick validate or compute check digit.
Result
How it is calculated
The tool has two modes. In validate mode the last digit is treated as the check digit. Going right to left, every second digit starting with the second from the right is doubled (if the double is above 9, subtract 9). All digits are then added:
valid if sum mod 10 = 0
In check digit mode you enter the number without its check digit; the rightmost digit you typed is doubled first, and the tool returns check = (10 − sum mod 10) mod 10, the single digit to append. Input must be digits only, so spaces and dashes give no result; remove them first. The sum is shown in both modes. A pass only shows the digits are internally consistent, not that the number is a real, active account.
Worked example
Validate 79927398713. Reading from the right, the digits are 3, 1, 7, 8, 9, 3, 7, 2, 9, 9, 7. Double every second one: 1 becomes 2, 8 becomes 16 and then 7, 3 becomes 6, 2 becomes 4, 9 becomes 18 and then 9. The digits now read 3, 2, 7, 7, 9, 6, 7, 4, 9, 9, 7, which add up to 70. That is a multiple of 10, so the result is Valid. Changing the last digit to 0 gives a sum of 67 and the result Invalid.
Common mistakes
- Pasting a card number with spaces or hyphens; only digits are accepted, so strip the separators first.
- Using check digit mode on a complete number. In that mode the last digit is also doubled, so a full number returns a meaningless digit; use validate mode instead.
- Using validate mode on a number that has no check digit yet and expecting it to pass.
- Assuming Valid means the card or IMEI exists; the test only catches typing errors such as a wrong digit, and many random numbers pass by chance.
- Expecting every identifier to use Luhn; many national IDs and IBANs use different check schemes.
About this calculator
The Luhn algorithm (also called the mod 10 algorithm) is a simple checksum formula used to catch accidental errors — a mistyped digit or two transposed digits — in identification numbers. Starting from the rightmost digit and moving left, every second digit is doubled; if doubling produces a two-digit number, its digits are added together (or 9 is subtracted, which is equivalent); all digits are then summed, and the number is valid only if that total is a multiple of 10.
This is the exact check built into credit and debit card numbers (ISO/IEC 7812), IMEI numbers for mobile devices, Canadian Social Insurance Numbers, and U.S. National Provider Identifiers — this calculator either validates a number you enter against the Luhn check, or, given a number missing its final digit, computes the one check digit that makes it pass.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
A Luhn pass is worth most as a typo filter before you send a number somewhere. If a form rejects a number you copied, run it here in validate mode: a failure usually points to one mistyped or swapped digit, while a pass means the problem lies elsewhere, such as the wrong number or an inactive account. The check cannot tell a real number from a made-up one. Which kinds of identifiers do you check most often?