Sell or keep renting first home after losing capital gains exclusion?

We moved out of our house in early 2022 to take jobs across the country and have been renting it out since then. I know the $250k/$500k exclusion (we file jointly) requires living there 2 of the last 5 years, so since we moved out in early 2022, any sale after early 2025 already loses it entirely. We're trying to figure out if we should sell now while we might still qualify for a partial exclusion, or keep renting and eventually sell as a straight investment property. The gain would be somewhere north of $400k before depreciation recapture. I tried reading Publication 523 but got confused about whether the partial exclusion even applies when the reason for selling isn't a job change, health issue or unforeseeable event. Has anyone worked through this specific calculation?

32 comments

Publication 523 is the right starting point. The partial exclusion only applies when the primary reason for selling is a qualifying event: change in workplace location, a health issue or an unforeseeable event. If none of those apply, it's all or nothing on the exclusion. So the question becomes: has the 5-year window already closed on your 2 years of residence, which ended when you moved out?

Greg N.

Author

That's what I suspected. We moved out February 2022, so the 2 years of residence dropped out of the 5-year lookback around February 2025, and selling now we'd no longer meet it. The question is whether the rental income and depreciation we've been taking changes that math.

The rental period doesn't disqualify the exclusion by itself, but there are two catches worth knowing. First, any depreciation you claimed after May 6, 1997 can't be excluded regardless of the exclusion — that comes off the top and is taxed as unrecaptured section 1250 gain at up to 25%. Second, you have to allocate gain to any period of non-qualified use. But rental years after your last day living there aren't non-qualified use, so they don't make part of the gain taxable as long as you still meet the residence test.

Greg N.

Author

Wait, I hadn't thought about the non-qualified use piece at all. So since we moved out in early 2022 and a 2026 sale no longer meets the 2-of-5 test, we'd get no exclusion anyway, and the rental period after we moved out isn't non-qualified use?

Not quite. Time after your last day of residence isn't non-qualified use; only earlier periods (after 2008) when it wasn't your main home are allocated against the total ownership period. Publication 523 walks through the worksheet. Depreciation recapture is a separate and additional tax item on top of that.

Ran into this exact situation two years ago. The depreciation recapture alone was more than I expected because we'd been renting for three years and had been taking the full depreciation deduction each year. That gets taxed as ordinary income up to a certain rate, it doesn't get the long-term capital gains treatment. Make sure you've actually been tracking the accumulated depreciation on Form 4562 each year.

Greg N.

Author

We've been filing Schedule E each year with a CPA so the depreciation should be on our returns. I'll pull the last few 4562s to get the cumulative number before we decide anything.

Form 8949 and Schedule D are where the actual sale math lands when you eventually sell. I went through something similar last year — rented my first place for a few years before selling — and I uploaded the whole thing to taxr.ai. Taxr pulled out the non-qualified use fraction, the depreciation recapture amount, and what was actually excludable, and laid it out as a draft worksheet I could hand to my CPA to verify. Saved a lot of back-and-forth. The capital gains rate that applies to the taxable portion depends on your income in the year of sale, so that variable matters a lot to the "sell now vs. later" decision.

Greg N.

Author

Did it handle the split between the recapture portion and the long-term gain portion separately? That's the piece I keep getting confused about — they're taxed differently.

Yes, it listed the depreciation recapture as one line item taxed as unrecaptured section 1250 gain at up to 25%, and the remaining taxable gain (after the exclusion and non-qualified use allocation) as a separate long-term capital gains figure. Two different tax treatments, shown side by side.

Something people often miss: if you acquired this home in a section 1031 like-kind exchange within the past 5 years, you are not eligible for the exclusion at all, even if you meet the residence test. Publication 523 is explicit on that point. Assuming that doesn't apply here, the residency and ownership tests are the main gates.

Greg N.

Author

No 1031 involved, we bought it originally as our primary residence. Good to flag though.

Have you modeled what the tax bill actually looks like in each scenario? Sell in 2026 with partial exclusion vs. keep renting until 2030 and pay tax on the full gain? Sometimes the rental income over those additional years plus a lower eventual basis from more depreciation changes the answer.

Schedule D line 16 is where your net capital gain or loss lands, but before you get there the gain from a home sale with an exclusion has to run through Form 8949 first. If you got a Form 1099-S from the closing, you must report the sale on Form 8949 regardless of whether you have taxable gain or not. Code H in column (f) and the excluded amount as a negative in column (g).

Greg N.

Author

Good to know about the 1099-S triggering a required report. Our prior sales always involved a realtor who generated one, so I should assume we'd get one here too.

Pretty standard on any residential sale. The title company or closing agent typically generates it. If you do get one, don't skip the Form 8949 entry even if the net taxable gain is zero.

The long-term capital gains rate that applies to your taxable gain depends on your taxable income in the year of sale. If you're deciding between selling in 2026 vs. 2027 or later, your income situation that year matters. The IRS rate tables in the Schedule D instructions are the reference point, not a fixed number anyone here should quote.

Publication 551 is worth checking for the basis side of this. Your adjusted basis isn't just what you paid — it includes improvements you made while you owned it, minus the accumulated depreciation deductions. I uploaded my closing disclosure and all my Schedule E returns from the rental years to Taxr and it built out a running adjusted basis calculation showing exactly how the depreciation was reducing my basis each year. That adjusted basis number feeds directly into the gain calculation on Form 8949.

Greg N.

Author

That adjusted basis piece is exactly where I've been fuzzy. I know depreciation reduces it but I haven't sat down to track it year by year from the original purchase price through all the improvements.

The improvements matter more than people think. A new roof or HVAC during the rental years adds to basis and partially offsets the depreciation drag. Worth tallying every capital improvement separately from repairs.

Are you thinking about a 1031 exchange as an exit strategy? If you're leaning toward keeping it as an investment property long term anyway, you could eventually exchange into another rental property and defer the gain entirely. You'd lose the exclusion path permanently by going that route, but deferral might beat paying tax now.

Greg N.

Author

We've thought about it. The problem is we don't want to become long-term landlords — this was always meant to be a bridge. So the 1031 route would just kick the can down the road.

The 2-of-last-5-years test: the 24 months don't have to be consecutive, they just have to fall within the 5-year window before the sale date. So if you moved out in February 2022 and you sell in January 2027, the 5-year window runs back to January 2022 and you'd have only about a month of residence in it — the window stopped holding 24 months around February 2025. Worth counting the days precisely before you decide on a sale timeline.

Greg N.

Author

That's a really practical point. I need to look at the actual move-out date vs. the closing date and count carefully rather than just thinking in years.

Publication 523 has a step-by-step eligibility test that walks through the ownership and residence periods. The day you stop using it as your main home doesn't start a non-qualified use clock — time after your last day of residence isn't non-qualified use.

Publication 550 on irs.gov lays out the capital gain holding period rules cleanly. For any gain that is taxable after the exclusion and non-qualified use allocation, your holding period for the home determines whether it's long-term or short-term. Given that you've owned this for several years it will almost certainly be long-term, and the depreciation portion is then taxed as unrecaptured section 1250 gain at up to 25%, not as ordinary income.

Is keeping it as a rental until values rise more even on the table, or have you already decided you want out?

Greg N.

Author

We want out within the next 18 months or so. Since the 2-of-5 window already closed on our residence, the question is really whether selling soon vs. waiting changes anything when it's a pure investment sale either way.

The non-qualified use fraction calculation is the part most people get wrong. It's the period of non-qualified use divided by the total period you owned the home. That fraction applies to the total gain (before the exclusion), so the exclusion only shelters the remaining portion. The two calculations interact and you have to do them in the right order.

Worth adding: the period after your last day of qualified use through the sale date is not non-qualified use. Time you lived there before renting it is not either. So your rental period from early 2022 forward doesn't count, and your years of living there before 2022 do not add to the non-qualified use fraction.

Given the gain you're describing and the interaction of non-qualified use, depreciation recapture and potentially losing the exclusion, this is a situation where running the numbers with a CPA before you list it makes sense. The sell-now vs. later decision can have a meaningful difference in tax outcome and an enrolled agent or CPA who handles real estate dispositions would be the right person to model it.

Greg N.

Author

Agreed. I think I have enough from this thread to go into that conversation informed — I know to ask about the non-qualified use fraction, the accumulated depreciation, and what the adjusted basis looks like before we even talk about the exclusion.