Why do barcodes have a check digit?
The last digit of a barcode is computed from the others, so a scanner can immediately tell that it has misread something β a check digit does not correct errors, it detects them, and detecting a misread is the whole point at a till.
How the digit is computed
For a 13-digit EAN, the first twelve digits are multiplied alternately by 1 and 3, summed, and the check digit is whatever makes that total a multiple of 10. It is arithmetic simple enough to do in your head and cheap enough for 1970s hardware to do instantly.
Why alternating weights
Weighting every digit equally would catch a digit read wrong but not two digits swapped, and transposition is one of the commonest human and scanner errors. Alternating 1 and 3 makes most transpositions change the total, so they fail the check.
Detection is not correction
A check digit tells you something is wrong; it does not tell you what. That is the right trade for a barcode: the cost of a failed read is a beep and a rescan, while the cost of a silent misread is the wrong item on the receipt.
Where the idea goes next
The same principle scales up. ISBNs use a similar scheme, credit card numbers use the Luhn algorithm, and QR codes go further into ReedβSolomon, which detects AND corrects β because rescanning a damaged printed code is not always possible.
Why the last digit is not part of the product number
The check digit is computed, so it carries no information about the product and cannot be chosen. A manufacturer allocating numbers does not get to pick a memorable ending, and a number quoted without its check digit is not a shorter version of the code but an incomplete one. Systems that store twelve digits and recompute the thirteenth are relying on that arithmetic being deterministic, which it is.
Why a scanner beeps twice
Many tills read the same symbol several times in a single pass and require agreement before accepting it. A check digit that fails simply discards that read, so the scanner keeps trying rather than reporting an error, and what you hear as one beep is the first read that both decoded cleanly and matched. That is why a damaged label takes noticeably longer rather than failing outright.
Sources
GS1 General Specifications. Every claim above is drawn from these; where a claim is contested or unsettled the article says so rather than picking a side.
How this article was made
Written by a person. Reviewed by Editorial review, Leumas on 2026-08-31. 388 words.
Questions
Why do barcodes have a check digit?
The last digit of a barcode is computed from the others, so a scanner can immediately tell that it has misread something β a check digit does not correct errors, it detects them, and detecting a misread is the whole point at a till.
How do I know this is right?
The sources are listed on the page and a person reviewed it on 2026-08-31. Where a question is genuinely open, the article says so instead of resolving it.