Selling Your Home in Retirement: The $250,000 and $500,000 Tax Exclusion

How the $250,000 and $500,000 home sale exclusion works for retirees: the two-year tests, figuring your gain, surviving spouses and taxes on any extra profit.
A house beside a hanging sign with two large tags reading $250K and $500K, with a house key and a green check mark.

Most retirees who sell their home owe no federal tax on the profit. But a big gain, missing receipts or a few common life events can change that. Here is how the home sale exclusion works and how to keep more of your profit.

Carol and Jim bought their house in 1994 for $180,000. Over the years they added a new kitchen, a bathroom and a roof, about $60,000 in all. This year they sold it for $820,000 and moved closer to their grandchildren.

Their real estate agent said they would owe nothing, because married couples can exclude $500,000 of profit. Their profit looked like $640,000, so they braced for a large tax bill. Both were wrong.

Once they subtracted their selling costs and the improvements they had receipts for, their taxable gain was about $30,800. The tax on that came to roughly $4,600, not zero and not a disaster.

Key takeaways

  • You can exclude up to $250,000 of profit from selling your main home, or $500,000 if you are married and file jointly.
  • To qualify, you generally must have owned the home and lived in it for at least two of the five years before the sale.
  • The exclusion applies to your gain, not your sale price, and receipts for improvements can lower that gain.
  • Any gain above the exclusion is taxed as a long-term capital gain and can raise your Medicare premiums two years later.

How the exclusion works

The rule comes from section 121 of the tax code. If you meet the tests, you can leave out of your income up to:

  • $250,000 of gain if you are single or married filing separately.
  • $500,000 of gain if you are married filing jointly.

To get the full amount, you generally must pass three tests:

  1. Ownership: you owned the home for at least two of the five years before the sale.
  2. Residence: it was your main home for at least two of those five years. The two years do not have to be in a row, and short absences such as vacations still count.
  3. Look-back: you did not use the exclusion on another home sale in the two years before this one.

For married couples, only one spouse needs to meet the ownership test, but both must meet the residence test to get the full $500,000. The exclusion applies only to your main home. A vacation home or rental property does not qualify on its own.

Figure your gain, not your sale price

The exclusion applies to your profit, which the IRS calls gain. Many people overestimate it because they forget two subtractions:

StepCarol and JimWhat it includes
Sale price$820,000The contract price
Minus selling costs– $49,200Agent commission, title, transfer taxes and other closing costs you paid
Amount realized$770,800
Minus adjusted basis– $240,000What you paid ($180,000), certain purchase costs, plus improvements ($60,000)
Gain$530,800
Minus exclusion– $500,000Married filing jointly
Taxable gain$30,800Taxed as a long-term capital gain

Improvements are changes that add value or extend the life of the home: a new roof, an addition, a remodeled kitchen, central air, a new driveway. Ordinary repairs and maintenance, like painting a room or fixing a leak, do not count unless they were part of a larger remodeling project.

Receipts matter. Without proof of their $60,000 in improvements, Carol and Jim would have reported a gain of $590,800 and a taxable gain of $90,800, roughly three times the tax. The IRS says to keep records of what you paid for your home and its improvements until at least three years after the tax return for the year you sell it is due.

If your gain is more than the exclusion

Any gain above the exclusion is a long-term capital gain if you owned the home for more than a year. That brings a few things into play:

  • Capital gains rates. Long-term gains are taxed at 0%, 15% or 20%, depending on your total income. In 2026, the 0% rate applies to taxable income up to $49,450 for single filers and $98,900 for married couples filing jointly. Most retirees with a taxable home gain pay 15%.
  • The 3.8% net investment income tax. It can apply to the taxable part of your gain if your modified adjusted gross income is above $200,000 (single) or $250,000 (married filing jointly). Those thresholds are not adjusted for inflation.
  • State income tax. Most states with an income tax treat capital gains as ordinary income, and a few have their own rules for home sales.
  • Medicare premiums two years later. The taxable part of the gain counts toward the income Medicare uses to set your Part B and Part D premiums. In 2026, surcharges start above $109,000 for single people and $218,000 for married couples. Selling a home is not one of the life events that lets you ask for a lower amount. See IRMAA: why your Medicare premium went up.
  • Taxes on Social Security. The taxable part of the gain can also make more of your Social Security benefits taxable that year. See how Social Security benefits are taxed.

The excluded part of your gain does not count for any of these. Only the taxable part does.

Special situations retirees run into

When a spouse dies

A surviving spouse can still use the $500,000 exclusion if the home is sold within two years of the death, the survivor has not remarried, and the couple met the ownership and residence tests together. After two years, the limit drops to $250,000.

The survivor may also get a higher basis. When a couple owns a home jointly, the half that belonged to the spouse who died is usually valued at its market value on the date of death. Say Jim had died when the house was worth $800,000. Carol’s basis would rise from $240,000 to $520,000 (her $120,000 half plus $400,000 for Jim’s half). Selling for $820,000 with the same costs, her gain would be about $250,800, well under the $500,000 limit she can still use within two years of Jim’s death. In community property states, the whole home can get this new basis. See the financial checklist after the death of a spouse.

Moving to assisted living or a nursing home

If you become physically or mentally unable to care for yourself, time you spend in a licensed care facility can count as time living in your home, as long as you lived in the home for at least one year of the five before the sale. That helps when a home sits empty for a while before it is sold. Our guide to long-term care costs covers how families pay for care.

Selling sooner than two years

You may still get part of the exclusion if you sell early mainly because of a health problem, a job move of at least 50 miles, or an unforeseeable event such as a death or divorce in the household. The partial amount is based on how much of the two years you met.

Renting the home before you sell

Renting out your home can shrink the exclusion. Time after 2008 when the home was not your main home (for example, years it was a rental before you moved in) can reduce how much gain you can exclude. And any depreciation you claimed, or could have claimed, while it was a rental is taxed when you sell, up to 25%, even if the rest of the gain is excluded.

Inheriting a parent’s home

Heirs usually get a basis equal to the home’s value on the date of death, so if they sell soon after, there is often little or no gain to tax. The exclusion itself does not apply unless the heir lives in the home as their own main home long enough. See estate planning basics for how ownership choices affect your heirs.

Reporting the sale

You do not have to report the sale on your tax return if all of the gain is excluded and you did not receive Form 1099-S, the form the closing agent may send to you and the IRS. If you did receive a Form 1099-S, report the sale on Form 8949 and Schedule D even if you owe nothing. If part of the gain is taxable, you report it there too.

Could the exclusion change?

The $250,000 and $500,000 limits were set in 1997 and have never been raised for inflation. A bill in Congress, the No Tax on Home Sales Act (H.R. 4327), would remove the limits for a main home. As of October 2026 it has not passed and remains in committee, so plan around the current rules.

A short checklist before you sell

  1. Confirm you have owned and lived in the home for at least two of the last five years.
  2. Gather what you paid for the home and receipts for every improvement.
  3. Estimate your gain using your expected sale price and selling costs.
  4. If the gain could exceed the exclusion, estimate the effect on your taxes, Social Security and Medicare premiums with a tax professional.
  5. If you are married and one spouse is seriously ill, ask about timing and the two-year survivor rule before you list.
  6. Decide where the money will go. Our guide to downsizing or a reverse mortgage compares the main ways to use home equity.

Frequently asked questions

Do I have to buy another home to avoid the tax?

No. That was the old rule before 1997. Today you can keep the money, rent, move in with family or buy a smaller home. The exclusion does not depend on what you do next.

How often can I use the exclusion?

Once every two years, as long as you meet the ownership and residence tests for each home.

Does a condo or mobile home count?

Yes. A main home can be a house, condominium, cooperative apartment, mobile home or houseboat, as long as it is where you mainly live.

Can I deduct a loss on the sale of my home?

No. A loss on the sale of a personal residence is not deductible.

Does the excluded gain affect my Medicare premiums?

No. Only the taxable part of the gain counts toward the income Medicare uses for IRMAA.


Educational note: This article is general education, not tax or legal advice. Tax rules, thresholds and state laws change, and special rules apply to business use, rentals, divorce and military service. Carol and Jim are an illustrative example. A CPA or enrolled agent can figure your basis and gain and tell you how a sale fits your overall tax picture.

Sources

Free printable

Retirement Numbers Cheat Sheet

Social Security, Medicare, tax and savings figures for 2026 and 2027 on one printable page.

You'll also get the free RetireNerd newsletter, one short email every two weeks.

Free. We never sell your email. Unsubscribe anytime. Privacy policy

About RetireNerd

Built for people navigating retirement in real life.

RetireNerd turns retirement rules, research and planning questions into practical guides and tools that are easier to understand and use.

Read why RetireNerd was built →