Republicans’ American Health Care Act would be devastating to older Americans who rely on the individual insurance market, according to an analysis by the Congressional Budget Office.

The CBO found that the revised Republican bill does bring down overall premiums in the individual market by anywhere from 4 to 20 percent by 2026 compared with what they would be under current law.

The variation depends on whether a state accepts waivers under the American Health Care Act, which would allow insurers to offer much skimpier health plans at lower premiums. States that take up such waivers would see lower premiums, although the health plans would provide fewer benefits. States that don’t adopt such waivers would have higher premiums, but their health plans would offer more benefits — a trade-off.

But the CBO’s analysis includes a big caveat: Premiums would differ greatly based on age and income. In general, the older and poorer you are, the higher your premiums would be under the American Health Care Act compared with current law.

The CBO offers an example of a single individual with an annual income of $26,500.

If that person is 21 years old, he could benefit from the Republican health care bill. Under the Affordable Care Act (also known as Obamacare), he would on average pay $1,700 in premiums for insurance. Under the Republican plan, he would pay $1,250 if he’s in a state that accepts regulatory waivers and makes moderate changes to market rules — although, again, this also means his health plan would likely be skimpier. If his state doesn’t take up a waiver, his premium would actually increase by $50 to $1,750.

But if that person is 64 years old, he would be hurt by the Republican bill. Under Obamacare, he would also pay $1,700 in premiums for insurance. But under the Republican bill, he would pay $16,100 (about 60 percent of his annual income) if he lives in a state that doesn’t accept regulatory waivers, and $13,600 — still more than half his annual income — if he lives in a state that does adopt waivers to make moderate rule changes. That amounts to as much as an 850 percent increase in premiums from Obamacare to the Republican bill.

A 64-year-old who’s making $68,200 a year could fare a bit better. Under Obamacare, he’s expected to pay $15,300 in premiums for insurance, because his income would be too high to receive the law’s tax credits. Under the Republican bill, the tax credit, which is now based on age instead of income, begins phasing out at $75,000. So his premium would drop to $13,600 — a bit below Obamacare levels — in a state that gets a regulatory waiver but would actually increase to $16,100 in a state that doesn’t get a waiver.

Here’s how all of that looks in chart form:

Older people with an annual income of $75,000 or more would get fewer to no subsidies under the Republican bill. So they would likely face higher premiums than they did under Obamacare, much like the lower-income consumer.

The Republican bill accomplishes all of this in two ways.

First, it abandons Obamacare’s income-based tax credits (which give more money to people with lower incomes) to instead give anyone with an annual salary below $75,000 a tax credit based on age, with older people getting more money and a phaseout for higher incomes.

But it also peels back an Obamacare rule that protects older people from higher premiums. Under Obamacare, insurers are generally only allowed to charge an older person about three times what they would charge a younger person — under the theory that older people are often sicker and therefore need to use more insurance. But under the Republican bill, the limit of three times would go up to five times, effectively letting insurers charge older people 66 percent more than they would under Obamacare.

Republicans argue this is necessary because it would also let insurers charge younger people less, which would encourage younger and generally healthier people to come into the insurance pool — and therefore bring down the overall cost of health care by making it so more younger, healthier people are effectively subsidizing everyone’s care.

The CBO found that’s broadly true: It would bring insurance premiums down in general, and it would cost at least some young people less to get signed up for a health plan. But it would do all of that at a very high cost to older, particularly poorer Americans.