What happens to depreciation when you sell a rental property?

Sold my rental house this year after owning it for 9 years and I'm trying to understand what happens to depreciation when you sell a rental property. I've been taking depreciation deductions every year on Schedule E, roughly the same amount each year. Now that I sold, my CPA mentioned something called "depreciation recapture" and that it gets taxed differently than the rest of my gain. I didn't fully understand what she meant. The property sold for more than I paid for it, so I know I have capital gain, but I don't understand how the depreciation piece gets separated out or what rate it gets taxed at. Do I owe tax on all the depreciation I took over the years even if I didn't make a huge profit? Trying to get my head around this before our next meeting.

40 comments

Did your CPA walk you through Form 4797 at all? That's where the sale of rental property gets reported, and the depreciation recapture flows through there. The basic idea is that the IRS wants back the tax benefit you got from those annual deductions.

Elena S.

Author

She mentioned Form 4797 briefly but we ran out of time. I didn't realize the recapture goes there rather than on Schedule D. That helps me know what to look at.

So depreciation recapture on residential rental property is "unrecaptured Section 1250 gain", which is still long-term capital gain but is taxed at a maximum 25% rate. It does NOT get the lower 0/15/20% preferential rates that the rest of your gain gets. Any gain above that recapture amount is then capital gain. I actually uploaded my closing settlement statement and all nine of my prior Schedule E pages to taxr.ai and it calculated exactly how much of my total gain was recapture versus capital gain, and flagged that my depreciation basis had been computed wrong in year 4. Worth doing before you finalize anything.

Elena S.

Author

Wait, 25% is the cap on the recapture portion? So if I'm in a lower bracket it could be less than 25%? And how did it catch the basis error — did it compare year over year?

Correct — the unrecaptured 1250 rate is capped at 25%, so if your ordinary income rate is lower, you use the lower rate. It compared each year's depreciation claimed against what the straight-line 27.5-year schedule should have produced and found a year where the number was off.

Are you sure you took depreciation every single year? Some people miss years or take different amounts. The IRS recaptures depreciation "allowed or allowable" — meaning even if you forgot to take it in a given year, they still treat it as if you did.

Elena S.

Author

I'm pretty sure I did but honestly I'm now second-guessing year 2 when I switched preparers. I'll have to pull those old returns.

That allowed-or-allowable rule catches a lot of people off guard. If you skipped a year of depreciation, you should have filed Form 3115 to catch it up — but that's a separate issue from the sale. At the sale you still owe recapture on the full amount allowable.

Has anyone here had to deal with improvements on top of the original basis? I added a new roof and an HVAC unit a few years in and I'm wondering how that affects things when I eventually sell.

Each improvement gets its own depreciation schedule, also over 27.5 years for structural items like a roof. When you sell, all of it gets pulled together — the original building basis plus each improvement's accumulated depreciation all gets recaptured.

So I'd have multiple lines of accumulated depreciation to add up. Good to know, I need to keep better records.

To make sure I understand the mechanics: you take the total depreciation you claimed over the years, subtract it from your original cost basis (adjusted for improvements and anything else), and that gives you your adjusted basis. Sale price minus adjusted basis equals your total gain. Then you separate that gain into the recapture piece (taxed at up to 25%) and the remaining piece (taxed at long-term capital gain rates if held more than a year). Is that the right sequence?

That's basically right. The adjusted basis is your original depreciable basis plus improvements minus total accumulated depreciation. The recapture is the lesser of your gain or total depreciation taken. If your gain is smaller than total depreciation taken, you only recapture up to the gain.

Elena S.

Author

This is the clearest the math has ever been laid out for me. So it's possible the recapture IS my entire gain and there's nothing left that gets the lower capital gain rate?

Exactly possible, yes. If total depreciation claimed equals or exceeds the gain, the whole gain is unrecaptured Section 1250 gain taxed at a maximum 25% rate. Only if your sale price rose well above original purchase price would there be leftover gain taxed at capital gain rates.

Does your state follow the federal recapture rules, or does it do something different? My state doesn't have a separate 25% bucket — it just taxes the whole gain as ordinary income. Worth checking before you assume your state bill matches the federal calculation.

Elena S.

Author

I hadn't even factored in state tax on this. I'll ask my CPA specifically about how our state handles the recapture separately.

One thing worth double-checking: did you ever use the property personally, even a little? Because if personal use days exceeded the threshold in any year, some of your deductions and your basis allocation could be affected. I had Taxr read through my Schedule E history and the closing disclosure side by side — it flagged that I'd reclassified the property partway through ownership and that the basis needed to be split. Really helped me walk into my preparer meeting knowing exactly which numbers to question.

Elena S.

Author

No personal use on mine, it was always rented at market rate. But good flag for anyone who had a vacation home they also rented out.

Is there any way to avoid or defer the depreciation recapture? I keep hearing people mention 1031 exchanges.

A 1031 exchange lets you defer both the capital gain AND the recapture by rolling the proceeds into a like-kind replacement property. The deferred recapture follows the new property's adjusted basis, so you're not eliminating the tax, just pushing it forward. Form 8824 is where the exchange gets reported.

So the recapture just carries into the next property's basis and you owe it eventually when you sell that one without exchanging again?

Right. Keep exchanging and it keeps deferring. Eventually when you sell without a 1031, everything comes due — or if you hold until death, heirs get a stepped-up basis and the deferred recapture may never be collected. That's a planning conversation worth having with a CPA.

Can the Section 121 exclusion ($250k / $500k for primary residence) offset any of the recapture if you lived in the rental for a period?

The Section 121 exclusion can apply to the gain on a former rental, but there are limits. Any depreciation taken after May 6, 1997 is NOT excluded by Section 121 — it's always recaptured regardless. So even if the remaining gain is sheltered by the exclusion, the recapture piece still gets taxed. The IRS is very specific on that point.

Ouch. So you can exclude the appreciation but not the depreciation benefit. That's the part people miss.

Where exactly on Form 4797 does the recapture show up? Is it Part II or Part III?

Residential rental is Section 1250 property held more than a year, so it goes in Part III of Form 4797. Part III calculates the gain and then the unrecaptured 1250 amount flows to the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions, where the 25% rate cap is actually applied.

Got it, so the actual tax rate calculation happens on the Schedule D worksheet, not on 4797 itself. I was confused about where the 25% cap got enforced.

Don't forget that depreciation recapture adds to your ordinary income for the year of the sale, which could push you into a higher bracket and affect other things — your Medicare surcharge, your ACA premium credits, capital gain rates on other investments. The ripple effects in a sale year can be significant.

Elena S.

Author

This is something I really didn't think about. The sale closes in December so it all hits in one tax year. I'm going to ask my CPA about whether the timing of closing matters.

Did you keep records of all prior Form 4562 filings? Those show the annual depreciation deductions year by year. If you're pulling together the total accumulated depreciation to verify what your CPA has, the 4562 from each year is the source document.

Elena S.

Author

I have most of them but I'm missing two years from early on. Can I reconstruct those from the Schedule E entries, or do I need the actual 4562?

Schedule E shows the depreciation claimed each year too, line 18. If you have all your Schedule E pages you can add up line 18 across each year to get your total accumulated depreciation. Cross-check it against what your CPA has in the adjusted basis calculation.

How does this work if the property was sold at a loss overall? Like sale price is below original purchase price but above adjusted basis because of all the depreciation taken?

If adjusted basis (after depreciation) is below sale price but sale price is below original cost, you still have recapture. You bought for X, depreciated down to Y, sold for Z where Y < Z < X. The gain over adjusted basis (Z minus Y) is recapture, even though you're below your original cost. No overall economic gain, but still a tax gain on the books.

That's the part that feels counterintuitive. You didn't make money relative to what you paid but you still owe tax because of the depreciation deductions you took along the way.

Publication 527 on irs.gov has a good section on depreciation and basis that's worth reading before your CPA meeting. It won't walk you through the sale specifically but it gives you the vocabulary to follow the conversation better.

Are you working with a CPA who handles rental property sales regularly? The recapture calculation, basis tracking across improvements, and state-level treatment are enough moving parts that if your preparer mostly does W-2 returns it's worth asking whether they've done several of these.

Elena S.

Author

She does handle real estate clients so I think I'm okay, but this thread has given me a list of specific questions to bring. I feel a lot more prepared than I did when I posted.