Two hours before the Democratic presidential debate in Charleston, South Carolina, on Sunday night, Sen. Bernie Sanders (D-VT) released a detailed plan explaining how he'd pay for federally run, single-payer health insurance for all Americans — "Medicare for all," as he calls it. You can read the plan here:

Bernie Sanders's "Medicare for All" plan

The plan follows a week of attacks from Hillary Clinton's campaign against Sanders's health care thinking, assailing Sanders for not explaining how he'd pay for the idea, and for seeming to renege on a promise to release the plan before the Iowa caucuses. The release responds to both those criticisms.

It also addressed fears raised by Clinton and her team about the American Health Security Act of 2013, an earlier single-payer endorsed by Sanders before his presidential run in which the federal government would facilitate the creation of state-administered programs. Clinton and her allies alleged that this opened up the plan to interference from Republican governors, like the many who've refused to expand Medicaid or open exchanges under the Affordable Care Act. By making his latest proposal federally administered, Sanders makes it invulnerable to this particular objection.

How Sanders would pay for single-payer

Sanders's team estimates the plan would require an additional $1.38 trillion a year in revenue. That's a not-insignificant amount of money — a little under 8 percent of GDP (currently about $18 trillion). It'd take the US from having an unusually small government relative to its economy (federal, state, and local combine to about 39 percent of GDP currently) to having about the same level of government spending relative to the economy as you see in the Netherlands, and more spending than you see in the UK, Germany, or Spain.

Sanders would raise that $1.38 trillion with:

A 6.2 percent payroll tax levied on employers and meant to replace employer-paid health premiums.

A 2.2 percent flat income tax, characterized as a "premium" and intended to replace worker-side health premium spending. The tax would apply to "taxable income as currently defined," so taxpayers could claim the usual standard deduction ($28,800 for a family of four).

New top income tax rates: 37 percent for income from $250,000 to $500,000; 43 percent for $500,000 to $2 million; 48 percent for $2 million to $10 million; 52 percent for income above $10 million.

Taxing investment income the same as wage income. This effectively raises the top income tax rate on investment income from 23.8 percent to 54.4 percent.

Capping deductions at 28 percent for households over $250,000, as President Obama has proposed.

Raising the estate tax to a top rate of 65 percent.

Ending the tax exclusion for employer-based health insurance, which would be unnecessary under single-payer. Ironically, Sanders supports repealing the Cadillac tax, a provision under Obamacare that partially repeals this exclusion.

Clinton's campaign has been charging that Sanders's health care vision necessarily entails higher taxes on the middle class. Sanders's plan is structured to try to avoid that accusation — levying its payroll tax on employers rather than employees and calling its 2.2 percent flat income tax a "premium" rather than a tax. But in effect, working people — whether wealthy or not — will be paying higher taxes.

The Sanders camp's real argument is that, all things considered, the average family would save money.

They commissioned Gerald Friedman — an economist at the University of Massachusetts who previously analyzed Rep. John Conyers's (D-MI) very similar single-payer bill, HR 676 — to analyze how his plan would affect a typical household. Friedman's analysis can be found here.

Friedman found that a typical family of four with wages of $50,000 and an employer health plan with $4,955 in annual premiums and a $1,318 deductible would pay only $466 through the new 2.2 percent tax, and save $5,807, or 12 percent of income, on net. Friedman also found that an employer paying $12,591 toward an employee's health plan would pay $3,100 in the new 6.2 percent payroll tax, and save $9,491.

The current health plan costs that Friedman's analysis cites appear to come from the Kaiser Family Foundation's 2015 health plan cost averages, which find an average worker premium of $4,955 and total cost of $17,545, for an employer cost of $12,592.

The plan is pretty vague about details outside of financing. It does specify that unlike Medicare, the plan would have no deductibles or copayments at all.