Skip to content
NPISignal

How Does NPI Number Validation Work?

The exact Luhn check-digit algorithm behind every valid NPI, worked digit by digit against a real enumerated number, plus every way a number can fail format validation.

Reviewed

“Valid” has a narrow, specific meaning here: a 10-digit number is a valid NPI format when its structure and its check digit are internally consistent. That is arithmetic you can do without ever contacting NPPES, and it is exactly what NPISignal's NPI validator checks before it ever queries a database.

What validation does and doesn't prove

Passing this check proves the number is well-formed. It does not prove a provider record exists for it, and it says nothing about licensure. See How to Find an NPI Number for looking up whether a number is actually enumerated, and Does an NPI Mean a Provider Is Licensed? for why format validity and licensure are unrelated facts.

Two separate checks

  • Format: exactly 10 digits, numeric only, beginning with 1, 2, 3, or 4. CMS currently issues only 1 (individuals) and 2 (organizations); 3 and 4 are reserved for future use but are already structurally valid, so NPISignal's validator accepts them. 0 and 5 through 9 are not valid leading digits under any circumstance.
  • Check digit: the 10th digit must equal a value computed from the first nine using the Luhn algorithm, with a fixed prefix. This is the same check-digit scheme used on many other ISO/IEC 7812 identifiers, such as credit card numbers — it exists to catch a single mistyped or transposed digit, not to encode anything about the provider.

The fixed prefix: 80840

The Luhn calculation is not run on the NPI's own nine digits alone. It is run on those nine digits prefixed with the constant 80840 — the ISO/IEC 7812 issuer identifier CMS was assigned for the NPI scheme. Within that identifier, the leading 80 denotes health applications and 840 is the ISO 3166 numeric code for the United States. Every NPI check digit is computed against this same 14-character payload — 5 fixed digits plus the 9 identifying digits — never against the 9 digits alone.

The algorithm, step by step

  1. Take the NPI's first nine digits and prefix them with the constant 80840, making a 14-digit payload.
  2. Starting from the rightmost digit of that payload and counting positions 0, 1, 2, … leftward, double every digit at an even position (0, 2, 4, …).
  3. If doubling a digit produces a number greater than 9, subtract 9 from it (equivalent to summing its two digits).
  4. Add up every digit in the payload after this step — the doubled-and-adjusted ones and the untouched ones alike.
  5. The check digit is whatever amount, from 0 to 9, brings that sum up to the next exact multiple of 10.
  6. The NPI is valid only if its own tenth digit equals that computed check digit.

Worked example against a real, currently enumerated NPI

The number below is a real NPI drawn directly from the August 2026 NPPES data file NPISignal imports — used here purely for its digits, to show the arithmetic works on an actual issued number rather than a textbook stand-in.

Payload digitPosition counting from the rightDoubled?Value added to the sum
813No8
012Yes (0×2=0)0
811No8
410Yes (4×2=8)8
09No0
18Yes (1×2=2)2
67No6
76Yes (7×2=14 → 14−9)5
95No9
54Yes (5×2=10 → 10−9)1
73No7
62Yes (6×2=12 → 12−9)3
71No7
20Yes (2×2=4)4
Payload = 80840 + 167957672 (the first nine digits of NPI 1679576722), read left to right

Sum of the values in the right-hand column: 8+0+8+8+0+2+6+5+9+1+7+3+7+4 = 68. The check digit is the amount needed to round that sum up to the next multiple of ten: 70 − 68 = 2. The tenth digit of 1679576722 is 2 — the number checks out.

Change nothing but that last digit — say, to 1679576721 — and the first nine digits are unchanged, so the computed check digit is still 2. The number now ends in 1, which does not match, so NPISignal's validator rejects it immediately, before any lookup. That is exactly what a check digit is for: catching a single mistyped digit without needing to search anything.

Every way a format check can fail

FailureWhat it means
EmptyNo digits were entered at all.
Non-numericThe input contains a letter or symbol other than a space or hyphen (which are stripped before checking).
Wrong lengthThe cleaned input is not exactly 10 digits.
Leading digitThe first digit is not 1, 2, 3, or 4. CMS currently issues only 1 and 2 — 3 and 4 are reserved for future use but already pass this check as structurally valid — while 0 and 5 through 9 can never be issued.
Check digitThe number is 10 digits and starts correctly, but the Luhn check digit does not match — almost always a typo.

A format check runs instantly and needs no data at all, so it is the first gate in front of any real lookup: a query that cannot possibly be a valid NPI is told so immediately, rather than run against millions of records only to return nothing. It is also, on its own, a complete and independent way to catch a transcription error in a number someone read off a form or typed from memory.

Requirements for National Provider Identifier (NPI) and NPI Check DigitCMSCMS's own description of the Luhn/80840 check-digit calculation.

Sources

  1. Requirements for National Provider Identifier (NPI) and NPI Check Digit CMS. Accessed August 20, 2026.
  2. 45 CFR Part 162, Subpart D — Standard Unique Health Identifier for Health Care Providers (10-position identifier with a check digit, no embedded intelligence) Electronic Code of Federal Regulations (eCFR). Accessed August 20, 2026.
  3. NPPES Data Dissemination — full August 2026 data file (source of the worked example's digits) CMS. Accessed August 20, 2026.