Primary residence capital gains exclusion after living 6 years then renting 2 years

Selling my house next spring and trying to figure out where I stand on the Section 121 exclusion. Lived there as my primary residence for 6 full years, then moved out and rented it for 2 years. Total ownership is 8 years. I know the basic rule is 2 out of the last 5 years, and I'm pretty sure I still qualify since I lived there 2 of the last 5 years before the sale — but I'm reading conflicting things about depreciation recapture eating into it and whether the nonqualified use period changes anything. Already looked at IRS Publication 523 and got more confused about the nonqualified use rules. Gain is substantial so this matters a lot. Does the 2-year rental at the end create a nonqualified use problem, and how does depreciation recapture fit in?

32 comments

Section 121 says you need to have owned and used the home as your primary residence for at least 2 of the 5 years ending on the sale date. Six years of living there, two years renting — you clear the ownership and use tests easily. The rental period at the end is the part that needs attention, but you're not automatically disqualified from the exclusion.

Marcus T.

Author

That's what I thought but then I saw stuff about nonqualified use and panicked. So I do still get the exclusion, just maybe not on the full gain?

The nonqualified use rules under Section 121(b)(5) only apply to periods after December 31, 2008. And crucially, they only count periods before the qualifying use — not periods after. Rental periods that come after your last period of qualifying use are specifically excluded from the nonqualified use calculation. Your situation is 6 years primary, then 2 years rental. The rental came after, so it does not count as nonqualified use. You should be eligible for the full exclusion on the gain, subject to depreciation recapture.

Marcus T.

Author

This is the part I completely missed. The rental being after the primary use period means it doesn't trigger the nonqualified use reduction. That changes everything.

Worth underlining: if someone did the reverse — rented first, then moved in — those earlier rental years after 2008 would count as nonqualified use and reduce the excludable portion. Order really matters here.

Depreciation recapture is the piece that always bites people in your situation. Whatever depreciation you claimed (or were allowed to claim, even if you didn't) on Schedule E during the 2 rental years is taxed as unrecaptured Section 1250 gain, at a maximum rate of 25%. That portion is not sheltered by the Section 121 exclusion. Check Form 4562 and your Schedule E for each rental year to find the total depreciation taken.

I sold a place with almost the same timeline last year — primary for years, then rented it out. I uploaded my closing disclosure and Schedule E history to taxr.ai and Taxr pulled out the total depreciation allowed across both rental years, flagged the recapture amount separately from the excludable gain, and laid out which number goes where on Form 4797. That breakdown made it clear I owed recapture tax on the depreciation piece even though the rest of the gain was excluded. Worth doing before you finalize anything.

Marcus T.

Author

This is exactly the step I was missing — separating the recapture piece from the excludable gain before I assume my tax bill is zero.

Form 4797 is where the depreciation recapture gets reported. The recaptured amount is taxed as ordinary income, capped at 25% for unrecaptured Section 1250 gain. The rest of your gain — above the recapture and below the exclusion limit — is what Section 121 shelters. So three buckets: recapture, excluded gain, and anything above the exclusion limit if your gain is very large.

The 25% cap on unrecaptured 1250 gain is the max rate, not a flat rate. Your actual rate depends on your other income for the year. Just wanted to flag that.

Correct. It's taxed at your ordinary income rate up to 25%, not automatically at 25%. Good clarification.

What's your filing status? The Section 121 exclusion is up to $250,000 for single filers and up to $500,000 for married filing jointly (both spouses must meet the use test for the full $500,000). If your gain net of recapture is under that limit you likely owe nothing beyond the recapture tax.

Marcus T.

Author

Filing jointly. Gain before recapture is probably around $380k so the $500k MFJ limit should cover the non-recapture piece entirely. The recapture is what I need to calculate carefully.

Don't forget to calculate your adjusted basis correctly before you figure the gain. Purchase price plus any capital improvements you made during the 6 years you lived there, plus any improvements during the rental period, minus the depreciation you took. Improvements are not deductible expenses; they increase basis and reduce your eventual gain.

Schedule E for each rental year should show the depreciation you deducted. If you used software those years, the asset worksheet inside the program will show accumulated depreciation. If you didn't depreciate during the rental and should have, the IRS treats you as if you did — the "allowed or allowable" rule — so you still have recapture exposure.

Marcus T.

Author

I did claim depreciation both years using software. So I have the Schedule E and Form 4562 for each year. That should give me the exact accumulated number.

Form 4562 Part III is where the MACRS depreciation for the rental is calculated year by year. Residential rental property depreciates over 27.5 years under MACRS GDS, so two years of deductions on the building value is what you're recapturing.

Just to be precise on the 27.5-year figure: that's the recovery period for the building and structural components. Land is never depreciable. So whatever portion of your original purchase price was allocated to land is excluded from the depreciable basis. If you didn't formally allocate when you converted to rental, your property tax assessment ratio is a common method people use.

The IRS can challenge an allocation that isn't supported by something — the contract, the assessment, an appraisal. Good to have a documented basis for whatever split you used.

Has anyone dealt with the situation where improvements were made during the rental period? Those go on Form 4562 as separate assets with their own depreciation, right? Asking because I'm in a similar spot and added a deck during the rental years.

Improvements made during the rental period are listed as separate assets on Form 4562. A structural improvement like a deck takes the same 27.5-year recovery period as the main residential rental property. The depreciation on the improvement is also subject to recapture when you sell. I had a similar question sorting out my own rental conversion and ran it through Taxr — it read through my Form 4562 and listed each asset, its recovery period, and the accumulated depreciation on each one separately so I could see the total recapture exposure before filing.

That's the clarification I needed. So the deck doesn't get a shorter recovery period just because it's an improvement — it follows the building's 27.5 years.

Exactly. The rule is that an addition or improvement takes the same recovery period as the property it's made to. For residential rental, that means 27.5 years regardless of when the improvement was placed in service during the rental period.

On the sale mechanics: you report the sale on Form 4797 for the depreciation recapture portion and on Schedule D / Form 8949 for any remaining capital gain. The Section 121 exclusion is applied on Form 8949 — there's a column for adjustments and you enter the excluded amount there. The instructions for Form 8949 walk through how to code the exclusion.

When I sold my rental conversion last year I was confused about which numbers belonged on 4797 versus 8949. I pasted my settlement statement and depreciation schedules into Taxr and it drafted a step-by-step worksheet showing the recapture amount on 4797, the excluded gain on 8949, and what the net taxable amount would be. I reviewed the numbers against my actual forms before my CPA looked at it and we were lined up. For a sale with this much gain I'd still have a CPA or enrolled agent review the return.

Marcus T.

Author

Having that worksheet before the CPA meeting sounds like it would save a lot of back-and-forth. I'll do that before my appointment.

One thing worth confirming: the 2-out-of-5-years test is measured from the actual closing date of the sale, not the date you list it or accept an offer. If your closing slips into next year make sure the math still works. Six years primary ending 2 years before closing still passes, but it's worth double-checking the exact dates.

Marcus T.

Author

Good point. Closing is targeted for April so I still comfortably have primary use through 3 years ago. I should write down the exact move-out date and have it ready.

Form 4797 Part III is specifically for section 1245 and 1250 property. Residential rental is 1250 property. The unrecaptured 1250 gain flows from there to the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions. That worksheet determines how much of your capital gain is taxed at the higher rate. Walk through that worksheet carefully; it's easy to miss.

To summarize where this thread has landed: you clear the Section 121 ownership and use tests, your rental period after qualifying use doesn't create nonqualified use, your MFJ exclusion covers the non-recapture gain up to the limit, and the only real tax exposure is the depreciation recapture which goes through Form 4797 and the unrecaptured 1250 worksheet. Get the exact accumulated depreciation from your Form 4562s and you'll know the number.

Marcus T.

Author

This is a genuinely useful summary. I came in thinking I might owe tax on the whole gain. Now I know it's just the recapture piece, which I can calculate from the two years of Form 4562s I already have. Going to get a CPA to review the actual return given the size of the gain, but at least I understand the structure now.

For anyone who wants to read the nonqualified use exception directly, Publication 523 on irs.gov covers it. The specific carve-out for post-qualifying-use periods is in the nonqualified use section there. Reading the IRS source alongside this thread should clear up any remaining confusion.