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.
This post may contain links from our sponsors and affiliates, and Flywheel Publishing may receive compensation for actions taken through them.
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 the owner 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. The standard tests each 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” matters 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, that number can be far larger than most owners expect. The S&P Cotality Case-Shiller National Home Price Index stood at 337.31 as of July 2026, up 1.9% year over year, which means even modest homes bought a generation ago can carry gains that easily outstrip the exclusion cap.
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 standard 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 licensing requirement is the key dividing line, and it is why the choice of care setting 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 belongs to married couples filing jointly. A single filer, including widows and widowers, is capped at $250,000. Because many people enter nursing care alone, that smaller ceiling is often the operative number.
Surviving spouses do 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
- Confirm the care facility is licensed for the resident’s level of care and keep documentation of licensure.
- Obtain a physician’s statement establishing incapacity for self-care.
- Track the ownership timeline against the five-year lookback and confirm at least one year of pre-care use as a principal residence.
- Rebuild cost basis: original purchase price, closing costs, and qualifying capital improvements.
- 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, not a Medicaid rule. Selling the home to capture the Section 121 exclusion can convert an exempt asset into countable resources, disrupting Medicaid eligibility or triggering estate recovery later. A tax answer alone does not resolve that conflict.
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 reinforces the urgency of timing decisions: according to the National Association of Realtors, existing-home sales reached 3.99 million annualized in September 2026, still down 2.2% from a year earlier, as the 30-year fixed mortgage rate climbed to 6.86% and kept buyer activity under pressure. The median existing-home price hit $417,500 that month, up 1.3% year over year and the highest September median on record. 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 337.31 (July 2026, per S&P Dow Jones Indices and FRED) from the previously cited 335.10, and replaces the August 2026 existing-home sales figure with the more recent September 2026 reading of 3.99 million annualized, per the National Association of Realtors. The median existing-home price of $417,500 and the 30-year fixed mortgage rate of 6.86% (September 2026, Freddie Mac) were also added.
Contact [email protected] for any questions or corrections.








