How Capital Gains Flow Into IRMAA

When a home is sold, the gain (the sale price minus the cost basis, adjusted for qualified improvements and selling expenses) is generally reported on the seller's federal tax return in the year the sale closes. Any portion of that gain not covered by the primary residence exclusion flows through Schedule D into Adjusted Gross Income and, from there, into MAGI. Medicare uses that MAGI two years later to set premiums.

For retirees with otherwise modest income, even a modest taxable gain can push MAGI over an IRMAA threshold. Because the thresholds are cliff-based, one extra penny can cost you thousands in surcharges for the affected year.

The $250,000 and $500,000 Primary Residence Exclusion

Section 121 of the Internal Revenue Code provides a generous exclusion for the sale of a primary residence. A single filer may exclude up to $250,000 of gain. A couple filing jointly may exclude up to $500,000 of gain. The excluded portion never appears on the tax return, so it has no effect on AGI, MAGI, or IRMAA.

This exclusion is not indexed for inflation. The $500,000 cap set decades ago has not moved, even though home values in many markets have grown several multiples in that time. For long-tenured homeowners in high-appreciation markets, the excluded portion may cover only a fraction of the realized gain.

Ownership and Use Tests: Do You Qualify?

To claim the full exclusion, the seller must meet two tests:

The 2 years do not need to be continuous. On a joint return, only one spouse needs to meet the ownership test, but both spouses generally need to meet the use test. The full exclusion is also generally only available once every 2 years.

When the Exclusion Is Not Enough

For retirees who bought a home in an appreciating market decades ago, the realized gain often exceeds the exclusion cap.

Example: A couple bought their primary residence in 1990 for $350,000. In 2026, they sell it for $900,000. Their realized gain is $550,000. The joint exclusion of $500,000 covers most of it, leaving a taxable gain of $50,000. That $50,000 is added to the couple's 2026 MAGI.

If their other MAGI for the year was $200,000, the total 2026 MAGI becomes $250,000. On a joint return, that shifts them from the standard premium tier (at or below $218,000) into Tier 1 at $218,000.01. The 2028 Part B premium rises from $202.90 to $284.10 per month per spouse, plus a Part D surcharge of $14.50 per month per spouse.

Timing the Sale: Which Tax Year Counts

The tax year of the sale is determined by the closing date, not the listing date, contract date, or offer date. A sale that closes on December 31 falls in that calendar year. A sale that closes on January 2 falls in the following year.

That distinction matters when the gain could otherwise push a filer over a threshold. Shifting a closing by a few days may allow the gain to land in a year with lower other income, reducing the IRMAA impact. Sellers considering this strategy work with their tax professional and real estate attorney to coordinate timing. Consult a licensed financial advisor or tax professional for personalized planning guidance.

The Two-Year Lookback Effect

IRMAA is always set using the tax return from two years prior. A home sale closing in 2026 appears on the 2026 return, filed in 2027, used by SSA to set 2028 Medicare premiums. The premium impact, if any, shows up in 2028 and typically lasts only that year unless subsequent returns sustain the higher MAGI.

This delay is both a feature and a trap. It is a feature because retirees have two years of advance notice to prepare cash flow for the higher premium. It is a trap because many sellers assume the tax year of the sale is also the year that affects Medicare, and miss the actual impact year entirely.

Strategies to Manage Home Sale IRMAA Exposure

Depending on your situation, several tactics may help reduce or absorb IRMAA impact from a home sale:

Special Cases: Divorce, Death, Rentals, Second Homes

Several situations modify the standard rules:

Steps to Consider Before Listing

The strategies that work must be in place two years before you enroll, and for retirees, a planned home sale fits inside that same two-year planning window. Running the numbers before listing turns a potential surprise into a known, manageable decision.

See Where You Stand

Our IRMAA Report estimates your projected surcharge exposure based on your income and filing status, including the MAGI impact of a planned home sale on the Medicare premium year two years later.

Get Your IRMAA Report: $25

Sources