2026 Guide

NDC Swap Detection
Software

The same drug, billed and purchased under different NDC codes, shows up as a shortage that is not real. Multiply that across thousands of claims and a single drug with 20+ NDCs, and phantom shortages quietly drain revenue. Here is how automated detection catches what spreadsheets cannot.

What is an NDC swap?

An NDC swap happens when the same medication is recorded under different National Drug Code numbers across your billing claims and your purchase records. Almost always, it is benign: a manufacturer changed, or your wholesaler substituted an equivalent generic from a different labeler. The drug your patient received is identical. Only the NDC differs.

The problem is what that difference does to reconciliation. Match billing against purchasing on the raw 11-digit NDC, and the billed NDC has no purchase to pair with - so it reports as a shortage. Meanwhile the purchased NDC has no claim to pair with, so it reports as an overage. Both are phantom. Both are noise. And both hide the real discrepancies that actually cost you money.

Why spreadsheets cannot catch swaps

ApproachHow it matches NDCsResult on a swap
Manual spreadsheetExact 11-digit string matchPhantom shortage + phantom overage
Manual + a lookup tableNeeds a constantly updated map of 20+ NDCs per drugImpractical to maintain; falls behind
Automated detectionNormalizes + maps NDC familiesSwap resolved; only real discrepancies flagged

How automated NDC swap detection works

1

Normalize every NDC

NDCs appear as 10 or 11 digits in different segment formats (4-4-2, 5-3-2, 5-4-1). The first step is standardizing every code to a consistent 11-digit form so they are even comparable.

2

Group NDCs into drug families

Every NDC is mapped to its therapeutic product, so all manufacturer versions of the same drug, strength, and form are recognized as one family - regardless of labeler or package code.

3

Match billing against purchasing by family

Reconciliation happens at the drug-family level. A manufacturer-to-manufacturer swap pairs cleanly because both NDCs belong to the same family, so it no longer reports as a shortage.

4

Flag only true discrepancies

Once swaps are resolved, what remains are genuine shortages, overages, and billing errors - the discrepancies worth your team's time and recoverable in an audit.

RxDelta: NDC swap detection built in

RxDelta treats NDC swap detection as a core capability, not an add-on. Upload your billing export and purchase data from any pharmacy system, and RxDelta normalizes every NDC, maps it to its drug family, and reconciles at the family level - automatically resolving swaps while surfacing the discrepancies that matter.

The result is a clean reconciliation report in under 3 minutes, with insurance-level breakdowns by PBM and BIN, and an exportable trail you can hand to your accountant or audit-defense counsel.

Go deeper

Frequently Asked Questions

What is an NDC swap?

An NDC swap occurs when the same medication is recorded under different National Drug Code (NDC) numbers across a pharmacy's billing claims and purchase records. This usually happens because a manufacturer changed or a wholesaler substituted an equivalent generic from a different labeler. The drug is the same, but the NDCs differ - and to a naive line-by-line check, that looks like a shortage or overbilling.

What is NDC swap detection software?

NDC swap detection software automatically identifies when billing and purchasing records use different NDC codes for the same drug. Instead of matching on the raw 11-digit NDC, it normalizes codes and maps them into drug families across all manufacturers, so a manufacturer swap is recognized as an equivalent product rather than flagged as a phantom shortage. RxDelta provides this as a core capability.

Why can't spreadsheets detect NDC swaps?

A single generic drug can have 20 or more NDC codes from different manufacturers. Spreadsheet reconciliation matches on exact NDC strings, so when the billed NDC and the purchased NDC differ, the spreadsheet reports a shortage that does not actually exist - and a surplus elsewhere. Catching swaps manually would require maintaining a constantly updated map of every drug family, which is impractical at scale.

How do undetected NDC swaps cause pharmacies to lose revenue?

Undetected swaps create phantom shortages and overages that obscure your true reconciliation picture. They hide real discrepancies in the noise, make PBM audits harder to defend, and lead pharmacies to chase mismatches that are not real while missing the ones that are. The cumulative effect is lost time and lost recoverable revenue.

What is NDC-family mapping?

NDC-family mapping groups every NDC code that represents the same therapeutic product - across all manufacturers, package sizes, and labelers - into one family. Reconciling at the family level means a manufacturer-to-manufacturer swap is automatically recognized as the same drug, so only genuine discrepancies remain flagged.

How is an NDC swap different from a true shortage?

An NDC swap is an artifact: the drug was purchased and dispensed, just under a different NDC. A true shortage is real: you billed for a quantity you did not purchase. Good detection software distinguishes the two automatically, resolving swaps while surfacing genuine shortages, so your team only investigates discrepancies that actually matter.

See the NDC Swaps Your Spreadsheet Is Missing

Upload your billing and purchase exports and RxDelta resolves NDC swaps automatically - so your reconciliation shows only the discrepancies that are real. Plans from $200/month.

View All Plans