Between 6 million and 10 million people could lose health insurance coverage if the Republican plan to replace Obamacare passes, according to a preliminary analysis from the rating agency Standard & Poor's.

House Republicans revealed the American Health Care Act, their plan to repeal and replace Obamacare, on Monday night. Official estimates for how much it will cost and how many people it will cover aren’t yet available. But S&P’s analysis found about 6 million to 10 million people will lose health insurance if the bill passes, including 2 million to 4 million currently enrolled in the individual health insurance market, and 4 million to 6 million currently enrolled in Medicaid. That adds up to about a quarter to half of the 22 million people who’d lose insurance if Obamacare were just repealed with no replacement.

Deep Banerjee, the author of the report, focuses on the fact that the legislation would allow insurers to charge older people more in premiums than is currently allowed. Under the Affordable Care Act, a 64-year-old can be charged no more than three times what a 21-year-old is charged. The replacement plan would allow the 64-year-old to be charged five times as much. That would make premiums less expensive for younger people and more expensive for older people.

The more expensive premiums for older people are offset a bit by larger tax credits for older enrollees, but tax credits for 64-year-olds are only double the tax credits for 21-year-olds, whereas premiums will be allowed to quintuple.

So Banerjee anticipates more young people will buy insurance, but a large number of older people who have insurance today will stop buying it as it becomes unaffordable. All in all, that means between 2 million and 4 million fewer people will end up insured.

“It’s simple arithmetic,” Banerjee told me. “It doesn’t match how much the actual premiums would go up by age.” Even people who do remain insured could shift to plans with higher deductibles and copayments, meaning their insurance will cover less care even if they don’t lose coverage altogether.

The law also cuts off enrollment for the Affordable Care Act's Medicaid expansion starting in 2020. Starting in that year, newly eligible enrollees who fall below the higher income limits set under the ACA, and current enrollees who have more than a month's break in their eligibility, lose federal funds. The latter provision means that enrollment under the Medicaid expansion will fall over time.

Some states, S&P estimates, will be able to keep enrolling people in Medicaid using state-level funds. “The reason the number is 4 million to 6 million and not higher is that we assume the bigger states like New York and California cover from their own pockets in the future,” Banerjee says. But poorer states with smaller tax bases — such as Kentucky or West Virginia — will find it harder to maintain enrollment.

The S&P report is fairly conservative in projecting coverage losses from other big changes included in the law. For instance, it doesn’t forecast a large decline in Medicaid enrollment due to the program adopting a “per capita cap,” a kind of spending control that limits federal support to states.

“In the longer term, states will have to either lower eligibility, which is hard if you’re already only insuring people making less than the poverty line, or reduce the benefit design,” Banerjee says. “They can still cover close to the number of people they’re covering now, but the kind of benefits they get may be lower, because the burden of covering them goes up for the states.”

It also doesn’t project that employers will quit offering health care and dump employees onto the individual insurance market, even though the new tax credit provides some benefit to people making as much as six figures. “We wouldn’t expect much movement from employer plans to the individual market,” Banerjee said.

Intriguingly, the analysis also projects that health insurers will likely become more profitable due to the legislation. Coverage declines, but older, sicker people will leave the market, making the overall risk pool healthier and reducing the number of major medical expenses that insurers have to pay for.

S&P’s is not the final word on the legislation by any means, and other analysts such as Brookings’s Matthew Fiedler and Loren Adler have put the uninsured number closer to 15 million. But it’s an important early indicator of the scale of disinsurance the bill would cause from a group with no partisan leaning. You can read the full report here.