How to calculate depreciation recapture on sale of rental property

Sold my rental house this year after owning it for 9 years. I know I owe depreciation recapture but I can't figure out how to actually calculate it. I've been depreciating the building (not land) on Schedule E every year using the 27.5-year MACRS schedule. When I go to report the sale, do I add up all the depreciation I took across those 9 years and that whole amount gets taxed at 25%? Or is there some other calculation? I'm also confused about where this shows up — Form 4797 or Schedule D or both? I tried reading through the Form 4797 instructions but got lost on Part III vs. the unrecaptured section 1250 gain. If anyone has walked through this I'd really appreciate a clear breakdown of the steps.

38 comments

Form 4797 is where the sale of the rental property is reported. Part III (line 19) is where depreciable real property sold at a gain lands first. The key number you need is your accumulated depreciation — every dollar you deducted on Schedule E over those 9 years. That total is your "depreciation allowed or allowable" and it goes on line 22 of Part III.

Eric C.

Author

Thanks, so I pull that number from my prior year Schedule E returns and add them up? Or is there a single place it accumulates?

You need your adjusted basis first. Start with what you paid for the whole property (building and land together), add any capital improvements, then subtract all accumulated depreciation. That gives you adjusted basis. Sale price minus selling costs minus adjusted basis equals your realized gain. Then the depreciation recapture piece is carved out of that total gain.

Eric C.

Author

Got it. So the gain splits into two parts — the recapture piece and anything above that?

Exactly. The portion of gain equal to your accumulated depreciation is unrecaptured Section 1250 gain, taxed at a max rate of 25% for most people. Any gain above that (above your original purchase price essentially) is long-term capital gain at regular LTCG rates. Form 4797 and Schedule D work together to sort this out.

One thing that caught me off guard — "depreciation allowed or allowable." Even if you forgot to take depreciation in a year, the IRS treats it as if you did. So if you skipped a year on Schedule E, that year still counts against your basis and still shows up in the recapture calculation.

This is really important. I had a preparer miss two years of depreciation and when we sold, the adjusted basis was still reduced by those years. We had to fix the prior returns with Form 3115 before the sale closed.

Eric C.

Author

Yikes, glad I asked. I think I've been consistent but I'll double-check each year's Schedule E before I file.

I ran into this same situation last spring. I uploaded my closing disclosure, all nine years of Schedule E, and my depreciation schedules to taxr.ai and it built out the full gain calculation — split the land from the building, summed the accumulated depreciation, and drafted the Form 4797 Part III worksheet so I could see exactly where each number came from. Saved me from making a guess on the adjusted basis. I still had a CPA review the final return but at least I understood what I was handing her.

Eric C.

Author

That's really helpful to know. I have all my old Schedule E's so I might try that before I meet with anyone.

The two forms work like this: Form 4797 Part III calculates the ordinary income portion (which for Section 1250 property is usually zero or very small under current rules — the recapture is mostly "unrecaptured" not ordinary). The unrecaptured Section 1250 gain flows to the Schedule D Unrecaptured Section 1250 Gain Worksheet. That worksheet determines how much of your capital gain is taxed at the 25% ceiling rate.

Worth clarifying: for residential rental property, actual Section 1250 recapture as ordinary income is generally zero when you use straight-line depreciation (which MACRS GDS requires). The 25% rate applies to the unrecaptured gain worksheet amount, not to ordinary income lines on Form 4797.

Eric C.

Author

So Form 4797 Part III still needs to be filled out even if ordinary income recapture is zero?

Yes. Part III is the entry point. It computes the gain, confirms depreciation taken, and the numbers carry to Part I and then over to Schedule D. The unrecaptured Section 1250 Gain Worksheet on Schedule D picks it up from there.

Don't forget selling costs — commissions, transfer taxes, attorney fees — reduce your amount realized. I almost forgot the title company fees the first time I did this and my gain came out overstated by several thousand dollars.

Same. The HUD-1 or closing disclosure lists almost all of it. I just went line by line and pulled what counts as a selling expense.

If you made improvements over the years — new roof, HVAC replacement, added a deck — those get added to basis AND depreciated separately. Each improvement starts its own 27.5-year depreciation schedule from when it was placed in service. So your accumulated depreciation might be spread across several assets on Form 4562, not just one number.

Eric C.

Author

I did replace the furnace in year 4. I've been depreciating it separately. So I include that depreciation in my recapture total too?

Yes, all accumulated depreciation on all assets related to the property gets rolled into the total for recapture. When you sell the property, all those component assets are considered disposed of.

Before anything else, get your land-versus-building split right, and the depreciation basis rules on irs.gov lay that out in detail — specifically how to split land from building and what counts toward your depreciable basis. Worth reading before you fill out 4797 so your starting number is right.

The Section 121 exclusion question sometimes comes up here — if you ever lived in the property as your primary residence, part of the gain might be excludable. But depreciation recapture is not excludable under Section 121, even if you meet the 2-of-5-year use test. That recapture amount still gets taxed.

This trips a lot of people up. They move back in for two years thinking the whole gain disappears and then find out the depreciation taken during rental years is fully taxable regardless.

Eric C.

Author

Purely a rental for me, never lived there, so this doesn't apply — but good to know for the future.

When I sold my duplex two years ago I had no idea how much accumulated depreciation I'd taken. I fed my Form 4562 from each year into Taxr and it read through each asset line, confirmed the placed-in-service dates, and totaled the depreciation allowed for each component. Then it mapped which number goes on line 22 of Form 4797 Part III. That part alone would have taken me hours to sort out manually.

Eric C.

Author

Thanks — I have Form 4562 for most years. This is making the process feel a lot more manageable.

State taxes matter too. Some states don't follow federal depreciation rules or have their own recapture rules. If your rental is in a state with an income tax, check whether your state starts with federal adjusted gain or recomputes depreciation independently.

Eric C.

Author

Good call. My rental is in a different state from where I live so I'll need to file a nonresident return there too.

Nonresident rental sale income is sourced to the state where the property is located, so yes, that state gets to tax the gain including any recapture. Some states have their own depreciation recapture rates, so check the nonresident instructions carefully.

The order of operations matters. Calculate adjusted basis first (cost + improvements − accumulated depreciation). Then amount realized (sale price − selling costs). Then total gain. Then split: unrecaptured Section 1250 gain = accumulated depreciation (capped at total gain). Anything above that = regular long-term capital gain.

This is probably the clearest step-by-step in this thread. The cap part is important — if your total gain is less than your accumulated depreciation, the unrecaptured Section 1250 gain is capped at total gain, not the full depreciation amount.

I had Taxr go through my closing disclosure and my depreciation schedule side by side when I sold a rental condo last year. It flagged that I had entered the land value incorrectly in year one and had been depreciating too large a basis for years. That changed the adjusted basis and the recapture number significantly. I corrected it on Form 3115 before filing. Worth checking your original basis split carefully.

Eric C.

Author

Wow — so an error on the original basis can follow you all the way to the sale. I'll pull my original purchase contract and check how I allocated land vs. building back when I first set it up.

Exactly. Publication 527 says the depreciable basis is the cost of the building only, not the land. If you used assessed value ratios to split them and the county assessment was wrong, it flows through every year of depreciation.

Form 4797 instructions walk you through each line of Part III pretty clearly. Line 20 is gross sales price, line 21 is cost or other basis plus expense of sale, line 22 is depreciation allowed or allowable, line 23 is adjusted basis. The gain on line 24 feeds into the Part I summary.

Eric C.

Author

Thank you — I'm going to pull the Form 4797 instructions and go line by line using this thread as a guide.

If your gain is large enough that the tax hit is significant, it might be worth talking to a CPA or enrolled agent before you file. Depreciation recapture combined with state tax on a nonresident return can get complicated fast, and an error in basis or accumulated depreciation on a large gain return is exactly the kind of thing that draws IRS attention.

Eric C.

Author

Agreed. I think I'll do the worksheet myself first to understand the numbers, then bring everything to a CPA to review before I file.

About Publication 527 — the depreciation section lays out the 27.5-year MACRS GDS recovery period for residential rental buildings and explains how improvements like a furnace replacement take the same recovery period as the property it's attached to. That helps confirm what your basis and accumulated depreciation should look like before you get to 4797.