Quick Answer
You can partially exclude gain from selling your home even if you used it as a rental, but you must pay tax on depreciation claimed (up to 25% rate) and may lose some of the $250,000/$500,000 exclusion. If you rented it for 2 of the last 5 years, you'd lose 40% of your exclusion eligibility.
Best Answer
Michelle Woodard, Tax Policy Analyst
Best for homeowners who rented out their primary residence for part of the ownership period
How rental use affects your home sale exclusion
Yes, you can still exclude some or all of your gain when selling a home that was used as a rental, but the calculation becomes more complex. The key is understanding that the IRS treats your home as having two distinct periods: personal use and rental use.
The depreciation recapture requirement
First, you must pay tax on any depreciation you claimed (or should have claimed) while the property was a rental. This depreciation is taxed at up to 25%, regardless of your regular tax rate.
Example: You bought your home for $400,000 and claimed $20,000 in depreciation over 4 years of rental use. When you sell for $600,000, that $20,000 depreciation must be "recaptured" and taxed at 25% = $5,000 in additional tax, even if you qualify for the home sale exclusion on the remaining gain.
Partial exclusion for non-qualifying use periods
Under IRC Section 121(b)(4), you lose part of your exclusion ($250,000 single, $500,000 married) based on how long the home was used as rental property after May 6, 2008.
Formula: Exclusion × (Non-qualifying use years ÷ Total ownership years)
Worked example: Mixed-use home sale
Scenario: Sarah owned her home for 10 years total:
Sale details:
Tax calculation:
1. Depreciation recapture: $15,000 × 25% = $3,750
2. Remaining gain: $250,000 - $15,000 = $235,000
3. Exclusion reduction: 3 non-qualifying years ÷ 10 total years = 30%
4. Reduced exclusion: $250,000 × (100% - 30%) = $175,000
5. Taxable gain: $235,000 - $175,000 = $60,000
Total tax owed:
Important exceptions and planning opportunities
The "last 5 years" rule: Rental use in the last 5 years before sale reduces your exclusion. But rental use earlier in ownership doesn't count against you.
Temporary absences: Short-term rentals (under 2 years) for job relocation or other temporary reasons may not count as "non-qualifying use."
Separate structure rentals: If you rented out a separate unit (like a basement apartment) while living in the main home, this may not affect your exclusion if properly structured.
What you should do
1. Gather records of all rental periods, depreciation claimed, and home improvements
2. Calculate your potential tax liability using the mixed-use formula
3. Consider timing - moving back into a rental property for 2+ years before selling can preserve more of your exclusion
4. Consult a tax professional for complex situations involving multiple properties or business use
Use our [return scanner](return-scanner) to identify if you've properly reported rental income and claimed appropriate depreciation on past returns.
Key takeaway: You can still get significant tax savings when selling a former rental home, but expect to pay tax on depreciation claimed plus potentially reduced exclusion benefits based on rental use periods.
*Sources: [IRC Section 121](https://www.law.cornell.edu/uscode/text/26/121), [IRS Publication 523](https://www.irs.gov/pub/irs-pdf/p523.pdf)*
Key Takeaway: Rental use doesn't eliminate the home sale exclusion, but you'll pay 25% tax on depreciation claimed and lose exclusion benefits proportional to non-qualifying use periods.
Tax impact comparison based on rental use periods
| Rental Period | Exclusion Reduction | Example Loss on $500K Gain | Depreciation Impact |
|---|---|---|---|
| 1 year of 10 owned | 10% | $25,000 less exclusion | 25% tax on depreciation |
| 3 years of 10 owned | 30% | $75,000 less exclusion | 25% tax on depreciation |
| 5 years of 10 owned | 50% | $125,000 less exclusion | 25% tax on depreciation |
| No rental use | 0% | Full exclusion available | No depreciation to recapture |
More Perspectives
Robert Kim, Tax Return Analyst
Best for investors who live in properties before converting to rentals or vice versa
Strategic considerations for real estate investors
As a real estate investor, the mixed-use home sale rules create both challenges and opportunities for tax optimization.
The "live-in then rent" strategy
Many investors buy properties, live in them for 2+ years to qualify for the exclusion, then convert to rentals. This can work, but timing is crucial.
Example: You buy a duplex for $400,000, live in one unit for 3 years, then rent both units for 7 years before selling for $700,000. Your $300,000 gain gets complex treatment:
The "rent then live" opportunity
Converting a rental back to your primary residence can preserve more exclusion benefits, but you need to live there 2 of the last 5 years before sale.
Multi-unit properties
For properties with separate living units, the IRS may allow you to allocate the exclusion to your personal residence portion only. This requires careful documentation and often professional guidance.
Key planning points
*Key insight: Real estate investors should run the numbers before selling any former personal residence - the tax savings from strategic timing can be substantial.*
Key Takeaway: Investors can still benefit from home sale exclusions through strategic timing, but need careful planning around the 2-year personal use requirement and depreciation recapture rules.
Michelle Woodard, Tax Policy Analyst
Best for homeowners currently planning to sell a property with rental history
What to do when you're ready to sell
If you're selling a home that was previously used as a rental, preparation is key to minimizing your tax liability and avoiding IRS problems later.
Essential documentation to gather
Rental period records:
Financial records:
Common mistakes to avoid
Not claiming required depreciation: If you should have claimed depreciation but didn't, the IRS still requires you to "recapture" it as if you had claimed it.
Mixing personal and rental expenses: Keep clear records of which improvements were made during personal vs. rental use periods.
Ignoring the May 6, 2008 rule: Only non-qualifying use after this date counts against your exclusion.
Your selling timeline
1. 6 months before listing: Gather all documentation and calculate potential tax liability
2. 3 months before: Consider whether moving back in temporarily makes sense
3. At closing: Ensure your settlement statement properly allocates costs
4. Tax time: File Form 8949 and Schedule D, potentially with professional help
When professional help pays off
Consider hiring a tax professional if:
*Bottom line: With proper planning and documentation, you can minimize taxes even when selling a former rental property - but preparation is essential.*
Key Takeaway: Proper documentation and advance planning can minimize taxes when selling a former rental home, but professional help often pays for itself on complex mixed-use sales.
Sources
- IRS Publication 523 — Selling Your Home - Home Sale Exclusion Rules
- IRC Section 121 — Exclusion of gain from sale of principal residence
Related Questions
Reviewed by Michelle Woodard, Tax Policy Analyst on February 28, 2026
This content is for educational purposes only and is not a substitute for professional tax advice. Consult a qualified tax professional for advice specific to your situation.