Skip to main content
Check Digit Calculator
Core

Verhoeff Calculator

Calculate Verhoeff check digits with permutation and multiplication tables. Follow the steps for detecting digit and swap errors.

Last updated:

Core Algorithms & Modulus

Calculate permutation-based check digits.

Length: 3 chars
Calculated Check Character / Checksum
--Ready
Complete Validated Sequence:
--
Arithmetic Steps & Mathematical Specification

Initialising algorithm engine for Verhoeff Calculator...

How Verhoeff Calculator Works?

The Verhoeff Calculator works by passing each digit through a position-dependent permutation table and combining the results with the multiplication table of the dihedral group D5. The final value is inverted to give the check digit.

  1. 1Reverse the payload so the rightmost digit is processed first.
  2. 2Set the running check value c to 0.
  3. 3Look up p = P[(i + 1) mod 8][digit] in the permutation table for each position i (starting at 0).
  4. 4Update the running value with c = D[c][p] from the D5 multiplication table.
  5. 5Take the inverse inv[c] after the last digit: that value is the check digit.
  6. 6Validate a complete number by running the loop over all digits without the +1 shift: a valid number ends with c = 0.

Verhoeff Calculator Formula

The Verhoeff formula is Check Digit = inv( D(…D(D(0, P₁(a₁)), P₂(a₂))…, Pₙ(aₙ)) ), where aᵢ are the payload digits read from the right.

c₀ = 0
cᵢ = D[cᵢ₋₁][ P[i mod 8][aᵢ] ]   for i = 1…n (aᵢ read right to left)
Check Digit = inv[cₙ]
  • D is the 10 × 10 multiplication table of the dihedral group D5.
  • P is the permutation table: row k applies the base permutation (1 5 7 6 2 8 3 0 9 4) k times.
  • inv is the inverse table [0, 4, 3, 2, 1, 5, 6, 7, 8, 9].
  • aᵢ is the payload digit at position i from the right.
Worked example: payload 236
Position 1: digit 6 → P = 3, D[0][3] = 3
Position 2: digit 3 → P = 3, D[3][3] = 1
Position 3: digit 2 → P = 1, D[1][1] = 2
inv[2] = 3
Complete number = 2363

Verhoeff Calculator Conversion Table

The Verhoeff conversion table shows the inverse lookup for every final value of c and sample payloads converted to complete Verhoeff numbers.

Final cCheck digit inv[c]Sample payloadCheck digitComplete number
0023632363
14123451123451
2314285701428570
32758722758722
411428570814285708
55847364309548372845678922847364309548372845678922
660404
7799989998
882024020240
99505051505051

What is Verhoeff Calculator?

A Verhoeff Calculator is a tool that computes or validates a decimal check digit using the Verhoeff algorithm. Dutch mathematician Jacobus Verhoeff published the algorithm in 1969.

The Verhoeff algorithm detects 100% of single-digit errors and 100% of adjacent transpositions. The method uses no modulus and no weights: three lookup tables do the work.

India's 12-digit Aadhaar number ends with a Verhoeff check digit, which makes Aadhaar the largest deployment of the algorithm with more than 1.3 billion numbers issued.

What are the uses of Verhoeff Calculator?

There are 4 main uses of the Verhoeff Calculator, including Aadhaar checks, identity number design, and error-rate studies.

  • Aadhaar validation: Developers confirm the 12th digit of an Aadhaar number before submitting a KYC request.
  • Identity number design: Agencies pick Verhoeff for new citizen or member numbers when full transposition detection is required.
  • Data entry protection: Call centres protect order and policy numbers read aloud and typed by hand.
  • Algorithm teaching: Teachers show group theory in practice through the D5 table.