If Your Last Years Are Spent in a Nursing Home, the IRS Still Counts the House as Your Home, and the Full $500,000 Tax Break Survives the Sale

A buried IRS provision quietly changes the rules for homeowners who spend years in a nursing facility before selling, and most families discover it too late to benefit.

Published August 28, 2026, 6:09pm ET · 4 min read

Life After Work desk. Editor: David Beren.

This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.

A smiling older woman with short blonde hair looks towards an older man with white hair and glasses, who is also smiling, in the foreground. Behind them, a blurred American flag and a document with the letters 'IRS' are visible.
A smiling retired couple reviews their financial situation, symbolizing the important decisions seniors face regarding income and its impact on Medicare premiums. © Canva | SolStock from Getty Images Signature and tzahiV from Getty Images Signature

If you own your home and worry that a long stay in a nursing facility could wipe out your capital gains tax break when the house is sold, a specific IRS provision addresses exactly that situation. Section 121 of the Internal Revenue Code, the rule that lets qualifying homeowners exclude a large chunk of gain from a home sale, contains a carve-out that treats time in a licensed care facility as if you were still living in the house. Most families never hear about it until a loved one is already deep into a care arrangement.

What the Standard Home Sale Exclusion Requires

The general Section 121 rule is straightforward. To exclude gain on the sale of a principal residence, you must have owned and used the home as a principal residence for a set period within the five years before the sale. Specifically, the standard tests require two years of ownership and two years of use within that five-year lookback window. The exclusion caps at $250,000 of gain for a single filer and $500,000 for a married couple filing jointly.

The word “gain” is important here. Gain is what remains after subtracting your cost basis (what you paid plus qualifying capital improvements) from the net sale proceeds. On a home held for decades, especially with the S&P Cotality Case-Shiller National Home Price Index sitting at 335.10 as of May 2026, that gain can be far larger than most owners expect.

A multi-year nursing home stay would normally shatter the two-year use test and eliminate the exclusion entirely.

The Buried Rule That Rescues the Exclusion

Under IRC Section 121(d)(7), a homeowner who becomes physically or mentally incapable of self-care gets a relaxed use test. The seller needs only one year of use as a principal residence during the five-year lookback, and any time spent in a state-licensed or government-licensed facility counts as use of the home. The clock does not stop just because the owner moved into qualifying care.

The ownership test still applies on its normal terms. Title must have been in the seller’s name for the required period, and that requirement does not bend.

Who Qualifies and Who Does Not

The relaxed use rule turns on incapacity, not age or living preference. A homeowner who moves in with adult children, shifts to independent living, or enters an unlicensed arrangement will not qualify. The facility must be licensed for the level of care the person needs. That is why the line between a licensed nursing facility and other housing arrangements carries real financial weight. A physician’s determination that the person cannot care for themselves typically anchors the claim.

Single Filer, Married Couple, and the Widow Window

The $500,000 exclusion applies to married couples filing jointly. A single filer, including widows and widowers, is capped at $250,000. Since many people enter nursing care alone, that smaller ceiling is often the operative number.

Surviving spouses have one important escape valve. They can claim the full joint exclusion if the home sells within two years of the spouse’s death, provided the couple would have qualified right before the death and the survivor has not remarried. Acting inside that window can preserve a significant amount of tax-free gain for a widowed seller heading into long-term care.

How to Actually Use It

  1. Confirm the care facility is licensed for the resident’s level of care and keep documentation of licensure.
  2. Obtain a physician’s statement establishing incapacity for self-care.
  3. Track the ownership timeline against the five-year lookback and confirm at least one year of pre-care use as a principal residence.
  4. Rebuild cost basis: original purchase price, closing costs, and qualifying capital improvements.
  5. If widowed, calendar the two-year window from the spouse’s date of death.

Catches Worth Flagging Before Anyone Signs a Listing

Two traps deserve attention before a sale moves forward. First, this is a tax rule. It does not address Medicaid. Selling the home to capture the Section 121 exclusion can convert an exempt asset into countable resources and disrupt Medicaid eligibility or trigger estate recovery later. The intersection with Medicaid planning is real, and a tax answer alone does not resolve it.

Second, the exclusion covers gain, not proceeds. A long-held home can generate gain well above the cap, leaving a taxable slice regardless of the special use rule. The broader housing market adds urgency to timing decisions: according to the National Association of Realtors, existing-home sales fell to 3.98 million annualized in August 2026, down 2.0% from July, as rising mortgage rates continued to cool buyer activity. A CPA who coordinates with an elder-law attorney is the right stop before any sale.

Editor’s note: This article updates the S&P Cotality Case-Shiller National Home Price Index figure to 335.10 (May 2026, per S&P Dow Jones Indices) from the previously cited 336.7, and replaces the July 2026 existing-home sales figure with the more recent August 2026 reading of 3.98 million annualized, per the National Association of Realtors.

Contact [email protected] for any questions or corrections.

David Beren

David Beren has been a Flywheel Publishing contributor since 2022. Writing for 24/7 Wall St. since 2023, David loves to write about topics of all shapes and sizes. As a technology expert, David focuses heavily on consumer electronics brands, automobiles, and general technology. He has previously written for LifeWire, formerly About.com. As a part-time freelance writer, David’s “day job” has been working on and leading social media for multiple Fortune 100 brands. David loves the flexibility of this field and its ability to reach customers exactly where they like to spend their time. Additionally, David previously published his own blog, TmoNews.com, which reached 3 million readers in its first year. In addition to freelance and social media work, David loves to spend time with his family and children and relive the glory days of video game consoles by playing any retro game console he can get his hands on.

All articles →