Medicare star ratings (health policy)
Medicare rates health plans and hospitals with stars, and for Medicare Advantage the stars steer billions of dollars in bonus payments each year. The rulebooks state both an exact criterion for where the star boundaries go and an algorithm for finding them, and the two do not agree. The algorithm is an approximate clustering method, while a way to compute the exact answer has existed since 1958, and the difference between approximate and exact moves roughly a billion dollars in gross bonus payments.
Stars and money
The Centers for Medicare & Medicaid Services (CMS) publishes several star ratings; six are examined here. Each Medicare Advantage contractthe unit in which Medicare’s private health plans are rated and paid; contracts are identified here only by CMS contract number, and no plan or hospital is named receives an overall rating each year, and a contract rated 4.0 stars or above earns a bonus under the Quality Bonus Program: the benchmarkthe county-level spending target that Medicare sets a plan’s payment against it is paid against rises by five percent per enrollee the following year, while a contract at 3.5 gets no increase. These bonuses are estimated to total $13.4 billion for 2026. The Overall Hospital Quality Star Rating gives each hospital a single star rating on Medicare’s Care Compare site. Four patient-experience surveys of the CAHPS family (Consumer Assessment of Healthcare Providers and Systems) assign further stars to hospitals, home health agencies, hospices and dialysis facilities. Only the Medicare Advantage rating affects payments directly; the other five inform patients’ choices.
The Medicare Advantage ratings are also the subject of litigation, in which the paper takes no side. A 2024 ruling in a suit brought by SCAN Health Plan led CMS to recalculate that year’s ratings nationwide. Alignment Healthcare lost a broader challenge to the rating methodology in June 2025 and on appeal in July 2026, and SCAN and Alignment filed new suits in July 2026 (Nos. 1:26-cv-02391 and 1:26-cv-02441, D.D.C.). The closest earlier work on the step that sets the star boundaries is Bo Bayles’s 2017 finding that CMS’s hospital code stopped before its iteration had converged. Neither that work nor anything the author found in the literature, court dockets or public code tested the published boundaries against the stated criterion.
The criterion and the algorithms
All six programs place the scores on a line and group them into five bins, the star levels, so that the scores lie as close as possible to their bin centers. The regulations call the quantity to be minimized the within-cluster sum of squares,
$$\mathrm{SSQ} \;=\; \sum_{b=1}^{k} \sum_{i \in B_b} \bigl(x_i - \bar{x}_b\bigr)^2 ,$$where $x_1\le\dots\le x_n$ are the sorted scores, $B_1,\dots,B_k$ the bins ($k=5$) and $\bar{x}_b$ the mean score in bin $b$; each term is one score’s squared distance from its own bin’s mean.
For Medicare Advantage both the objective and the method are written into the regulations, in two different places. The definition of clustering, 42 CFR 422.162(a), states the objective:
“The Star Ratings levels are assigned to the clusters that minimize the within-cluster sum of squares.”
The calculation rule, 42 CFR 422.166(a)(2)(i), prescribes how the clusters are to be found:
“The method maximizes differences across the star categories and minimizes the differences within star categories using mean resampling with the hierarchal clustering of the current year’s data.”
CMS’s annual Technical Notes repeat the first sentence verbatim and carry out the second with Ward’s hierarchical clustering. Read together, the two provisions take it for granted that the prescribed method delivers the stated minimum: the first names the grouping with the smallest sum of squares, the second names an algorithm, and nothing in either anticipates that they might disagree. In general they do. Ward’s method is a heuristic for the sum-of-squares objective, not a solver for it, and whenever it stops short of the minimum the grouping the calculation rule produces is not the grouping the definition describes. The two sentences are then inconsistent on their face, and which of them controls is a question of regulatory interpretation that this page does not take up. The hospital methodology prescribes k-means clustering, whose objective is the same sum, and the four survey programs prescribe Ward’s method with the same stated aim, so the same gap between objective and algorithm runs through all six programs; only for Medicare Advantage is it a gap between two sentences of the Code of Federal Regulations.
Neither Ward’s method nor k-means is guaranteed to reach the minimum. Ward’s method starts with every score in its own cluster and repeatedly merges the two clusters whose merger raises the sum of squares least. Merging clusters $a$ and $b$, holding $n_a$ and $n_b$ scores with means $\bar{x}_a$ and $\bar{x}_b$, raises it by
$$\Delta(a,b) \;=\; \frac{n_a\, n_b}{n_a+n_b}\,\bigl(\bar{x}_a-\bar{x}_b\bigr)^2 ,$$and merging stops at five clusters. A merge is never undone, even when the best final grouping would separate the scores it joined. K-means, used for hospitals, starts instead from initial bin centers fixed by the code and moves a bin boundary whenever a single move lowers the sum of squares. It stops at a local optimuma grouping that no single move of a boundary improves; a different grouping may still have a lower sum of squares that depends on where it started. Star-rating scores do not fall into natural clusters; they spread along a continuum, so the criterion has many local minima, groupings that no single small change improves, and each algorithm lands on one of them.
The assumption behind the rule is a natural one to make. For data of arbitrary dimension, minimizing the sum of squares is NP-hard, meaning that no known fast algorithm is guaranteed to find the minimum, and heuristics like Ward’s method and k-means are what statistical software offers under the heading of sum-of-squares clustering. Star-rating scores, however, are single numbers, and on a line the problem is not hard at all: an optimal grouping consists of consecutive runs of sorted scores, and the only question is where to put the $k-1$ cut points among the $n-1$ gaps. The exact answer has been computable since 1958, decades before the rule was written, and is standard in statistics and cartography (it underlies the Jenks natural breaks used to color maps); it simply does not appear to have reached the rule’s authors. In that year Walter D. Fisher showed how to search those choices without repeating work, by dynamic programming. Writing $D_m(i)$ for the smallest sum of squares achievable when the first $i$ sorted scores fill $m$ bins,
$$D_m(i) \;=\; \min_{m\le j\le i}\bigl\{\, D_{m-1}(j-1) + \mathrm{SSQ}(x_j,\dots,x_i) \,\bigr\} ,$$where $\mathrm{SSQ}(x_j,\dots,x_i)$ is the sum of squares of a single bin holding scores $j$ through $i$. In words, the best split of $i$ scores into $m$ bins is the best split of a shorter initial run into $m-1$ bins plus one final bin, minimized over where that bin begins. The final value, $D_k(n)$, is the exact minimum, and a variant lists every grouping attaining it, which shows whether the optimum is unique. This and every comparison below is run in exact rational arithmeticevery decimal CMS prints is carried as an exact ratio of whole numbers, so no comparison or tie depends on rounding.

The two computations on 21 made-up scores (a toy example drawn for this page; bins are numbered 1 to 5 from low scores to high). Ward’s method merges the pair of clusters whose union raises the sum of squares least, never undoing a merge, until five remain (the slate ruler above the dots, solid edges, sum of squares 438.0); Fisher’s dynamic program finds the grouping with the smallest sum of squares of all (the violet ruler below, dashed edges, 351.7). Two of the four optimal edges lie to the left of Ward’s, and the four scores between a solid edge and its dashed partner (orange) sit one bin higher under the optimum; the figures below draw CMS’s published bins and the exact optimum in the same way.
The hospital ratings
The hospital program is the most open of the six. CMS publishes the code (in the statistical languages SAS for rating years 2021–2025 and R for 2026), the input files and the stars, and no step is randomized. Run unmodified, the 2026 R package matches the published Care Compare star for all 3,182 hospitals that have a star in both its output and the published file. The SAS packages, with their calls to one built-in SAS k-means procedure replaced by open code that follows the algorithm described in the SAS manual, reproduce every published star of 2021–2025; code and inputs come from public mirrors of CMS’s releases. Hospitals are binned within peer groupspeer group 3, 4 or 5: hospitals reporting enough measures to be scored in three, four or all five of the method’s measure groups; in 2026 the groups held 177, 749 and 2,277 hospitals, and when the exact optimum is computed on the same scores, group by group, it assigns a different star in 2026 to 205 of the 3,182 displayed hospitals, 6.4 percent or about one hospital in fifteen, every one of them higher. All twelve published cut points that year lie above their optimal counterparts, so the hospitals that differ are those caught between a published cut point and its optimal partner (shown below for one peer group).

One of the three hospital peer groups in 2026 (177 hospitals), each hospital a dot at its summary score with the vertical spread as jitter only; the slate ruler above shows the five star bins CMS published (solid edges, sum of squares 8.0613) and the violet ruler below the bins at the exact optimum of the stated criterion (dashed edges, 7.6847), with thick ticks at each bin’s mean score. Every published edge lies to the right of its optimal partner, so the 55 hospitals in the shaded strips between paired edges (orange) receive one star fewer than the optimum assigns. Across all three peer groups 213 of 3,203 rated hospitals differ at the clustering step, 208 after a safety cap that holds some hospitals to four stars, and 205 among the 3,182 with a displayed star (redrawn for this page from the data of exhibit 3 of the paper).
Unlike the 2017 iteration Bayles examined, which stopped early, the 2026 k-means iteration does converge, after two steps in each peer group. The published grouping is therefore a genuine local optimum, fixed by the code’s starting centers, and its sum of squares still exceeds the true minimum. The criterion is also nearly flat near the optimum: most of the 213 hospitals that differ at the clustering step in 2026 regain their published star under some grouping nearer the optimum than CMS’s. Over the six rating years the optimum differs from the published grouping in 1,146 of the 18,493 stars the code assigns and is unique in all eighteen peer-group computations. The direction of the differences varies by year (in 2024, 15 up and 258 down), and the all-upward pattern of 2026 is specific to that year.
The Medicare Advantage cut points
In Medicare Advantage, CMS clusters contract scores separately for each quality measure, so every measure in every star year has its own cut points. These are the thresholds that determine whether an 87 percent screening rate is worth three stars or four. Call one such calculation a computation; star years 2024–2026 contain 123. Under the Technical Notes, scores beyond two outlier boundsa standard outlier rule: CMS computes an upper and a lower bound from the quartiles of the score list, drops any score outside them, and prints the two bounds it used are trimmed and a SAS procedure assigns the remaining contracts at random to ten equal groups. Ten times, one group is set aside and the rest are clustered by Ward’s method, and the ten values of each cut point are averaged; this is the regulation’s “mean resampling,” a delete-one-group jackknifea resampling scheme that recomputes a statistic with one block of the data left out at a time and averages the results. CMS then applies a guardrailCMS’s cap on how far a cut point may move from its prior-year value, 5 percent of the prior year’s restricted score range capping each cut point’s movement from the prior year, rounds, and aggregates the resulting measure stars into each contract’s overall rating.
CMS does not publish which scores entered each computation, so each score list is rebuilt from the public score files under the documented exclusion rules. The two outlier bounds the Notes print for every computation serve as a check, because they depend only on the list: the rules alone reproduce them in 82 of the 123 computations, and for the other 41, where the public file blanks the scores of some small contracts, values are filled in for the blanked scores until both bounds match. On each list the clustering step is run both ways, Ward’s method and Fisher’s dynamic program, before any resampling, guardrail or rounding. The Ward grouping’s sum of squares is above the true minimum in 104 of the 123 computations and equal to it in 16; in the other three the scores take fewer than five distinct values, so no grouping into five star levels exists. Across three ways of rebuilding the lists the count runs from 104 to 106, and it is still 103 when every filled-in score is dropped. In all 120 other computations the optimal grouping is unique. The gaps, plotted below, span seven orders of magnitude. When the contracts are rescored against the optimal cut points, 9,809 of the 47,752 contract-measure stars assigned by these computations change, about one in five.

Each dot is one of the 123 cut-point computations of star years 2024–2026, one row per year, placed by the amount by which the sum of squares of CMS’s Ward grouping exceeds the true minimum on the same trimmed score list, on a logarithmic axis because the gaps run from below 0.0002 to above 1,800 in each measure’s squared score units (the largest, 1,813, belongs to the 2024 Transitions of Care measure). Filled dots are the 104 computations that miss the minimum (36 of 40, 33 of 40 and 35 of 43 by year); the open circles in the left-hand column are the 19 with gap exactly zero, the 16 that attain the minimum and three in which the scores take fewer than five distinct values. The comparison is made before resampling, the guardrail and rounding, on score lists rebuilt from the documented rules with filled-in scores where the public file blanks them (redrawn for this page from the data of Exhibit A3 of the online appendix, the cut-point file listed under Supplementary material).
Across the bonus line
A different cut point changes a payment only if it moves a contract’s overall rating across 4.0. The full-sample optimal cut points are run through the later published stages (guardrail, rounding, aggregation) and the resulting ratings compared with the stars CMS assigned, under seven stated conventions. One of the conventions holds the improvement and survey measures at their published stars (their inputs are unpublished or not clustered), which makes the counts below conditional on those stars. Sixty contract-years change bonus status. Of these, 34 are in the dollar estimate (31 distinct contracts, among 1,724 published contract-year ratings), sixteen crossing upward and eighteen downward; the other 26 have no bonus program, no published overall rating, or a status that could not be determined. Bonus status is valued at $400–600 per enrollee-year, a band taken from KFF and MedPAC figures and used as a reference value rather than a measurement. On that band the bonus payments that depend on the 34 changes total an estimated gross $0.9 to $1.4 billion over payment years 2025 through 2027. At the midpoint, $130.3 million comes from the upward changes and $1,015.3 million from the downward ones; the two are not netted. These are estimates and imply nothing about the conduct of any contract or of CMS.
Most of the dollar total comes from one contract-year: H0524 in star year 2024 accounts for 59.2 percent of the enrollment in the dollar estimate (1,355,332 enrollee-years, $542–814 million), and its published rating is only about 0.030 above the 3.75 rounding edge where the displayed star changes. Contracts move both ways because the optimal cut points are neither uniformly harder nor uniformly easier than CMS’s. Whether a given difference reaches the stars then depends on the guardrail: where a cut point is held by the guardrail it takes the same value under both methods, and elsewhere the difference passes through. In one worked example, the 2026 measure Complaints about the Health Plan, three of the four star boundaries are held by the guardrail, and under the one group assignment used for illustration the fourth keeps a 0.01 difference, 0.11 against 0.12 complaints per 1,000 members. Of the 60 changes, 33 involve a measure with a cut point held by the guardrail, and without the guardrail 18 would disappear, all upward.
The unpublished input order
CMS’s own resampled computation cannot be rerun from the published files, because they omit both the exact set of scores that entered each computation and the full specification of its one random step. The Technical Notes print the SAS call that assigns contracts to the ten groups, seed included (8675309, which “allows for future replication of the randomization process”). The assignment also depends, however, on the unpublished order in which the contracts were read and, in two of the years, on which random-number generator ran. The Notes do not spell out the assignment rule itself; with an assumed rule stated explicitly, every contract’s bonus status is recomputed at 28 sampled input orders. For 118 contract-years the status comes out differently under different orders, so the published files leave it undetermined (a statement about the files, not a finding about any particular contract).
The dependence on the input order can be put in dollars. Draw one of the sampled orders at random, take the contracts whose bonus status under that order differs from their usual one, and add up their gross bonus payments; the figure reported is the expected value of that sum. With Ward’s method inside the ten groups, as CMS runs it, the expectation is $787.2 million; with the exact optimum inside the same groups it is $98.4 million, smaller by a factor of eight. Each figure measures one method’s own sensitivity to the order, and at any single order the two methods still disagree on the bonus status of 26 to 47 contract-years in the dollar estimate. One additional disclosure would make the computation reproducible: by publishing, from one production run, either the clustering input file (each computation’s scores in the order they were read) or the group assignment itself, CMS could settle the status of every contract-year that the published files now leave undetermined; for the two earlier years it would also have to state which random-number generator ran.
The patient surveys
No payment depends on the survey stars, and only two of the four programs can be checked: the home health and hospice surveys publish stars but not the clustered scores behind them. For the hospital survey (HCAHPS), the comparison covers five quarterly refreshes (April 2025 to May 2026) and the eight measures starred in all five. The published grouping misses the minimum in 38 of the 40 refresh-measure cells, and regrouping to the optimum moves 17,484 hospital-measure stars, in both directions. Ward’s method run directly on the public file, however, recovers only one of the eight published groupings on the May 2026 refresh. If CMS runs the Ward step as its notes describe, then its inputs are not exactly the file’s scores, and these divergences mix differences in the inputs with the algorithm’s shortfall. Patients see one summary star per hospital, built from the per-measure stars by a published rule; applied to the optimal per-measure stars, that rule changes the summary star of 413 of 3,176 hospitals (13.0 percent) on the May 2026 refresh.
For the dialysis survey (ICH CAHPS) the algorithm can be tested on its own. The survey’s April 2026 file contains the clustered quantity itself, a linearizedsurvey answers converted to a 0-to-100 scale and averaged, with CMS’s standard adjustments, giving one number per facility and measure 0–100 score for each of 2,594 facilities on six measures. Ward’s method applied to that file reproduces five of the six published groupings identically and the sixth up to ties, which confirms that the file’s scores are the ones CMS clustered. None of the six published groupings attains the minimum, and each optimum is unique. Regrouping moves 4,061 facility-measure stars, about 26 percent of the 15,564 in the file, from 3 percent of facilities on one measure to 40 percent on each of two others, one of them shown below. On every measure the moves run one way only, up on five and down on one.

The most-affected measure of the dialysis-facility survey (ICH CAHPS, April 2026 file), nephrologists’ communication and caring: scores are whole numbers, so each bar counts the facilities at one score, 2,594 in all, with the slate ruler above showing the published star bins (solid edges, sum of squares 10,329.0) and the violet ruler below the bins at the exact optimum of the stated criterion (dashed edges, 9,116.5). Every optimal edge lies below its published partner, and the 1,042 facilities in the orange bars between paired edges, 40 percent of the total, move up one star under the optimum; on a second measure, rating of the nephrologist, the same number move down. Here the published scores are confirmed to be CMS’s inputs, so the whole difference is the algorithm’s (redrawn for this page from the data of Exhibit A7 of the online appendix).
Scope and open questions
No error is attributed to anyone, and none is needed to explain why the published stars diverge from the optimum. Both algorithms are deterministic, so a published computation can be reproduced exactly; an exact reproduction, however, does not test the grouping against the stated criterion, and such a divergence could persist for years with every step carried out as documented. Which of the two Medicare Advantage provisions controls, the stated objective or the prescribed method, is a question for the courts and is left aside here. If the method is read as the rule, the comparison measures how far the method falls short of the objective; if the objective is read as the rule, it measures payments that may have been misdirected. Either way the result concerns specific contracts, those whose bonus status differs under the two computations, and not any tendency of the program as a whole to rate too generously or too harshly.
The strength of each comparison depends on how much of CMS’s computation is public. The hospital comparison rests on code and input files taken from public mirrors of CMS’s releases. The Medicare Advantage score lists are reconstructions, some of the changes in the dollar estimate depend on the filled-in scores in them, and the dollar figures depend in addition on the seven conventions, the per-enrollee band and a handful of large contracts. The two survey comparisons take the technical notes’ description of the inputs as given, which for the hospital survey is evidently not exact. A 2026 final rule commits CMS to display to contracts sample data “needed to replicate the cut point methodology,” though the author could not perform that replication from the documents published so far. The Advance Notice for 2027 raised the possibility of percentile cut points in place of clustering, and the Rate Announcement deferred that change, so clustering remains the method in force. Wherever a program’s rules state the sum of squares as the criterion for scores on a line, the exact optimum can be computed directly with standard statistical software; it was unique in every computation examined in which five groups exist and does not depend on the input order, so it could take the place of the prescribed algorithm with no other change to the procedure. The paper closes on a larger question, whether a bonus should turn on a cut point at all: a payment that does so depends on which of several nearly equivalent groupings an algorithm happened to return, and MedPAC has recommended since 2020 that Congress replace the bonus program with one that pays on a continuous scale with no cliffs, which would remove that dependence.
The paper
- Stars misaligned: Medicare star ratings and the exact optimum of their clustering criterion (PDF) — Matthew D. Schwartz, Harvard University. A preliminary version of the paper.
Supplementary material
The first two files rerun the Medicare Advantage cut-point comparison with Python alone; the repository holds the full code and data release.
- stars-evaluate.py — Python, standard library only. Reruns Fisher’s dynamic program in exact rational arithmetic on every score list in ma-cutpoint-rows.json and checks the published grouping’s sum of squares, the optimal sum of squares, the gap between them, the uniqueness of the optimum and the count of changed stars against the recorded values. The default run covers the 43 computations of star year 2026;
--fullcovers all 123 and checks the 104-of-123 and 9,809-of-47,752 tallies. - ma-cutpoint-rows.json — the 123 rebuilt score lists of star years 2024–2026, one per cut-point computation: the sorted scores as exact decimal strings, with the published and optimal cut points and both sums of squares (as exact fractions) beside each. The header pins the parsed CMS score files it was built from by SHA-256 hash.
- github.com/bootloops-papers/healthstars — the code and data release for the paper (release v1.0, the maintained version): code, verification records and parsed inputs, with the raw CMS files pinned by URL and hash. The archived copy of the release is at Zenodo, doi:10.5281/zenodo.23195076.
References
| Code of Federal Regulations, 42 C.F.R. § 422.162: Medicare Advantage Quality Rating System and 42 C.F.R. § 422.166: Calculation of Star Ratings, ecfr.gov (accessed 2026) | the regulation text: the sum-of-squares criterion in 422.162(a), the prescribed method in 422.166(a)(2)(i) |
| Centers for Medicare & Medicaid Services, Medicare 2026 Part C & D Star Ratings Technical Notes, technical report (2025); the 2024 and 2025 editions likewise, all on CMS’s Part C and D performance data page | restate the criterion and document the trimming, the ten-group resampling and its seed, and the guardrail |
| W. D. Fisher, On grouping for maximum homogeneity, J. Am. Stat. Assoc. 53 (1958) 789 | the dynamic program that finds the exact minimum for scores on a line |
| D. Aloise, A. Deshpande, P. Hansen and P. Popat, NP-hardness of Euclidean sum-of-squares clustering, Mach. Learn. 75 (2009) 245 | minimizing the criterion is NP-hard for data of arbitrary dimension |
| H. Wang and M. Song, Ckmeans.1d.dp: Optimal k-means clustering in one dimension by dynamic programming, The R Journal 3 (2011) 29 | Fisher’s algorithm in standard statistical software, an R package |
| B. Bayles, The fault is not in our stars, but in ourselves, web post, bbayles.com (2017) | found that CMS’s 2017 hospital k-means code stopped before converging |
| R.-H. Huang, rstarating: CMS Hospital Compare Star Rating SAS Pack Replica, software repository, github.com/huangrh/rstarating (2017) | reimplemented the 2017 hospital code, whose iteration stopped before it converged |
| M. E. Barclay, M. Dixon-Woods and G. Lyratzopoulos, Concordance of hospital ranks and category ratings using the current technical specification of US hospital star ratings and reasonable alternative specifications, JAMA Health Forum 3 (2022) e221006 | the hospital stars’ sensitivity to the steps before clustering, with the clustering step held fixed |
| H. Rogers and M. Smith, Recalculating Medicare Advantage: Potential SCAN and Elevance ruling implications for MA stakeholders, white paper, Milliman (2024) | replicates CMS’s published Medicare Advantage computation and runs counterfactuals for the 2024 SCAN ruling |
| M. Darden and I. M. McCarthy, The star treatment: Estimating the impact of star ratings on Medicare Advantage enrollments, J. Hum. Resour. 50 (2015) 980 | the published stars as data: effects of the bonus threshold on payments and enrollment |
| A. Anderson and M. K. Meiselbach, Fluctuating Star Ratings and Medicare Advantage bonuses, JAMA Health Forum 6 (2025) e254398 | year-to-year instability of the published ratings and the bonuses that follow them |
| B. Vatter, Quality disclosure and regulation: Scoring design in Medicare Advantage, Econometrica 93 (2025) 959 | the design of Medicare Advantage scoring rules, taking the published computation as given |
| J. F. Biniek, N. Ochieng and M. Freed, Medicare will spend more than $13 billion on the Medicare Advantage Quality Bonus Program in 2026, KFF (2026) | the $13.4 billion estimate of 2026 bonus payments and one of the two sources behind the per-enrollee reference band |