When life prompts a move away from a beloved home—whether for work, health, or family reasons—many homeowners leave their property vacant, uncertain of future plans. But for those considering selling a long-empty house, federal tax law draws clear lines: the pivotal question is when the homeowner last lived in the house as a primary residence, and for how long. Depending on their answers, the much-discussed $250,000 (or $500,000 for joint filers) exclusion for capital gains on the sale of a main home can slip away—unless timing aligns perfectly or inheritance strategies are in play.
Exclusion Rules: Two Years In, Five Years Back
To qualify for the IRS capital gain exclusion on the sale of a main home, a homeowner must meet both an ownership test and a use test—having owned, and lived in, the property for at least two years during the five-year window ending at the sale date (IRS.gov). If a parent, for example, moved out in 2024 and the house sits empty until 2027, selling it after three years away likely means failing the use test: the clock only resets if the owner reoccupies the home before sale, or if the two-out-of-five-years condition is otherwise met.
The takeaway: extended absence from the home—especially if not interrupted by a return to residency—can cause the exclusion to lapse. If the home was turned into a rental during the absence, the issue deepens: any depreciation claimed must be ‘recaptured’ and becomes taxable upon sale. Losses from the sale of a primary residence are not deductible, regardless of the circumstances.
Inheritance and the Step-Up Solution
For heirs, a different set of rules applies. If the original owner passes away before selling the home, the beneficiary generally receives a stepped-up basis: the property’s tax basis resets to its fair market value at the date of death, potentially erasing years—or even decades—of unrealized gains (IRS.gov). This can dramatically reduce or eliminate capital gains tax if the property is sold soon after inheritance, making estate planning a crucial consideration for families weighing whether to sell now or wait.
Partial Exclusions and Special Circumstances
Certain “unforeseen circumstances”—such as health issues, job relocation, or divorce—may qualify sellers for a partial exclusion, even if they don’t meet the full two-years-in-five rule.1 And for service members, the five-year window can be suspended for up to 10 years while on official extended duty, broadening the potential for exclusion eligibility (IRS.gov).
Document Everything—And Seek Advice
From a tax planning perspective, the complexities only multiply in cases involving extended vacancies, rentals, or changes in ownership. The IRS recommends keeping thorough records of ownership, primary residence periods, rental activity, significant improvements, and any depreciation claimed. In all such scenarios, consulting a tax professional is strongly advised to avoid unpleasant surprises at tax time and to ensure compliance with both federal and state rules.
As housing markets and family circumstances shift, knowing the tax implications can help homeowners—and their heirs—make informed, financially sound decisions on when, and how, to sell a home left behind.