Home sale capital gains exclusion after renting out former primary residence — does the rental period kill it?

Sold my house last month. Lived there as my main home for about 3 years, then rented it out for the last 2 years before selling. Total gain is significant. I know there's a home sale exclusion but I wasn't sure if the rental period disqualifies me or just reduces what I can exclude. My broker sent me a Form 1099-S so I know I have to report the sale somewhere. I read something about "nonqualified use" cutting into the exclusion but I can't figure out how that applies here. Do I still qualify for any exclusion at all, and how does the rental period factor in? Also do I report this on Form 8949 or directly on Schedule D? I've been going back and forth on this and want to get it right before I file.

35 comments

Form 8949, Part II is where this goes since it's a long-term asset — you check box F because you received a Form 1099-S. You enter the proceeds in column (d), your adjusted basis in column (e), use code H in column (f), and put the excluded gain as a negative number in column (g). Whatever gain remains after the exclusion flows to Schedule D.

Leah K.

Author

That part about code H and the negative number in column (g) is exactly what I was confused about. So the excluded portion just cancels out in column (g) and only the taxable portion ends up on Schedule D?

Exactly right. The net in column (h) is just your taxable gain after the exclusion. If the exclusion covers everything, that net can be zero, but you still have to show the transaction on Form 8949 because of the 1099-S.

Worth clarifying the ownership and use test. You need 24 months of ownership AND 24 months of use as your main home during the 5 years before the sale — the 24 months don't have to be a single continuous block. For a single filer the exclusion caps at $250,000; married filing jointly caps at $500,000, but you'd need to check the Publication 523 page on irs.gov for the exact current figures since phase-outs and limits can be nuanced.

Leah K.

Author

I owned it about 5 years total, lived there for the first 3, so I definitely hit 24 months of residence and ownership. Good to know the 24 months doesn't have to be continuous.

Also worth noting: for a joint return only one spouse has to meet the ownership requirement, but both spouses have to meet the residence requirement separately. Different facts, different answer.

The nonqualified use question is the tricky part here. Periods of nonqualified use are time you didn't use the home as your main home AFTER 2008 — but there's an important exception: any period after the LAST day you used it as your main home is NOT counted as nonqualified use. So if you lived there first and then rented, that rental period at the end does not reduce your exclusion under the nonqualified use rules.

Leah K.

Author

Wait, this is the key thing I was missing. The rental was AFTER I stopped living there, so that rental period doesn't count as nonqualified use? That's a huge relief. I was worried the whole gain would be exposed.

Correct. The nonqualified use rule bites when you rent BEFORE moving in as your primary residence, not after. Your situation — lived there first, rented at the end — is actually the more favorable one under current rules.

I want to add one caveat: depreciation recapture on the rental period is a separate issue from the exclusion. Any depreciation you claimed (or were allowed to claim) during the rental years is not covered by the home sale exclusion and is taxed as unrecaptured section 1250 gain at a maximum 25% rate. That part is taxed regardless.

I ran into almost this exact situation last year. Uploaded my closing disclosure, the depreciation schedule from my rental years, and my draft return to taxr.ai and it identified which depreciation amounts weren't covered by the exclusion and laid out exactly how the recapture would show up versus the excluded gain. Really helped me see the split before I handed everything to my CPA.

Leah K.

Author

The depreciation recapture piece is what I haven't fully worked out yet. I did claim depreciation for two rental years. Good to know that part stays taxable no matter what.

Schedule D line 8a is only available under Exception 1 — transactions reported on a 1099-B with basis reported to the IRS and no adjustments needed. A home sale with a 1099-S and an exclusion doesn't qualify for that shortcut. You have to go through Form 8949.

Confirmed. Exception 1 is strictly for 1099-B transactions with no column (g) adjustments. A 1099-S home sale with a code H exclusion always goes on Form 8949 first.

Depreciation recapture on a home converted to rental: the recapture amount is the lesser of your total gain or the total depreciation allowed or allowable during the rental period. "Allowable" is the key word — the IRS can recapture depreciation you were allowed to take even if you didn't actually claim it. Worth pulling your prior Schedule E filings to confirm the total.

Leah K.

Author

I did claim it both years on Schedule E so at least I know the number. Didn't realize the IRS could recapture depreciation you forgot to take — that's a bit alarming.

Depreciation allowed or allowable has tripped up a lot of people. If you missed it in a prior year you can file a Form 3115 to catch up, but that's a separate step and probably worth running by an enrolled agent before you do it.

Publication 523 on irs.gov is the main resource for home sale exclusion rules. It has a step-by-step eligibility test, the ownership and residence requirements, and covers partial exclusions. Worth reading the "Reporting Your Home Sale" section specifically since you have a 1099-S.

Also check whether you excluded gain on another home sold in the 2-year period before this sale. If you did, you can't use the exclusion again here — the 2-year look-back applies per taxpayer.

Leah K.

Author

No prior home sale in the last two years, this is the only one. But good flag for anyone else reading this.

Form 8949 Part II with box F — I had a nearly identical situation, former primary converted to rental, 1099-S received. I gave Taxr my closing statement, my depreciation worksheets from two rental years, and the Form 1099-S to check whether my column (g) adjustment was right. It went through each number, confirmed the excluded portion, and flagged the recapture amount separately so I could see what was taxable before I filed.

Leah K.

Author

This is helpful to hear from someone who actually went through it. The column (g) calculation is where I keep second-guessing myself — good to know there's a way to check the math before filing.

The negative number in column (g) has to exactly match the excluded gain — not the total gain, just the excludable portion. If you have recapture it reduces what qualifies for exclusion so you can't just put the entire gain in column (g) as a negative.

Section 1031 exchange note: if you got this property through a like-kind exchange within the past 5 years, you are not eligible for the home sale exclusion at all. Probably not your situation given what you described but worth confirming.

Leah K.

Author

Straight purchase, no 1031 involved. But I didn't know that rule existed — good to flag.

The holding period question: for long-term treatment you need to have held the property more than 1 year. The count starts the day after you acquired it, and the day you sold it counts as part of the holding period. You mentioned about 5 years total so long-term is clearly not an issue here, but someone with a shorter ownership window should double-check.

Partial exclusion might be relevant to others reading this thread even if not to the original poster. If you don't meet the full 24-month use test, a partial exclusion can apply if the main reason for the sale was a job relocation, a health issue, or an unforeseeable event. The fraction is the number of qualifying months divided by 24. Publication 523 has the details on what qualifies.

The partial exclusion is often overlooked. People assume they either qualify fully or not at all, but the pro-rata partial exclusion can still shelter a meaningful chunk of gain in the right circumstances.

One thing to get right on basis: your adjusted basis in the home isn't just the purchase price. It includes improvements made over the years but is reduced by any depreciation claimed during the rental period. Using the wrong basis number will throw off both the gain calculation and the recapture amount.

Leah K.

Author

I have a rough basis number but I know I need to subtract the two years of depreciation from it. I also added a deck and replaced the roof while renting — those improvements actually increase basis, right?

Improvements increase basis, yes. Routine repairs and maintenance do not — only capital improvements that add value or extend useful life. Publication 551 on irs.gov covers basis adjustments in detail if you want to verify what counts.

Married filing jointly note: if the original poster or anyone in this thread is filing jointly, the exclusion limit is higher than for a single filer, but both spouses must each meet the 24-month residence requirement separately. The ownership requirement only requires one spouse to have owned it. The numbers are in Publication 523.

The capital loss limitation rules on Schedule D don't really apply here since there's a gain, but just for completeness: if someone ends up with a net capital loss after everything, the amount you can deduct against other income in a single year is limited — see Topic 409 on irs.gov and the Schedule D instructions for the current limit and carryover worksheet.

To pull together the reporting steps: figure your total gain (proceeds minus adjusted basis including depreciation reduction), determine the excludable portion based on the ownership and use test, subtract recapture which isn't covered by the exclusion, then report on Form 8949 Part II box F with code H and the excluded amount as a negative in column (g). The net taxable gain goes to Schedule D. If the numbers are large enough that recapture or the gain itself is significant, running this by a CPA is worth the cost.

Leah K.

Author

This is the clearest summary of the steps I've seen laid out in one place. The recapture piece is what I need to nail down but I think I have enough now to at least check my own numbers before meeting with someone.