How to use the nhs number check digit validator
- Type or paste the numbers, one per line. Spaces between the groups of digits are fine.
- Use 10 digits to test a number, or the first 9 digits to have the last one calculated.
- Read the result: whether the check works, the weighted sum, the remainder and the digit it expects.
- Copy the table or save the CSV.
Formula
sum = 10 d1 + 9 d2 + 8 d3 + 7 d4 + 6 d5 + 5 d6 + 4 d7 + 3 d8 + 2 d9
check = 11 - (sum mod 11), where 11 becomes 0 and 10 means the number cannot be valid
valid when d10 = check
The first nine digits are weighted from 10 down to 2. The remainder after dividing by 11 decides the tenth digit. A computed value of 10 is never used, so a nine digit start that leads to 10 has no valid last digit.
Checking 943 476 5919
The digits 9, 4, 3, 4, 7, 6, 5, 9, 1 times 10, 9, 8, 7, 6, 5, 4, 3, 2 give 90, 36, 24, 28, 42, 30, 20, 27 and 2, which add up to 299. Dividing by 11 leaves 2 (299 = 27 x 11 + 2), so the check digit is 11 - 2 = 9. That matches the tenth digit.
Changing the last digit to 8 makes the test fail, and entering only 943 476 591 makes the page add the 9.
Format only, nothing stored
This page tests the arithmetic of one digit. It does not look anyone up, and it cannot say whether a number was ever issued. A health identifier is personal data, so the page does everything in your browser and stores and sends nothing.
Scottish CHI numbers use a different format, so they are not covered here.
When no last digit works
For some nine digit starts the formula gives 10, and a check digit of 10 does not exist. Such a start can never be the beginning of a valid number. The page tells you so instead of guessing, and every possible tenth digit fails.
Roughly one start in eleven behaves this way, which is why issued numbers skip those starts.
Assumptions and limits
- Only the modulus 11 check digit is tested, not whether the number was issued.
- Ten digits are tested and nine digits get a last digit calculated.
- Spaces and hyphens are ignored. Letters are rejected.
- Nothing you type is stored or sent anywhere.
- Up to 200 lines are read at once.
Frequently asked questions
Why does a remainder of 10 mean the number is invalid?
The check digit is 11 minus the remainder, and when the remainder is 1 that gives 10, which cannot be written as one digit. Numbers are only issued with a check digit that fits, so such a start is never used.
Does a pass mean the number belongs to a patient?
No. It only means the digits are consistent. About one in eleven random ten digit strings pass, so a pass is no proof that the number exists.
Is it safe to paste real numbers here?
The page works in your browser and sends nothing, but a health identifier is sensitive. Use made up numbers where you can, and avoid pasting real ones on shared computers.
What does the weighted sum column show?
It shows the total of the first nine digits times their weights from 10 down to 2. It lets you repeat the calculation by hand and see exactly how the check digit follows.