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 [6262626262626262626]

  6   2   6   2   6   2   6   2   6   2   6   2   6   2   6   2   6   2   6  
 x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  x2  x1  
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  
  6   4   6   4   6   4   6   4   6   4   6   4   6   4   6   4   6   4   6  
  6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6 + 4 + 6  = 96

96 ≡ 6 (mod 10)

The test FAILED since the result (6) is not zero.

A single wrong digit within a valid number will always be caught by this test.


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

2024-05-21 15:56:39 ADT
Last Updated: 2015-03-05
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...