← All datasets

Medicare Hospitals

3,044 hospitals with their Medicare inpatient activity for 2024, from the CMS Medicare Inpatient Hospitals by Provider file, one row per hospital. Aggregated from fee-for-service inpatient claims: the city, state, ZIP and rural-urban setting, the number of discharges and beneficiaries, the average submitted charge and average Medicare payment per discharge and the ratio between them (the gap between what hospitals bill and what Medicare actually pays, often sevenfold or more), the average length of stay, and the patient mix (average age, share also on Medicaid, average chronic-illness risk score). AdventHealth Orlando and New York-Presbyterian are the busiest by discharges; teaching and safety-net hospitals can see Medicare pay more than they bill because of disproportionate-share and graduate-medical-education add-on payments. Covers hospitals with Medicare inpatient claims, so the smallest and specialty facilities may be absent. Join the ZIP to ZIP Code Income, and through the ZIP County Crosswalk to the county datasets. A US government public-domain source. Ten acceptance tests, one enforcing the 25 percent fill rule on every column.
3,044 rows 1 file last pulled 2026-10-30
Source: CMS
Where would you start?
Pick a question, or ask your own and answer it; publish what you find as an insight. The same question can carry many insights from different angles.
  • Which states' hospitals average the highest Medicare payment ratios?
  • How do teaching hospitals differ from others on spending measures?
  • Which hospital types cluster at the payment extremes?
Medicare Hospitals 3,044 rows × 16 columns
YearCCNHospitalCityStateZIPSettingDischargesBeneficiariesAvg_Covered_ChargesAvg_Medicare_PaymentCharge_To_Payment_RatioAvg_Length_Of_StayAvg_AgeDual_Eligible_PctAvg_Risk_Score

Questions and answers

What is the Medicare Hospitals dataset?

3,044 hospitals with their Medicare inpatient activity for 2024, from the CMS Medicare Inpatient Hospitals by Provider file, one row per hospital. Aggregated from fee-for-service inpatient claims: the city, state, ZIP and rural-urban setting, the number of discharges and beneficiaries, the average submitted charge and average Medicare payment per discharge and the ratio between them (the gap between what hospitals bill and what Medicare actually pays, often sevenfold or more), the average length of stay, and the patient mix (average age, share also on Medicaid, average chronic-illness risk score). AdventHealth Orlando and New York-Presbyterian are the busiest by discharges; teaching and safety-net hospitals can see Medicare pay more than they bill because of disproportionate-share and graduate-medical-education add-on payments. Covers hospitals with Medicare inpatient claims, so the smallest and specialty facilities may be absent. Join the ZIP to ZIP Code Income, and through the ZIP County Crosswalk to the county datasets. A US government public-domain source. Ten acceptance tests, one enforcing the 25 percent fill rule on every column.

How big is the Medicare Hospitals dataset?

3,044 rows in one CSV file, with 16 columns in total: Year, CCN, Hospital, City, State, ZIP, Setting, Discharges, Beneficiaries, Avg_Covered_Charges, Avg_Medicare_Payment, Charge_To_Payment_Ratio, Avg_Length_Of_Stay, Avg_Age, Dual_Eligible_Pct, Avg_Risk_Score.

Where does the data come from?

It is built by programmatically scraping data.cms.gov, last pulled on 2026-10-30. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

How do the files join?

Join ZIP to ZIP Code Income, and through the ZIP County Crosswalk to US County Population, US County Income and the other county datasets.

Can the data contain errors?

Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.

Browse every free dataset on CodeSights