Official CMS example
- Input
- 123456789
- Expected output
- Dígito 3: NPI 1234567893 (total 67, 70 - 67 = 3)
This is the pair the CMS document uses in both versions of the calculation, with and without the prefix.
how to calculate the NPI check digit
The tenth digit of an NPI comes from a Luhn with one twist: the calculation is done as if the number had 80840 in front. Here is the full sum of the official CMS example, the shortcut that skips the prefix and the mistakes this calculation catches.
This is the pair the CMS document uses in both versions of the calculation, with and without the prefix.
The tool strips the 80840 from the 15 digits and validates the 10-digit NPI.
The leading 1 is doubled (2) and the prefix adds 24, a total of 26. The digit 4 brings the sum to 30.
The CMS initially reserved first digits 1 and 2, and both pass Luhn the same way.
Leaving out 80840 gives 7, which is the official 3 plus 4.
It is the unique 10-digit identifier of US health care providers, created by the final rule of January 23, 2004 (69 FR 3434). CMS issues and maintains it through the NPPES registry. The number has no embedded meaning: it does not indicate state, specialty or provider type.
So that every NPI can be used as an issuer identifier on a standard health ID card without changing its check digit. The CMS document says the digit is always calculated as if the prefix were present.
It is the same algorithm, the Luhn modulus 10 recognized as an ISO standard, applied to a different number. The difference is that for the NPI the calculation includes 80840 ahead of the 9 digits.
No. It only catches typing mistakes. Existence is confirmed in the CMS NPPES registry, which the tool links to and does not query.
1234567893
The NPI does not reveal whether it is Type 1 (individual) or Type 2 (organization). That only shows up in the official NPPES registry.
| Digit | 8 | 0 | 8 | 4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Double | x2 | x2 | x2 | x2 | x2 | x2 | x2 | ||||||||
| Value | 8 | 0 | 8 | 8 | 0 | 2 | 2 | 6 | 4 | 1 | 6 | 5 | 8 | 9 | 3 |
8 + 0 + 8 + 8 + 0 + 2 + 2 + 6 + 4 + 1 + 6 + 5 + 8 + 9 + 3 = 70 | mod 10 = 0
The first 5 digits (80840) are the constant prefix. Digits in alternating positions are doubled starting next to the last one, and doubles above 9 lose 9. The total must be a multiple of 10.
Everything runs in your browser. No NPI you type or generate is sent to a server, and analytics only receives the action and the overall result, never the number.