Mod 10 Calculator

Enter a number to see the Luhn (mod 10) calculation broken down step by step.


How this tool works

The mod 10 calculator computes the check digit for any weighting scheme that works the same way as Luhn but with different weights, and it shows the running sum at each step. The Luhn algorithm is a mod 10 scheme with alternating weights of 1 and 2, and the same routine is used for other identifiers with their own weightings.

What makes it useful rather than a novelty is that it shows the working. A developer implementing a checksum wants to see which digit maps to which weight, and the intermediate sums are what tell you whether your implementation and the spec agree.

How the weights are applied

StepValue
Digits4 2 4 2 4 2 4 2 4 2 4 2 4 2 4 2
Weights from the right2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
Doubled values above 9Reduced by 9
Sum72, a multiple of 10, so the check digit is 0

The weights alternate from the right, including the position of the check digit itself.

When to use it

Frequently asked questions

What does the mod 10 calculator do?

It applies the mod 10 checksum, showing the weight applied to each digit and the running sum, so you can check an implementation digit by digit.

What are the weights?

Alternating 1 and 2 from the right, with any doubled value above 9 reduced by 9. The check digit's own position takes part in the sum.

How is the check digit derived?

Sum the weighted digits, then the check digit is whatever brings the total to the next multiple of 10. A total that is already a multiple of 10 means a check digit of 0.

Is mod 10 the same as Luhn?

Luhn is a mod 10 scheme with the 1 and 2 weighting, and it is the one used on payment cards. The term covers other schemes with different weightings.

Does a mod 10 check digit prove anything about a record?

No. It is a transcription check. It catches single-digit errors and adjacent transpositions, and it says nothing about the underlying data.

Related tools

Related guides