“The bar code feature contains the photo and personal data of the cardholder.”
Another tight shot reveals the bar code feature of the card.
“This information is also encrypted and may only be read using software that is accessible to Canadian officials.”
In the context of passports and ID cards, a check digit is a single number located within the Machine Readable Zone (MRZ) —the two or three lines of text at the bottom of the document.1
Its primary purpose is error detection .2 When a machine scans your ID, it performs a quick math problem using the data it just read.3 If its answer doesn’t match the “check digit” printed on the card, the scanner knows it misread a character (like mistaking an ‘O’ for a ‘0’) or that the data has been tampered with.4
How it Works: The “731” Rule
The ICAO (International Civil Aviation Organization) uses a specific algorithm to calculate these digits.5 It follows a repeating 7, 3, 1 weighting pattern.
Assign Values: Digits keep their value. Letters are assigned numbers (6$A=10, B=11, \dots, Z=35$).7 The filler character (<) is 0.
Multiply by Weights: The first character is multiplied by 7 , the second by 3 , and the third by 1 .8 This pattern repeats (9$7, 3, 1, 7, 3, 1 \dots$) for the whole field.10
Sum and Modulo: All the products are added together.11 The final check digit is the remainder when that sum is divided by 10 (the modulo 10).12
Where the Check Digits are Located
You won’t just find one check digit; there are usually several, each “guarding” a specific piece of information. In a standard passport (TD3 format), they appear in these spots on the second line:
Position
Field Guarded
Description
10
Document Number
Validates your passport/ID number.
20
Date of Birth
Validates your birth date (YYMMDD).
28
Expiry Date
Validates when the document expires (YYMMDD).
43
Optional Data
Validates personal numbers or other state data.
44
Composite Digit
A “master” check digit calculated using all the fields above.
Why they matter
Scanning Accuracy: OCR (Optical Character Recognition) isn’t perfect. If a smudge on the card makes a “3” look like an “8,” the check digit will fail, and the officer will know to re-scan or enter it manually.
Security: If a forger changes the birth year on a passport but doesn’t know how to recalculate the check digit, the document will be flagged as invalid immediately by any automated gate.
Would you like me to walk through a manual calculation using a sample passport number to show you exactly how the math works?