Medicaid expansion is a financial winner for states, with the federal government paying back up to $8 for every $1 a state spends, according to a new report.

The report, from the left-leaning think tank Urban Institute and nonpartisan Robert Wood Johnson Foundation, found that by expanding Medicaid, the 19 states that have yet to expand Medicaid would see up to a $27 billion drop in uncompensated care spending.

Thirty-one states and the District of Columbia have expanded Medicaid under the Affordable Care Act.

The federal government pays the entire cost for the first couple of years of the expansion, but then the state must shoulder more of the cost.

The report found that from 2017 to 2026, expansion in the holdouts would increase nominal state costs and federal spending by $54 billion and $404 billion, respectively, if enrollment is moderate. That could increase to $56 billion and $462 billion if enrollment is high.

"Each state dollar would thus draw down between $7 and $8 in net federal funding," the report released Monday said.

States would save up to $27 billion in uncompensated care while reducing federal spending by $43 billion, it added. The theory is that as more people gained health insurance they would not seek charity care from hospitals or doctors.

The Medicaid expansion used to be a mandatory part of the Affordable Care Act, but in 2012 the Supreme Court ruled that states could choose to opt out.

Some red states have held out on expanding Medicaid due to opposition to Obamacare and concerns about eventually having to shoulder more costs for the expansion.

The report notes that most expansion states have found that "state cost increases resulting from higher caseloads are outweighed by state cost savings and revenue growth that result from expansion."

Some red states such as Montana have applied to the federal government to get a waiver to make certain changes to Medicaid in exchange for expansion. Such changes include calling on new enrollees to shoulder more of the costs and work requirements.