Home

checkdigit

A check digit is a form of redundancy used in identification numbers to help detect errors in data entry, transcription, or transmission. It is a single digit added to the end of a numeric sequence and computed from the other digits in the sequence. The goal is to allow quick validation of the entire number and to catch common mistakes such as mistyped digits or swapped adjacent digits.

Common algorithms rely on modular arithmetic. The most widely used family is modulus-10 schemes, including the

Applications and limitations: Check digits are used in ISBNs and ISSNs, UPCs and EANs, bank account numbers,

Luhn
algorithm,
which
is
employed
for
credit
card
numbers
and
many
other
identifiers.
In
Luhn,
every
second
digit
from
the
right
is
doubled;
if
the
result
is
greater
than
9,
9
is
subtracted.
The
sum
of
all
digits,
including
the
check
digit,
should
be
a
multiple
of
10.
ISBN-13
and
EAN-13
use
a
related
mod-10
check
with
alternating
weights
of
1
and
3.
Modulus-11
schemes
also
exist,
where
the
check
digit
can
be
0–10
(often
represented
as
X).
Some
systems
use
larger
moduli
or
more
complex
rules
to
detect
a
broader
range
of
errors.
and
various
product
and
library
identifiers.
They
provide
a
simple,
fast
error-detection
mechanism
requiring
little
computation.
However,
no
check-digit
scheme
guarantees
error-free
data;
certain
transpositions
or
multiple-digit
errors
can
go
undetected,
and
check
digits
do
not
provide
data
security
or
authentication.