UNB ECE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada

LUHN-10 Error Detection Tool

Error control codes can be implemented within written values such as account numbers and price tags by appending a single check digit according to the LUHN-10 Algorithm.

This particular algorithm is part of a standard (ISO-7812-1) used worldwide for various credit cards. (Specific Applications)


LUHN-10 Check Calculation

Checking [1000001864015066]

  1   0   0   0   0   0   1   8   6   4   0   1   5   0   6   6  
 x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  
  2   0   0   0   0   0   2   8  12   4   0   1  10   0  12   6  
  2 + 0 + 0 + 0 + 0 + 0 + 2 + 8 + 3 + 4 + 0 + 1 + 1 + 0 + 3 + 6  = 30

30 ≡ 0 (mod 10)

The test PASSED since the result is zero. In the above summation, any two-digit product is included as the sum of its two digits. (e.g. 12 --> 1 + 2 = 3)

There is a one-in-ten chance that a totally random number will pass this simple validity test.


Check a LUHN-10 coded number by entering it in the box below. Spaces may be used as desired.
      MATLAB

2020-12-01 07:41:36 AST
Last Updated: 2015-03-05
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...