Medicare drug spending (Part B and Part D)
What Medicare spends on each drug: Part D prescriptions and Part B physician-administered drugs, five years annual plus year-to-date quarters.
| Latest snapshot | 2026-11-19 |
| Source | Centers for Medicare & Medicaid Services (CMS) |
| Licence | Public domain (U.S. Government work, 17 U.S.C. § 105) |
| Join keys | brand_name, generic_name, hcpcs_code |
| Manifest | manifest.json (rows, columns, sizes, SHA-256) |
Charts
Medicare drug spending by year
Part D (prescription drugs) and Part B (drugs given in doctors’ offices and hospital outpatient departments), in US dollars.
Gross spending: what Medicare and its Part D plans paid before manufacturer rebates and discounts, so net spending is lower, especially for brand drugs. 2020-2024, from CMS’s annual Spending by Drug files.
Top Part D drugs by spending, 2024
The 15 prescription drugs Medicare Part D spent most on.
Gross spending: what Medicare and its Part D plans paid before manufacturer rebates and discounts, so net spending is lower, especially for brand drugs. All manufacturers of a drug combined (CMS’s Overall row).
Top Part D drugs, first half of 2026
Year-to-date spending from CMS’s quarterly file (2026 (Q1-Q2)): months fresher than the annual figures.
Gross spending: what Medicare and its Part D plans paid before manufacturer rebates and discounts, so net spending is lower, especially for brand drugs. Year-to-date totals are revised as late claims arrive.
Top Part B drugs by spending, 2024
The 15 billing codes (drugs administered by a clinician) Medicare Part B spent most on.
What Medicare paid (Average Sales Price-based payment plus coinsurance), by HCPCS billing code. A ’*’ marks a code that covers more than one product.
Files
latest links always point to the newest snapshot; dated links never change. Untagged files are the current source data, cleaned. Files tagged history are built by pharmabro.si from its daily archive (FDA serves only the current files); enriched files are derived by pharmabro.si (inferred or added value), not part of the source data.
| File | Rows | Size | Download |
|---|---|---|---|
cms_partd_annual.parquet |
61,642 | 2.4 MB | latest · 2026-11-19 |
cms_partb_annual.parquet |
3,322 | 190.3 KB | latest · 2026-11-19 |
cms_partd_quarterly.parquet |
27,515 | 778.4 KB | latest · 2026-11-19 |
cms_partb_quarterly.parquet |
1,692 | 85.4 KB | latest · 2026-11-19 |
Quick start
SELECT * FROM 'https://data.pharmabro.si/cms-drug-spending/latest/cms_partd_annual.parquet' LIMIT 10;import polars as pl # or: import pandas as pd; pd.read_parquet(url)
df = pl.read_parquet("https://data.pharmabro.si/cms-drug-spending/latest/cms_partd_annual.parquet")library(arrow)
df <- read_parquet("https://data.pharmabro.si/cms-drug-spending/latest/cms_partd_annual.parquet")Columns
cms_partd_annual.parquet
61,642 rows
| Column | Type | Description |
|---|---|---|
brand_name |
string |
|
generic_name |
string |
|
n_manufacturers |
int32 |
Manufacturers of this drug in the latest year |
manufacturer |
string |
Overall or a manufacturer name |
year |
int32 |
Calendar year |
total_spending |
double |
US$, gross |
dosage_units |
double |
|
claims |
int64 |
|
beneficiaries |
int64 |
|
avg_spending_per_unit |
double |
Weighted average spending per dosage unit |
avg_spending_per_claim |
double |
|
avg_spending_per_beneficiary |
double |
|
outlier_flag |
bool |
CMS flag for an unusual average spending per unit |
chg_avg_spending_per_unit_last_year |
double |
Change in average spending per unit, latest year vs the one before (fraction, -0.01 = -1%); drug-level, repeated on every row |
cagr_avg_spending_per_unit |
double |
Compound annual growth of average spending per unit over the five years (fraction) |
is_overall |
bool |
manufacturer == "Overall"; filter on it to avoid double counting |
source_modified |
string |
Release date of the source file |
cms_partb_annual.parquet
3,322 rows
| Column | Type | Description |
|---|---|---|
hcpcs_code |
string |
|
hcpcs_description |
string |
|
brand_name |
string |
|
generic_name |
string |
|
year |
int32 |
|
total_spending |
double |
|
dosage_units |
double |
|
claims |
int64 |
|
beneficiaries |
int64 |
|
avg_spending_per_unit |
double |
|
avg_spending_per_claim |
double |
|
avg_spending_per_beneficiary |
double |
|
outlier_flag |
bool |
|
asp_price_latest_year |
double |
Average Sales Price payment limit per billing unit in the latest year (US$) |
chg_avg_spending_per_unit_last_year |
double |
|
cagr_avg_spending_per_unit |
double |
|
source_modified |
string |
cms_partd_quarterly.parquet
27,515 rows
| Column | Type | Description |
|---|---|---|
brand_name |
string |
|
generic_name |
string |
|
n_manufacturers |
int32 |
|
manufacturer |
string |
|
is_overall |
bool |
|
period |
string |
|
year |
int32 |
|
quarter_from |
int8 |
|
quarter_to |
int8 |
|
total_spending |
double |
|
claims |
int64 |
|
beneficiaries |
int64 |
|
avg_spending_per_claim |
double |
|
avg_spending_per_beneficiary |
double |
|
drug_uses |
string |
|
source_modified |
string |
cms_partb_quarterly.parquet
1,692 rows
| Column | Type | Description |
|---|---|---|
brand_name |
string |
|
generic_name |
string |
|
hcpcs_code |
string |
|
hcpcs_description |
string |
|
period |
string |
As CMS writes it: 2025 (Q1-Q4), 2026 (Q1-Q2) |
year |
int32 |
|
quarter_from |
int8 |
|
quarter_to |
int8 |
|
total_spending |
double |
|
claims |
int64 |
|
beneficiaries |
int64 |
|
avg_spending_per_claim |
double |
|
avg_spending_per_beneficiary |
double |
|
source_modified |
string |