A major feature of many new contracts between providers and payers is shared savings programs, in which providers can earn a percentage of the savings if the cost of the care they provide is lower than the projected cost. Unless providers are also held accountable for meeting quality benchmarks, some observers fear that these programs could erode quality of care by rewarding only cost savings. We estimated the effects on Medicare expenditures of improving the quality of care for patients with diabetes. Analyzing 234 practices that provided care for 133,703 diabetic patients, we found a net savings of dollar;51 per patient with diabetes per year for every one-percentage-point increase in a score of the quality of care. Cholesterol testing for all versus none of a practice's patients with diabetes, for example, was associated with a dramatic drop in avoidable hospitalizations. These results show that improving the quality of care for patients with diabetes does save money.