How To Calculate The NPI Check Digit
January 15, 2015 Revised: May 22, 2018
The National Provider Identifier (NPI) check digit is calculated using the ISO standard Luhn algorithm, a modulus 10 algorithm. The Luhn algorithm was designed as a simple method to help guard against accidental keying errors. In addition to its application in validating NPI numbers, it's also commonly used in validating credit card numbers and IMEI numbers.
Before we get started, let's talk briefly about the card issuer identifier. A card issuer identifier is an identifier for an entity that issues a health care identification card. If the NPI is used as a component of the card issuer identifier on a standard health care identification card, the NPI will be prefixed with the 5 digit identifier "80840". The initial two digits, "80", indicates health applications. The last three digits, "840", represents the United States.
Not looking to program your own NPI Validation tool? Use our simple to use NPI Validation tool.
NPI Requirements
- The NPI is an intelligence-free, unique 10-position numeric identifier. The last digit is reserved as the ISO standard check digit.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 3
- 15-position numeric NPI being used as a component of the card issuer identifier.
- 8
- 0
- 8
- 4
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 3
- If the NPI is used to identify the card issuer on a card, the card issuer identifier would consist of 15-positions instead of 10-positions. Prefix the 10-position NPI with the 5-position identifier of "80840".
- NPIs will initially be issued with the first digit being either 1 or 2. These digits will not be used as the first digits for other card issuer identifiers. This will help to avoid collisions with other identifiers, such as the standard health plan identifier.
Step-by-Step Instructions
Here are the steps to calculate to the check digit for the National Provider Identifier.
- Step 1 - Starting at the right most digit, which should be the check digit. Double the value of every second digit.
- Step 2 - Take the sum of all the individual digits.
- Step 2a - If a doubled value is 2-digits (i.e. 8 was doubled to 16), you add the two digits together (i.e. the doubled value of 16 would be: 1 + 6)
- Step 3 - If the NPI is 10-position, then add the constant 24, to account for the "80840" prefix. If the NPI is 15-position, do nothing. Reminder: When an NPI is used as a card issuer identifier on a standard health identification card, it is preceded by the prefix 80840, in which 80 indicates health applications and 840 indicates the United States. The complete number would be 808401234567893 in this example.
- Step 4 - Take the units digit (i.e. if the number was 67, you would take 7).
- Step 5 - Subtract the units digit from 10. (Do this step only if the units digit isn't zero)
- Step 6 - The resulting number is the check digit.
Example - Calculate the check digit (10-position NPI - most common)
Get the NPI - notice the last number of the NPI, shown with a question mark, is the check digit.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- ?
Step 1: Double the value of alternate digits, starting with the rightmost digit (excluding the check digit).
- 2
- 2
- 6
- 4
- 10
- 6
- 14
- 8
- 18
Step 2: Take the sum of all the individual digits (i.e. 18 would be 1 + 8).
- 2
- +
- 2
- +
- 6
- +
- 4
- +
- 1
- +
- 0
- +
- 6
- +
- 1
- +
- 4
- +
- 8
- +
- 1
- +
- 8
- =
- 43
Step 3: Add 24 to the value - see explanation above for more details on where this value comes from.
- 43
- +
- 24
- =
- 67
Steps 4, 5 & 6: Take the units digit from the above sum and subtract from 10 (Only subtract from 10 if the units digit isn't zero). The result is the check digit.
- 10
- -
- 7
- =
- 3
Result: 10-position NPI
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 3
Example - Calculate the check digit (15-position NPI)
Get the NPI - notice the last number of the NPI, shown with a question mark, is the check digit.
- 8
- 0
- 8
- 4
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- ?
Step 1: Double the value of alternate digits, starting with the rightmost digit (excluding the check digit).
- 8
- 0
- 8
- 8
- 0
- 2
- 2
- 6
- 4
- 10
- 6
- 14
- 8
- 18
Step 2: Take the sum of all the individual digits (i.e. 18 would be 1 + 8).
- 8
- +
- 0
- +
- 8
- +
- 8
- +
- 0
- +
- 2
- +
- 2
- +
- 6
- +
- 4
- +
- 1
- +
- 0
- +
- 6
- +
- 1
- +
- 4
- +
- 8
- +
- 1
- +
- 8
- =
- 67
Step 3: Not neccessary.
Steps 4, 5 & 6: Take the units digit from the above sum and subtract from 10 (Only subtract from 10 if the units digit isn't zero). The result is the check digit.
- 10
- -
- 7
- =
- 3
Result: 15-position NPI
- 8
- 0
- 8
- 4
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 3
Now that you know how to check the validity of an NPI number, try our simple to use NPI Validation tool.
We hope you found this article helpful! Please reach out to us with questions/feedback.
Disclaimer:
While every effort is made to keep all information up to date and accurate, all content found on Eclaims.com is intended to be a general information resource and is provided "AS IS". The accuracy of the information is in no way guaranteed. Eclaims.com makes no warranty to the accuracy, completeness or reliability of any content available through the website. Eclaims.com assumes no liability whatsoever for any errors or omissions in any content contained on this website. You are responsible for verifying any information before relying on it.