NPI Validator

Check whether a healthcare NPI number is valid.

How it is calculated

A US National Provider Identifier has 10 digits: 9 identifying digits and a final check digit. The tool strips non-digits, requires exactly 10 digits, and applies the Luhn algorithm to the string 80840 followed by the first 9 digits. The prefix 80840 is part of the standard NPI check, so the check digit it produces is the same one that a payer's system expects.

Starting from the rightmost digit of that 14-digit string, every second digit is doubled (subtracting 9 if the result exceeds 9) and all are added. The expected check digit is (10 − sum mod 10) mod 10. If it equals the tenth digit you entered, the number is valid. This confirms only the structure; it does not prove that the number is assigned to a real provider.

Worked example

Check 1234567893. The first 9 digits are 123456789, so the string is 80840123456789. Starting from the right, double every second digit and reduce values above 9: this gives 9, 8, 5, 6, 1, 4, 6, 2, 2, 0, 8, 8, 0, 8. Their sum is 67. The expected check digit is (10 − 7) mod 10 = 3. It matches the last digit you entered, so the status is Valid.

Try this example →

Common mistakes

  • Entering a number that is not 10 digits long, such as an NPI with a typo or an extra digit; the tool then returns no result.
  • Treating a valid result as proof that the provider exists or is active. Registry lookup is the only way to confirm that.
  • Confusing the NPI with a DEA number, tax ID or licence number, which follow different rules.
  • Running a plain Luhn check without the 80840 prefix, which gives the wrong check digit.

About this calculator

This calculator validates a US National Provider Identifier (NPI), a 10-digit number assigned by CMS to every individual healthcare provider and organization, by checking its final digit against a Luhn algorithm computed over the number prefixed with the constant 80840 (the NPI's fixed IIN prefix).

Medical billing staff, credentialing teams, and healthcare software developers use it to catch a mistyped NPI before it causes a claim rejection or an incorrect provider match.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    This check is useful for catching typing slips when you copy provider numbers from paper forms. The Luhn check catches any single wrong digit and most swapped neighbours. If the status shows invalid, compare the check digit the tool expects with the last digit you typed. If they differ, the last digit may be the typo. NPIs are a US system. Which kind of forms are you entering these from?

Popular calculators

All Calculators