100% Offline Reference NPI Luhn Calculator

NPI 80840 Luhn Mod-10 Check Digit Calculator & Algorithm

Every 10-digit US National Provider Identifier in NM1*85, NM1*82, NM1*71, or NM1*1P embeds an ISO/IEC 7812 Luhn check digit computed with the hidden healthcare prefix 80840 (constant +24).

Interactive Client-Side Synthetic NPI Validator & Generator

✓ VALID 10-Digit NPI (1234567893) — passes 80840 Luhn Mod-10 check (expected & actual check digit = 3).

Why Standard Credit-Card Luhn Fails Without Constant +24

CMS defines the 10-digit NPI as the trailing portion of a 15-digit ISO/IEC 7812 card issuer identifier prefixed by 80840 (80 = Health Applications, 840 = ISO 3166 United States):

// Full 14-digit payload before the 15th check digit:
// Prefix:   8    0    8    4    0   |  9-Digit NPI Base: d1 d2 d3 d4 d5 d6 d7 d8 d9
// Weight:  (1)  (2)  (1)  (2)  (1)  |                    (2)(1)(2)(1)(2)(1)(2)(1)(2)
// Product:  8 +  0 +  8 +  8 +  0  ==  24 (Fixed Healthcare Prefix Constant!)
//
// Check Digit = (10 - ((24 + LuhnSum(d1..d9)) % 10)) % 10

Adding the fixed prefix constant 24 to the standard right-to-left alternating Luhn sum of the first 9 NPI digits produces the exact CMS check digit in O(1) time.

Frequently Asked Engineering Questions

Does EdiPrism's HIPAA Scrubber preserve valid 80840 NPI check digits?

Yes. Whenever EdiPrism anonymizes an NM1 or REF element qualified as an NPI, it derives 9 deterministic digits via keyed HmacSHA256 and computes the exact 10th Luhn digit using the +24 prefix rule.

Inspect, Diff, Validate & Scrub This Payload Offline in Your JetBrains IDE

Never paste regulated healthcare PHI (837/835/271) or supply-chain payloads (850/ORDERS) into browser parsers. EdiPrism X12 EDIFACT runs 100% air-gapped inside IntelliJ IDEA, PyCharm, DataGrip, Rider, GoLand, and WebStorm with a free core tier and a 14-day [Pro] trial.

Install Free from JetBrains Marketplace → Read Air-Gap Security Architecture