How to calculate depreciation recapture on rental property when you sell

Sold my rental house this spring after owning it for nine years and I'm completely lost on how to calculate depreciation recapture on rental property. I've been depreciating the building basis over 27.5 years on Schedule E every year, so I know there's accumulated depreciation sitting out there. When I plug the sale into the software it's spitting out a number on Form 4797 that seems higher than I expected and I can't figure out if it's right. I tried reading the Form 4797 instructions but got confused about the Part III section and where the recapture amount flows afterward. My cost basis was split at purchase between land and building per the closing docs. Am I supposed to add back every year of depreciation I ever claimed, even years I didn't use the full deduction because of the passive activity loss rules? That part especially confuses me.

37 comments

I sold a duplex two years ago and went through every bit of this. Yes, you add back all depreciation you were allowed or allowable to deduct, not just what you actually claimed. That "allowable" language is what stings people who skipped depreciation some years thinking they'd save money — the IRS counts it anyway when you sell.

Dana B.

Author

Wait so even the years I had passive losses suspended by Form 8582 and couldn't use the deduction, those years still count toward recapture?

Yes, the depreciation itself was still allowed even if the passive loss limited other deductions. Depreciation and the passive activity loss rules are separate calculations. Your Schedule E shows the depreciation each year regardless of whether the loss flowed through.

I had almost the identical question last year. I uploaded my closing statement, all nine years of Schedule E, and my original purchase settlement to taxr.ai and it worked through the accumulated depreciation year by year, flagged the land vs. building allocation, and showed me exactly what number belongs on Form 4797 Part III line 22. That draft gave me something concrete to hand my CPA for the final return. Saved a lot of back-and-forth.

Dana B.

Author

An organized summary like that would save me, honestly. My records are scattered across folders and I keep second-guessing the running total.

The land piece is easy to miss. If your original contract or appraisal showed a split, only the building portion depreciates, so your recapture can't include anything allocated to land. Worth double-checking your basis from year one.

The mechanics on Form 4797: for residential rental property sold at a gain, you go through Part III first. Line 20 is your gross sales price, line 21 your cost or other basis plus improvements, line 22 is prior depreciation. The adjusted basis on line 23 (line 21 minus line 22) gives you the total gain on line 24, and with straight-line MACRS on a residential rental there's no Section 1250 additional depreciation, so none of it is ordinary income. The depreciation portion of the gain is unrecaptured Section 1250 gain, a capital gain taxed at a maximum 25% rate — it doesn't go back to your regular rate like Section 1245 property would.

Does the 25% rate always apply or does your regular rate matter?

Your regular rate matters. The 25% is a ceiling on the unrecaptured Section 1250 gain, not a flat rate for everyone. If your ordinary income rate is below 25%, you pay the lower rate. The Form 4797 instructions and the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions walk through it.

My accountant made me pull every Form 4562 from the nine years I owned the property to verify the accumulated depreciation matched what we were claiming on recapture. If you don't have them, your tax transcripts will show the Schedule E figures each year. Worth doing before you finalize anything.

Dana B.

Author

I have most of them but I think one year I filed late and I'm not sure the software saved the PDF. Good call to verify against transcripts.

One thing people overlook: capital improvements you made during ownership get added to basis and depreciated separately, often as new 27.5-year assets starting the year placed in service. Each improvement has its own depreciation schedule. When you sell, all of those accumulated amounts roll into the recapture calculation too.

Dana B.

Author

I replaced the roof in year four. I'm guessing that's on a separate line in my Form 4562 with its own starting point?

Yes, exactly. A new roof on a residential rental takes the same 27.5-year MACRS GDS recovery period as the original building. It starts its own depreciation clock from when it was placed in service, so you'd have partial years of depreciation on it depending when in the year you did it.

Went through a sale last fall where I had both the main house and a detached garage listed as separate assets. I pasted my entire depreciation schedule into Taxr and it sorted the assets, calculated the remaining basis on each one, and listed the total allowed depreciation per asset going into the recapture figure. Helped me catch that one improvement had been entered with the wrong placed-in-service date going back to year two.

Dana B.

Author

A wrong placed-in-service date would throw off the whole depreciation total for that asset. Glad you caught it before filing.

Right, and catching it before sale is a lot easier than amending. The depreciation on Form 4797 has to reflect what was allowed or allowable, so accuracy on those dates matters.

Don't forget your selling expenses — broker commissions, transfer taxes, legal fees directly related to the sale — those reduce your amount realized and therefore reduce the total gain before you even get to the recapture split. People often run the recapture number on the gross price and then wonder why the final tax is lower than they feared.

Dana B.

Author

Oh that's a good point. I was using the gross sale price. I'll back out the commission and the transfer taxes first.

I got confused about where the gain ends up on Form 1040. With straight-line residential rental there's no ordinary income piece: the gain flows from Form 4797 Part III to Part I, then carries to Schedule D and finally to Form 1040. The capital gain portion that exceeds the unrecaptured Section 1250 amount gets the preferential rate treatment. The unrecaptured Section 1250 piece is figured on the worksheet in the Schedule D instructions and entered on Schedule D line 19, so you can see it separately.

To add to what someone said above about passive losses: when you sell the property, any suspended passive activity losses that never got used due to Form 8582 limitations are released in the year of sale. You can deduct them in full in that year against any income, not just passive income, as long as it's a fully taxable disposition to an unrelated party.

Dana B.

Author

That's actually good news. I have years of suspended losses sitting in Form 8582. So those get freed up and offset some of the gain in the sale year?

Yes, they offset income in the year of the fully taxable disposition. They don't directly reduce the recapture amount on Form 4797 — that's a separate calculation — but they reduce your overall taxable income for the year and can offset the tax that the recapture generates.

I uploaded my nine-year depreciation schedule and the closing disclosure to Taxr and it built me a complete summary showing total allowed depreciation by asset, the recapture amount going into Form 4797, and how much of the remaining gain would be unrecaptured Section 1250 versus long-term capital gain. I reviewed everything and then handed it to my enrolled agent to file. That split between the 25% unrecaptured Section 1250 portion and the rest of the capital gain was what I kept getting wrong on my own.

The split between unrecaptured Section 1250 gain and the rest of the capital gain is exactly where people go wrong. Form 4797 Part III does the work but you have to have the right accumulated depreciation figure going in or the whole thing is off.

If you owned the property for more than a year the gain above the recapture amount should qualify for long-term capital gain treatment. The recapture piece (the total depreciation previously allowed or allowable) is what gets treated as unrecaptured Section 1250 gain up to the amount of the actual gain — still capital gain, but taxed at that capped 25% rate. Any gain beyond that is long-term capital gain.

Something worth checking: did you ever do a cost segregation study? If personal property components were depreciated faster under a shorter MACRS life (5 or 7 year), those components would actually be Section 1245 property and the recapture rules are slightly different — full recapture as ordinary income without the 25% cap. Residential rental buildings themselves are Section 1250 but mixed depreciation schedules complicate it fast.

Dana B.

Author

No cost segregation, I just depreciated the whole building as one asset. So I think I'm squarely in Section 1250 territory with the 25% ceiling.

That simplifies things. One asset, one depreciation schedule, all Section 1250 recapture. The roof is Section 1250 too since it's a structural component. You should be dealing with just the two: original building and the roof improvement.

My situation was messier because I had a year where I claimed bonus depreciation on appliances I bought for the unit. Those are 5-year property and fall under Section 1245, so the full depreciation on those pieces was recaptured at ordinary income rates, not capped at 25%. Worth separating if you ever added appliances as separate assets.

Dana B.

Author

I think I just included appliances in the building basis and never broke them out separately. Would that mean they're treated as 1250 property in my case?

If you never separated them on Form 4562 and just treated everything as the 27.5-year building, the IRS will generally treat the whole thing as Section 1250 property. Not the most efficient outcome if bonus depreciation was available but it does simplify the recapture. Something to do differently on a future property.

The IRS's Publication 527 at irs.gov covers rental property depreciation thoroughly including the MACRS recovery periods. For the sale itself the Form 4797 instructions are the clearest guide I've found — they walk you through exactly which Part to use depending on whether you have a gain or a loss and whether the property qualifies as Section 1231.

One scenario nobody has mentioned: if your sale price is less than your adjusted basis (a loss), there's no depreciation recapture because there's no gain. You'd have a Section 1231 loss instead, which is fully deductible against ordinary income. Recapture only bites when you have a gain, and only up to the lesser of the gain or the total depreciation allowed.

Dana B.

Author

I definitely have a gain, the market in my area ran up a lot. But good to know the recapture is capped at the actual gain amount — I was worried it could somehow exceed what I netted.

For what it's worth: when my numbers got complicated I brought in a CPA who specializes in real estate transactions. The recapture and the released passive losses interacting in the same year, plus installment sale questions I had, made it worth the professional fee. If the numbers are large enough that a mistake would be painful, that's when I'd say get someone who does this every day — a real estate CPA or an enrolled agent.

Dana B.

Author

That's probably where I'm headed. I feel like I understand the pieces now after this thread but I want someone to sign off on the final numbers before I file.