Home · Everyday · Bases, Binary & Logic · Luhn Algorithm Calculator
Luhn Algorithm Calculator
The Luhn check on a number — the mod-10 checksum inside card numbers, IMEIs and many ID schemes.
What this calculator does
The Luhn check on a number — the mod-10 checksum inside card numbers, IMEIs and many ID schemes. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
The Luhn algorithm doubles every second digit from the right, subtracts 9 from doubles over 9, and sums everything.
A total divisible by 10 passes the checksum.
Passing Luhn means the number is well-formed, not that an account exists.
Worked example
With the example inputs this page opens with, the result is Valid (Luhn check passes) — luhn verdict. The Luhn algorithm doubles every second digit from the right, subtracts 9 from any doubled value over 9, and sums: a valid number's total is a multiple of 10. It catches typos and transpositions — it is an error check, not proof a card exists or is funded. The headline figure codes valid as 1.
Quick reference
| Figure | Value |
|---|---|
| Luhn verdict | Valid (Luhn check passes) |
| Luhn sum | 80 |
| Correct check digit for this prefix | 0 |
| Digits | 16 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Luhn Algorithm Calculator work?
The Luhn check on a number — the mod-10 checksum inside card numbers, IMEIs and many ID schemes. Number → Valid or invalid. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Luhn Algorithm Calculator need?
Number → Valid or invalid. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Luhn Algorithm Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.