Luhn Check Digit Validator and Calculator

The Luhn formula protects card numbers, IMEIs and many account numbers against typos. Enter one number per line: the tool checks the last digit or calculates it. Please use sample or test numbers only.

Do not enter real card details – nothing is sent or stored, and the check says nothing about validity or available funds.

Your text stays in your browser – it is not sent, not stored and not added to the address bar.

Result

Result
1 of 1 pass the Luhn check
Details per number
NumberResultDetails
7992 7398 713✓ check digit correctLuhn sum 70 – divisible by 10 (11 digits)
Format check only: do not enter real card details – nothing is sent or stored, and the check says nothing about validity or available funds.

How it is calculated

Do not enter real card details. The calculation runs only in your browser; your input is not sent, not stored and not added to the address bar. The result is a pure format check: it says nothing about whether a card exists, is blocked or has funds.

How the Luhn algorithm works

  1. Starting from the right and skipping the check digit, double every second digit.
  2. If the doubled value is greater than 9, add its digits (same as subtracting 9): 7 × 2 = 14 → 5.
  3. Add up all digits. The check digit tops the sum up to the next multiple of 10.

Example 7992739871: from the right 1→2, 7, 8→16→7, 9, 3→6, 7, 2→4, 9, 9→18→9, 7. The sum is 67; 3 is missing to reach 70 → full number 79927398713. To validate, include the check digit: the sum must be divisible by 10 (here 70).

Where is Luhn used?

In card numbers under ISO/IEC 7812-1 (payment and many loyalty cards), in the 15th digit of a mobile phone’s IMEI (3GPP TS 23.003) and in many customer and contract numbers. It catches every single wrong digit and almost all swaps of adjacent digits – except “09” ↔ “90”. It does not protect against made-up numbers: one in ten random numbers passes.

For testing you can use the textbook example 79927398713 or the IMEI from the 3GPP standard, 49015420323751-8.

Frequently asked questions

Is my card number valid if it passes the Luhn check?

No. The check only shows that the digit sequence is well-formed. Whether a card exists, is active or has funds is known only to the issuing bank. Enter real card details only in a merchant’s checkout.

Is my input stored or transmitted?

No. The calculation runs in JavaScript on your device, the input is not in the URL and is not saved in your browser. Still, please use only sample or test numbers.

Can I check an IMEI with it?

Yes. The 15-digit IMEI ends with a Luhn check digit (3GPP TS 23.003, Annex B). Enter all 15 digits in “validate” mode, or the first 14 in “calculate” mode.

Which errors does the Luhn algorithm miss?

The swap of 0 and 9 (09 ↔ 90), twin errors such as 22 ↔ 55, 33 ↔ 66, 44 ↔ 77, and several simultaneous errors that happen to cancel out.

Why is there no card issuer detection?

The mapping of leading digits (IIN/BIN) to issuers changes constantly and is not needed for a format check. The tool deliberately limits itself to the check digit.

Sources and legal basis

As of:

Related tools