NHS Number Check Digit CalculationThe NHS number comprises 10 digits. The first nine are the identifier and the tenth is a check digit used to confirm the number's validity. The check digit is calculated using the Modulus 11 algorithm. There are four steps in the calculation:
- Step 1 - multiply each of the first nine digits by a weighting factor as follows;
Digit Position
(Starting from the left) |
Factor |
1 |
10 |
2 |
9 |
3 |
8 |
4 |
7 |
5 |
6 |
6 |
5 |
7 |
4 |
8 |
3 |
9 |
2 |
- Step 2 - add the results of each multiplication together
- Step 3 - divide the total by 11 and establish the remainder
- Step 4 - subtract the remainder from 11 to give the check digit
There are two occasions where the check digit calculation process must be modified slightly:
- if the result of step 4 is 11 then a check digit of 0 is used
- if the result of step 4 is 10 then the number is invalid and not used.
Example: Suppose the first nine digits of the number are 401 023 213
- Step 1 - apply weighting factors
Digit Position |
Value |
Factor |
Result |
1 |
4 x |
10 |
= 40 |
2 |
0 x |
9 |
= 0 |
3 |
1 x |
8 |
= 8 |
4 |
0 x |
7 |
= 0 |
5 |
2 x |
6 |
= 12 |
6 |
3 x |
5 |
= 15 |
7 |
2 x |
4 |
= 8 |
8 |
1 x |
3 |
= 3 |
9 |
3 x |
2 |
= 6 |
- Step 2 - add the results of each multiplication together
40 + 0 + 8 + 0 + 12 + 15 + 8 + 3 + 6 = 92
- Step 3 - divide the total by 11
92 รท 11 = 8, remainder 4
- Step 4 - subtract the remainder from 11 to give the check digit
11 - 4 = 7
The complete NHS Number in this example is therefore: 401 023 2137 Please note there are some restrictions Constant number strings such as 444 444 4444, 666 666 6666 etc are not issued. So, although they pass the checksum, they are invalid. The reason for excluding numbers based on a single repeating digit is to safeguard the integrity of the numbering system and prevent potential mistaken use or abuse. < Publications Page |