Calculate quasigroup-based check digits.
Initialising algorithm engine for Damm Calculator...
How Damm Calculator Works?
The Damm Calculator works by reading each digit from left to right and moving through a 10 × 10 quasigroup table, where the final interim value becomes the check digit. H. Michael Damm presented the algorithm in 2004.
- 1Set the interim digit to 0.
- 2Read the first payload digit and find the table cell at row = interim digit, column = payload digit.
- 3Replace the interim digit with that cell value.
- 4Repeat the lookup for every remaining payload digit.
- 5Append the final interim digit as the check digit.
- 6Validate a full number by running all digits through the table: a valid number ends at 0.
Damm Calculator Formula
The Damm formula is Check Digit = Q( … Q(Q(0, a₁), a₂) …, aₙ ), where Q is a weakly totally anti-symmetric quasigroup of order 10.
interim₀ = 0 interimᵢ = Q[interimᵢ₋₁][aᵢ] for i = 1…n (left to right) Check Digit = interimₙ
Qis the 10 × 10 Damm table with zeros on the main diagonal.aᵢis the i-th payload digit from the left.interimᵢis the running value after digit i.
Q[0][5] = 9 Q[9][7] = 7 Q[7][2] = 4 Check digit = 4 Complete number = 5724
Damm Calculator Conversion Table
The Damm conversion table reproduces the first row of the quasigroup table and sample payloads with their Damm check digits.
| Column digit | Q[0][digit] | Sample payload | Check digit | Complete number |
|---|---|---|---|---|
| 0 | 0 | 572 | 4 | 5724 |
| 1 | 3 | 1234 | 0 | 12340 |
| 2 | 1 | 98765 | 3 | 987653 |
| 3 | 7 | 2026 | 5 | 20265 |
| 4 | 5 | 4711 | 8 | 47118 |
| 5 | 9 | 100 | 7 | 1007 |
| 6 | 8 | 31415 | 5 | 314155 |
| 7 | 6 | 8008 | 8 | 80088 |
| 8 | 4 | 123456789 | 4 | 1234567894 |
| 9 | 2 | 55 | 3 | 553 |
What is Damm Calculator?
A Damm Calculator is a tool that generates or verifies a single decimal check digit with the Damm algorithm. The Damm algorithm needs one lookup table and no arithmetic beyond indexing.
The Damm algorithm detects 100% of single-digit errors and 100% of adjacent transpositions, matching Verhoeff with a simpler table. The check digit never takes the letter X, so the full code stays numeric.
What are the uses of Damm Calculator?
There are 4 main uses of the Damm Calculator, including numeric ID design, embedded firmware, and manual entry protection.
- Numeric ID design: Teams choose Damm for new numeric identifiers that must stay digits-only and catch every adjacent swap.
- Embedded systems: Firmware engineers fit the 100-byte table into microcontrollers with no division hardware.
- Ticket and booking numbers: Event and travel systems protect reference numbers read over the phone.
- Algorithm comparison: Analysts compare Damm results with Luhn and Verhoeff output for the same payload.