Skip to main content

NHS Number Generator

NHS number generator for UK healthcare testing and integration purposes.

Waiting for generation...

About NHS Numbers

The NHS Number is a unique 10-digit number used by the National Health Service in England, Wales, and the Isle of Man to uniquely identify patients.

The check digit calculation uses a weighted Módulo 11 checksum with weights from 10 to 2. A remainder result of 10 represents an invalid number according to official NHS guidelines.

Anatomy & Structure of NHS Number (10 Digits)

The National Health Service patient identifier consists of 10 numeric digits:

PositionFieldLengthMeaning & RuleExample
1 to 9Patient Identifier9 digitsUnique sequential patient index in NHS England and Wales943476591
10Check Digit1 digitModulo 11 checksum digit (numbers resulting in 10 are discarded)9

NHS Number Validation Algorithm (Modulo 11)

The official NHS formula weights the first 9 digits from 10 down to 2:

CheckDigit = 11 - (sum(d_i * (11 - i)) % 11)
  1. 1. Multiply each of the first 9 digits by weights: [10, 9, 8, 7, 6, 5, 4, 3, 2].
  2. 2. Compute the total sum of all products.
  3. 3. Compute remainder: Remainder = Sum % 11.
  4. 4. Compute check digit: CheckDigit = 11 - Remainder.
  5. 5. If CheckDigit == 11, final check digit is 0.
  6. 6. If CheckDigit == 10, the NHS number is INVALID by regulation and rejected.

Frequently Asked Questions