Millionaires would win big under Republicans' bill to repeal Obamacare.

People earning more than $1 million annually would save an estimated $165 billion in taxes over 10 years, an analysis by the nonpartisan Joint Committee on Taxation found.

That's because the legislation, which started moving through the House this week, would eliminate two surcharges on the rich that help pay for Obamacare. The taxes would end after this year.

Under the Affordable Care Act, single taxpayers with incomes above $200,000 and couples making more than $250,000 annually have paid an additional 0.9% Medicare payroll tax on the amount they earn above those thresholds. Another 3.8% tax applies to investment income above those income levels. The two taxes have been in place since 2013.

Millionaires pay the majority of those taxes, so they would reap the largest benefit if the levies are repealed. But it's not just those those making $1 million-plus who would save. People earning between $500,000 and $1 million annually would get a tax cut of nearly $55 billion over a decade, while those with incomes of between $200,000 and $500,000 would save about $53 billion.

Related: Who wins and who loses in Obamacare replacement

The Joint Committee on Taxation analysis, obtained by CNN, was reported earlier by the New York Times.

In total, the committee estimated that repealing the Medicare payroll tax surcharge would cost the federal government $117 billion over 10 years, while the investment income levy would cost $158 billion. The GOP bill, titled the American Health Care Act, also calls for repealing a host of other taxes, including those on insurers, medical device makers and prescription drug makers.

A new report by the nonpartisan Tax Policy Center found that repealing all these taxes would mean that nearly everyone in the Top 1%, who earn more than $772,000 a year, would enjoy a hefty tax cut, averaging a little more than $37,000 in 2022. Tax filers in the Top 0.1% would get an average tax cut of more than $207,000.

Related: GOP's Obamacare replacement plan would lower taxes for the rich

At the same time, lower-income Americans who are insured through Medicaid or subsidized policies bought on the Obamacare exchanges are expected to suffer under the Republican legislation. The GOP plan calls for eliminating the enhanced federal support states receive to cover low-income adults under Medicaid expansion, as well as curtailing federal funding for the overall Medicaid program.

Also, the legislation would replace Obamacare subsidies, which are based on income and cost of coverage, with refundable tax credits that are based mainly on age. The tax credits -- between $2,000 and $4,000 -- are expected to provide less assistance to lower-income people.

Related: Millions could lose insurance under GOP Obamacare repeal bill, S&P reports

These provisions are likely to leave millions unable to afford insurance, experts say. The Congressional Budget Office is expected to release its review of the bill on Monday that will detail the impact on coverage.

--CNN's MJ Lee contributed to this report.