Luhn Checker: Verify and Complete a Mod-10 Checksum
Check a complete number with the ISO/IEC 7812-1 Luhn mod-10 formula, or append the missing check digit. Each row shows the digit, the doubled value, and the cross-sum behind the total. A pass is the checksum only. This page does not look up an issuer.
Include the final check digit. Spaces and hyphens are ignored. Any other character is rejected. At least two digits. The working updates as you type.
Enter at least two digits. Spaces and hyphens are ignored.
Scroll the table sideways to see every column.
| Place from right | Digit | Doubled value | Cross-sum | Working |
|---|
How this check works
The working updates as you type. Load 79927398713 to check the textbook number: the total is 70, so it passes. Load payload 7992739871 to append the check digit 3. Swapping the first two digits of the textbook number produces 97927398713, total 68, which fails.
- Spaces and hyphens are removed. Any other character stops the check. One digit is rejected. More than 64 digits is rejected.
- Places are counted from the right. Place 1 is the check digit of a complete number, and it is not doubled.
- Every even place is doubled. Odd places stay as written.
- Each doubled value becomes a cross-sum. Values 0 through 9 stay the same. Values 10 through 18 become the sum of their two digits, which is the same as subtracting 9. 16 becomes 7.
- The cross-sums are added. The number passes when the total modulo 10 is 0.
- A missing check digit is computed from the payload in the box. The new digit goes on the right, so every payload digit moves one place further from the right and the doubling pattern shifts. The digit, including 0, is the one that makes the completed total a multiple of 10.
Limits
- This is the mod-10 double-add-double formula from ISO/IEC 7812-1:2017 Annex B.
- ISO/IEC 7812-1:2017 primary account numbers are 10 to 19 digits, including the check digit. The length line only says whether the count falls in that range.
- A pass means the cross-sum is a multiple of 10. This tool does not look up an issuer and does not identify the number as a payment card, an IMEI, or an account.
- Every single-digit change is caught. Most adjacent swaps are caught. Swapping 0 with 9 is not: 091 and 901 both total 10 and both pass. The pairs 22 and 55, 33 and 66, and 44 and 77 can share a total too.
- Leading zeros stay in the digit string and keep their places.
- Only spaces and hyphen-minus characters are ignored. A tab, a slash, or a longer dash is rejected so it is not dropped silently.
- A card security code, an expiry date, and a PIN are separate from this check digit.
- The calculation runs in this page. The number is not saved and not sent.