Productivity and Utilities

Verhoeff and Damm Check Digit Calculator

Enter a number to add a check digit, or check a full number, using Verhoeff or Damm.

Your numbers

I want to

Up to 60 digits. Spaces and hyphens are ignored. For checking, include the check digit at the end.

Result

Verhoeff check digit

3

Full number: 2363

Number with its check digit
2363
Digits used
3

Digits taken from the right

StepDigitTable lookupsRunning value
16p[1][6] = 3, d[0][3] = 33
23p[2][3] = 3, d[3][3] = 11
32p[3][2] = 1, d[1][1] = 22
How this was calculated
  1. Verhoeff works from the right. Each digit is first permuted by a table row that depends on its position (p), then combined with the running value by the multiplication table of the dihedral group of order 10 (d).
  2. The check digit is the inverse of the final running value, so that the full number walks to zero. The check digit takes position 0, so the digits you entered start at position 1.
  • Both methods catch every single wrong digit and every swap of two neighboring digits. A check digit finds typing mistakes. It does not prove that a number was ever issued, and it is not a security feature.

Calculated using SumPanda.com · https://sumpanda.com/verhoeff-and-damm-check-digit-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the verhoeff and damm check digit calculator

  1. Choose Verhoeff or Damm, and whether you want to add a check digit or check a number.
  2. Type the digits. Spaces and hyphens are ignored. When checking, include the check digit at the end.
  3. Read the check digit, or whether the number is valid, with the number written out in full.
  4. Follow the table to see each digit, the table entry it used and the running value after it.

Formula

Verhoeff: c = d[c][p[position mod 8][digit]], digits taken from the right

Verhoeff check digit = inv[c] after the payload, which starts at position 1

Damm: interim = table[interim][digit], digits taken from the left, starting from 0

valid when the final running value is 0 (the check digit included)

The Verhoeff tables come from the dihedral group of order 10, and the Damm table is a Latin square with zeros on its diagonal that is weakly totally anti-symmetric. Both properties are why every single error and neighbor swap is caught.

236 and 572

The Verhoeff check digit of 236 is 3, so 2363 is valid. Walking from the right, the digits 6, 3 and 2 give the running values 3, 1 and 2, and the inverse of 2 is 3. The Verhoeff check digit of 12345 is 1.

The Damm check digit of 572 is 4. The walk goes through the table entries 9, 7 and 4, so 5724 is valid. Changing 5724 to 5734 or swapping two digits to give 5274 makes the walk end somewhere other than 0, so the number is rejected.

Why these two methods

The Luhn method used on cards and the weighted sums used on barcodes miss some errors, such as certain swaps of neighboring digits. Verhoeff and Damm were designed to catch all single wrong digits and all swaps of two neighboring digits. The cost is a table lookup in place of simple arithmetic.

To check Luhn, ISBN and barcode digits, see the Check Digit Validator and the GS1 GTIN SSCC Check Digit Builder. For an IBAN, see the IBAN Structure Checker and Builder, and for whole files, the CRC32 Checksum Calculator.

What a check digit does not do

A check digit finds typing and copying mistakes. It does not show that a number was issued or belongs to anyone, and it is not a secret or a signature. Two wrong digits that cancel each other, or a swap of digits that are far apart, may still pass.

Assumptions and limits

  • The input is digits only, up to 60 of them, with spaces and hyphens removed.
  • In check mode the last digit is taken as the check digit.
  • The standard Verhoeff permutation and multiplication tables and the standard Damm table are used.
  • Leading zeros are kept.
  • The tests compare the tool with a separate implementation and try every single error and neighbor swap.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Which is better, Verhoeff or Damm?

Both catch all single errors and neighbor swaps. Damm uses one table and is simpler to code, and Verhoeff is older and used in some national ID systems.

Does either method catch every error?

No. They catch every single-digit error and every swap of neighboring digits, but some other mistakes can pass, such as certain swaps of digits far apart.

Can the check digit be 0?

Yes. Some numbers have a check digit of 0, and it counts like any other digit.

Is this the same as the Luhn check?

No. Luhn uses a doubling and sum rule. Verhoeff and Damm use tables, and they catch more neighbor swaps.