What is NDC?
The National Drug Code (NDC) is an 11-digit, three-segment identifier assigned by the FDA that uniquely identifies drug products at the package level. It is the primary drug identifier found in pharmacy claims data and is required on all drug labeling in the United States.
Assigned by
FDA
Format
11-digit (5-4-2)
Level
Package
Used in
Claims, labeling
NDC Structure
An NDC consists of three segments separated by hyphens. The canonical 11-digit format uses a 5-4-2 segmentation.
Example: Lipitor 10 mg, 90-count tablet bottle (Pfizer / Warner Chilcott)
| Segment | Digits | Example |
|---|---|---|
| Labeler | 5 | 00071 |
| Product | 4 | 0213 |
| Package | 2 | 40 |
Format Variants
NDC appears in multiple formats across different data sources, which is a significant source of join failures in drug analytics. The same physical drug package may have a different NDC string in an FDA file versus a Medicaid claims extract.
| Format | Example |
|---|---|
| 4-4-2 (10-digit) | 0071-0213-40 |
| 5-3-2 (10-digit) | 00071-213-40 |
| 5-4-2 (11-digit) | 00071-0213-40 |
| Flat 11-digit | 00071021340 |
The flat 11-digit format (no hyphens) is the de facto standard for joining across CMS datasets. See the NDC Normalization Guide for conversion rules.
What NDC Does Not Tell You
NDC is a product identifier, not a clinical concept. It identifies a specific physical package but carries no information about the drug's clinical classification, therapeutic use, or relationship to other drugs. To answer analytical questions — “what is the generic equivalent?” or “what conditions is this drug used for?” — you need to map NDC to RxNorm or another clinical standard.
No ingredient hierarchy
An NDC does not tell you whether a drug is a generic or brand, or what its active ingredient is. That requires RxNorm.
No therapeutic class
NDC carries no ATC or therapeutic classification. You cannot group drugs by mechanism or indication from NDC alone.
No pricing
NDC does not carry any price information. NADAC, AWP, and ASP pricing data must be joined separately.
Not stable over time
NDCs can be reassigned after 5 years of inactivity. Longitudinal analysis requires awareness of NDC reuse.
NDC vs. RxNorm
| Feature | NDC | RxNorm |
|---|---|---|
| Level of granularity | Package — specific manufacturer, strength, and bottle size | Concept — ingredient, drug form, or clinical drug |
| Assigned by | Manufacturer (labeler segment) + FDA | NLM |
| Update cadence | Continuous (new products daily) | Weekly releases |
| Identifier stability | Can be reused after 5+ years | Permanent — never reused |
| Generic/brand link | No explicit link | Explicit SCD → SBD relationship |
| Ingredient grouping | Not possible directly | Via TTY hierarchy (IN / SCDF) |
| Use in claims data | Primary identifier on prescriptions | Not present; must be mapped |
Sample Data — ndc_rxnorm Table
Below is a representative sample from the TwinFyRx ndc_rxnorm crosswalk, showing how each NDC11 maps to a drug_id (RXCUI) with NDC9 for fallback joining.
| ndc11 | drug_id | drug_name |
|---|---|---|
| 00071021340 | 617314 | Atorvastatin 10 MG Oral Tablet |
| 59762022201 | 617314 | Atorvastatin 10 MG Oral Tablet |
| 00071015614 | 617321 | Lipitor 10 MG Oral Tablet |
| 00378395105 | 197361 | Amlodipine 5 MG Oral Tablet |
| 68180031302 | 314077 | Lisinopril 10 MG Oral Tablet |
| 00228257211 | 860975 | Metformin 500 MG Oral Tablet |
| 00591040701 | 311700 | Omeprazole 20 MG DR Oral Capsule |
| 00003089321 | 1049640 | Eliquis 5 MG Oral Tablet |
| 00378181110 | 310429 | Levothyroxine 50 MCG Oral Tablet |
| 27241005003 | 856845 | Gabapentin 300 MG Oral Capsule |
10 rows from the TwinFyRx ndc_rxnorm crosswalk. Full dataset contains 100K+ NDC-to-RXCUI mappings. Download a free sample.
How TwinFyRx handles NDC
TwinFyRx maintains an ndc_rxnorm crosswalk table that maps every known NDC11 to its corresponding drug_id (SCD/SBD RXCUI). NDC values are stored in both ndc11 (flat 11-digit) and ndc9 (labeler + product, no package) forms to support different join patterns across claims datasets.