Request a demo

Public dataset · Health and life sciences

CMS Medicare Provider and Payment Data in BigQuery

Medicare provider utilization and payment data for 2011 to 2015: inpatient and outpatient charges by hospital, Part D prescribing by doctor and drug, physician services, nursing facilities, home health, hospice and hospital information. 23 tables, 12.9 GiB, most of it Part D and physician data.

bigquery-public-data.cms_medicare · Centers for Medicare and Medicaid Services (CMS) · US · Sizes measured November 23, 2026

23tables
8.2 GiBin the tables below
43,570,668rows
$0.05to scan every column once, on-demand

CMS publishes what Medicare pays providers. This dataset has one table per file type and year: inpatient_charges_2011 to _2015 (per hospital and MS-DRG: discharges, average covered charges, average total and Medicare payments), outpatient_charges_2011 to _2015, physicians_and_other_supplier_2012 to _2015 (per provider NPI and HCPCS service code), part_d_prescriber_2014 (per prescriber and drug: claims, day supply, drug cost), plus nursing_facilities, home_health_agencies, referring_durable_medical_equip, hospice_providers_2014 and hospital_general_info.

The column descriptions follow CMS's public use file documentation. drg_definition, for example, is the MS-DRG code and description, and average_total_payments includes co-payments and deductibles while average_medicare_payments is Medicare's share only. The dataset itself has no description, and the newest data year is 2015.

Tables and sizes

The dataset has 23 tables; the main ones are listed.

TableRowsSizeFull scanLayout
part_d_prescriber_201424,120,6183.5 GiB$0.02None
physicians_and_other_supplier_20129,153,2722.3 GiB$0.01None
physicians_and_other_supplier_20159,497,8912.2 GiB$0.01None
referring_durable_medical_equip_2014366,242110 MiBunder $0.01None
inpatient_charges_2015201,87634.3 MiBunder $0.01None
inpatient_charges_2011163,06527.3 MiBunder $0.01None
outpatient_charges_201532,5325.1 MiBunder $0.01None
nursing_facilities_201415,0264.7 MiBunder $0.01None
home_health_agencies_201410,8824.0 MiBunder $0.01None
hospital_general_info5,3361.4 MiBunder $0.01None
hospice_providers_20143,9281.4 MiBunder $0.01None

Full scan = every column of the table at the on-demand list price of $6.25 per TiB, before your free TiB each month. Selecting fewer columns costs proportionally less. See BigQuery pricing.

Example queries

Most expensive inpatient diagnosis groups in 2015

Scans 12.4 MiB · under $0.01 on-demand

Average total payment per MS-DRG across hospitals. The 2015 inpatient table is 34 MiB.

SELECT
  drg_definition,
  SUM(total_discharges) AS discharges,
  ROUND(AVG(average_total_payments)) AS avg_total_payment_usd
FROM `bigquery-public-data.cms_medicare.inpatient_charges_2015`
GROUP BY drg_definition
ORDER BY avg_total_payment_usd DESC
LIMIT 10;

Prescribers of one drug with SELECT * (expensive)

Scans 3.5 GiB · $0.02 on-demand

All 21 columns of part_d_prescriber_2014: 3.52 GiB, though only one drug is returned.

SELECT *
FROM `bigquery-public-data.cms_medicare.part_d_prescriber_2014`
WHERE generic_name = 'ATORVASTATIN CALCIUM';

Drugs with the highest total Part D cost in 2014 (cheap)

Scans 785 MiB · under $0.01 on-demand

Three columns of the same table: 785 MiB.

SELECT
  generic_name,
  ROUND(SUM(total_drug_cost)) AS drug_cost_usd,
  SUM(total_claim_count) AS claims
FROM `bigquery-public-data.cms_medicare.part_d_prescriber_2014`
GROUP BY generic_name
ORDER BY drug_cost_usd DESC
LIMIT 10;

One diagnosis group across all years

Scans 46.9 MiB · under $0.01 on-demand

A wildcard over inpatient_charges_* reads the five yearly tables for 46.9 MiB. DRG 470 is major joint replacement of the lower extremity.

SELECT
  _TABLE_SUFFIX AS year,
  ROUND(AVG(average_total_payments)) AS avg_payment_usd
FROM `bigquery-public-data.cms_medicare.inpatient_charges_*`
WHERE drg_definition LIKE '470 %'
GROUP BY year
ORDER BY year;

Querying it cheaply

  • Five tables make up most of the 12.9 GiB: part_d_prescriber_2014 (3.52 GiB) and physicians_and_other_supplier_2012 to _2015 (2.2 to 2.3 GiB each). Inpatient and outpatient tables are under 35 MiB.
  • No table is partitioned or clustered. Filters on generic_name or provider_state do not reduce bytes; selecting fewer columns does.
  • Provider name and address columns (nppes_provider_last_org_name, nppes_provider_street1) are long strings repeated on every row. Leave them out of aggregations and join them back on npi at the end if you need them.

FAQ

How much does it cost to query CMS Medicare data in BigQuery?

Hospital charge queries scan under 50 MiB and usually bill the 10 MB minimum or close to it. Part D and physician tables scan up to 2.3 to 3.5 GiB with SELECT *. The whole dataset is 12.9 GiB, about 1.3% of the monthly free tier.

Is the cms_medicare dataset free?

Google pays for storing public datasets, so you never pay storage for them. You pay only for the bytes your queries scan, billed to your own project at the on-demand rate, and the first 1 TiB scanned each month is free. See BigQuery pricing.

Does the dataset have Medicare data after 2015?

No. The newest tables are for 2015 (inpatient, outpatient and physician data) and 2014 (Part D, hospice, nursing facilities). CMS publishes later years on its own data portal.

All public datasets · BigQuery cost queries · Pricing calculator

Cut BigQuery spend without guessing

Masthead attributes compute and storage cost to every project, user, pipeline and table, finds unused and dead-end tables, and shows where editions or on-demand pricing is cheaper. Mnemonic cut its BigQuery compute cost by 20% within 24 hours of onboarding.