How to calculate capital loss and depreciation recapture selling rental property

Finally sold my rental condo this year after holding it for about nine years. The sale price came in lower than what I paid, so I'm expecting a capital loss, but my CPA mentioned something about depreciation recapture still being taxable even when you sell at a loss overall. That part completely confused me. I've been depreciating the property on Schedule E every year, and now I need to figure out how the two things interact when I sit down to do the return. I've looked at Publication 544 and started reading about Section 1250 but honestly I'm getting lost in the unrecaptured depreciation language. Can someone walk through how to figure out the capital loss and whether depreciation recapture actually applies here when the total sale is at a loss compared to what I paid?

41 comments

Schedule D and Form 4797 are the two forms you're working with here. The sale of a rental property doesn't just go on Schedule D alone — depreciable real property used in a trade or business and held more than a year goes on Form 4797 Part III if it's sold at a gain (then the gain flows to Part I), but if it's sold at a loss it goes directly in Part I. The critical number is your adjusted basis, which is your original purchase price plus improvements minus all the accumulated depreciation you claimed (or were allowed to claim) over the years. That adjusted basis is what gets compared to the amount realized on the sale.

Kevin M.

Author

So the depreciation I took on Schedule E every year reduces my basis even if I'm selling below what I paid? That's the part that's biting me I think.

Yes, exactly. Every year of depreciation you deducted lowered your adjusted basis. So your "loss" compared to original purchase price may not look like a loss once you subtract all that accumulated depreciation from your basis. The comparison on Form 4797 is against adjusted basis, not what you originally paid.

Form 4797 Part III is where the math happens for depreciable real property sold at a gain. You enter the gross sale price, the cost or other basis plus expense of sale, depreciation allowed or allowable, and it calculates the gain from there; if the property was sold at a loss, it goes directly in Part I instead. The depreciation recapture under Section 1250 for real property is a bit different from Section 1245 property — for most residential rental property the "additional" recapture is zero because straight-line depreciation was used, but the unrecaptured Section 1250 gain (the portion of gain attributable to depreciation) is still taxed at a higher rate than regular long-term capital gain rates when there IS a gain.

Kevin M.

Author

This is helpful. So if I actually end up with a loss on Form 4797 after comparing sale price to adjusted basis, there's no recapture at all?

Correct — Section 1250 recapture and unrecaptured Section 1250 gain only apply when there is a recognized gain. If Form 4797 shows a loss after the adjusted basis calculation, recapture doesn't come into play. The loss then flows to Form 4797 Part I and can offset other income, with limits if it's a passive activity loss.

The adjusted basis piece is where most people get tripped up. Your purchase price isn't your starting basis number — you also add in settlement costs at purchase (title fees, legal fees, etc.), any capital improvements you made over the years, and then you subtract all depreciation you claimed on Schedule E. If you didn't take depreciation in some years but were entitled to it, the IRS says "allowed or allowable" — meaning you have to subtract what you could have taken even if you didn't. That can be a painful surprise.

The "allowed or allowable" rule is real and people skip over it. Worth pulling every prior Schedule E to add up the depreciation column before you do anything else.

Kevin M.

Author

I've been taking depreciation every year so at least that part is clean. Nine years of Schedule E entries I need to total up.

Form 4797 Part III line 20 through line 24 lays out the full sequence: gross sales price, basis plus expense of sale, depreciation, adjusted basis, and the resulting gain (a loss goes directly in Part I). I uploaded my closing disclosure and all my prior Schedule E pages to taxr.ai and it added up my accumulated depreciation, calculated my adjusted basis, and drafted a line-by-line walk through of Form 4797 Part III for my situation. Saved me from doing all that arithmetic wrong. The numbers it produced matched what my preparer came up with. Worth trying if you have all your documents in one place.

Kevin M.

Author

Did it handle the part where the loss interacts with passive activity rules? That's the next layer I haven't even gotten into yet.

Yes — it flagged that my loss would need to go through Form 8582 first because of passive activity rules, and laid out which prior suspended losses might free up. It didn't file anything or contact anyone, just showed me the flow so I could hand my preparer a clear picture.

Passive activity loss rules are a whole separate issue to layer on top. If you were a passive investor in this rental (rentals are passive for most people unless they qualify as a real estate professional and materially participate; active participation only gets you the special allowance, it doesn't make the rental nonpassive), any loss from the sale generally releases all your suspended passive losses from prior years on that property. Form 8582 is where that calculation lives. The released loss can then offset other income, subject to the basis and at-risk rules.

Real estate professional status changes this significantly — worth knowing which bucket you're in before you assume the loss is fully usable in the year of sale.

Kevin M.

Author

Definitely a passive investor on my end. Good to know the full suspended losses release on disposition — I might have a few years of those sitting there.

One thing to get clear before you even open Form 4797: land value. You don't depreciate land, so when you figure your depreciable basis at purchase you had to allocate some of the price to land. That land allocation reduces how much you depreciated but also stays in your basis as-is. When you sell, your total adjusted basis includes the land portion (undepreciated) plus the structure portion (reduced by depreciation). Make sure your original depreciation schedule shows what you used for the land allocation.

Good catch — a lot of people forget land is never depreciated and doesn't reduce basis the same way. This matters a lot when you're figuring total adjusted basis at sale.

Schedule D versus Form 4797 split also depends on whether you have any Section 1231 losses. Net Section 1231 losses flow to Form 4797 Part II and are treated as ordinary losses (which is actually better than a capital loss). Net Section 1231 gains, on the other hand, get capital gain treatment. The 5-year lookback rule on prior Section 1231 losses can also affect treatment. Publication 544 from the IRS covers this — you can find it on irs.gov.

Yes, the Section 1231 netting on Form 4797 Part II is important. If you have a net Section 1231 loss it's ordinary, which means no capital loss limitation applies to that portion.

Kevin M.

Author

So an ordinary loss from Section 1231 is actually MORE useful than a capital loss because there's no annual limit on how much I can deduct?

Broadly yes — a capital loss in excess of capital gains has an annual deduction limit against ordinary income. An ordinary loss from Section 1231 doesn't face that same annual cap. But if your Section 1231 results in a gain, it goes capital. The netting on Part II determines which you have.

Something I had to learn the hard way: depreciation recapture under Section 1250 for real property works differently than people expect. For residential rental property depreciated straight-line (which is standard for 27.5-year property), there's no Section 1250 "additional" recapture beyond straight-line. But if you had ever used accelerated depreciation, the excess above straight-line would be recaptured as ordinary income. Most people on 27.5-year residential never hit that, but commercial property (39-year) is the same situation.

Right — the "unrecaptured Section 1250 gain" concept only matters when there's a gain. When the sale produces a loss after adjusted basis, you don't have any gain to recapture, period.

Form 4797 instructions are the clearest guide for this, broken down by which part applies to your property type. I had a similar situation last year — sold at what felt like a loss but accumulated depreciation ate into my basis more than I realized. I pasted my depreciation schedule and closing statement into Taxr and it walked through each line of Form 4797 Part III with my actual numbers and flagged that I actually had a small gain once adjusted basis was recalculated. That changed my whole picture. Worth running your numbers through before assuming you have a loss.

Kevin M.

Author

That's exactly what I'm worried about — thinking I have a loss when really my adjusted basis is so low from depreciation that the math flips. Need to total up nine years of Schedule E depreciation first.

Yes — pull every Schedule E you filed and find the depreciation line for that property each year. Add them all up. That total subtracted from your original depreciable basis (not the land) gives you the adjusted basis of the structure. Add back in the land value and any undepreciated improvements to get total adjusted basis.

State taxes are a separate calculation worth flagging. Some states don't conform to federal depreciation rules (bonus depreciation differences, different recovery periods), so your state adjusted basis might differ from your federal adjusted basis. The gain or loss on the state return could be different. If your state had different depreciation rules over those nine years, you may need a separate basis calculation for state purposes.

California is a big one for this — no bonus depreciation conformity means basis diverges over time. Worth checking your state's depreciation rules if you're in one of the nonconforming states.

The amount realized on the sale isn't just the sale price. Selling expenses — real estate commissions, legal fees, title insurance you paid as the seller — reduce your amount realized. So your commission alone could meaningfully reduce the gain or increase the loss. On Form 4797 itself, enter the gross sale price and add those selling costs to your cost or other basis rather than entering net proceeds.

Kevin M.

Author

Good point — my closing disclosure shows the commission and fees. So I use the net proceeds line from the closing disclosure, not the contract price?

Not quite — the amount realized is gross sale price minus selling expenses, but on Form 4797 you enter the gross sale price and add the selling expenses to basis. Your HUD-1 or closing disclosure will have a "net proceeds to seller" figure but you should verify which costs are deductible selling expenses versus prepaids or escrow items that don't count. Generally commissions, title fees, and transfer taxes you paid count.

If this rental was ever your primary residence before you converted it to a rental, the basis calculation gets more complicated and the home sale exclusion rules interact with the rental period in ways that need careful attention. Publication 523 on irs.gov covers the exclusion rules and there are specific worksheets for a home that was partly rented. That changes both the gain/loss calculation and what portion of depreciation you need to recapture.

Kevin M.

Author

No — always a rental from day one, never a personal residence. So that at least isn't a factor for me.

Good, that simplifies things considerably. The dual-use property situation adds a lot of complexity. With a pure rental from acquisition you just need the clean Form 4797 and Form 8582 path.

To summarize the sequence that worked for me: (1) add up all depreciation claimed from every Schedule E, (2) calculate adjusted basis as purchase price plus improvements plus buying costs minus that total depreciation (land excluded from depreciation but included in basis), (3) calculate amount realized as sale price minus selling expenses, (4) compare the two. If amount realized exceeds adjusted basis you have a gain, it goes on Form 4797 Part III and recapture questions matter. If adjusted basis exceeds amount realized you have a loss and go directly to Form 4797 Part I for Section 1231 treatment, then Form 8582 for passive activity.

This is a clean walkthrough. The Form 8582 step after the loss is determined is critical — people skip it and then don't get the benefit of suspended prior-year losses releasing on the full disposition.

With nine years of a rental, it might be worth having an enrolled agent or CPA who handles real estate do a review before you file, especially if the numbers are significant. The interaction of Form 4797, Form 8582, suspended passive losses and state basis differences is a lot of moving parts. Getting the adjusted basis wrong in either direction is a costly mistake.

Kevin M.

Author

Already planning to use my CPA for the final return but wanted to understand the mechanics so I could have a real conversation with her and not just hand over documents blindly. This thread really helped with that.

Capital loss carryover rules on Schedule D apply only if you end up with a net capital loss after everything — Form 4797 Section 1231 netting, any other capital gains or losses you have. Topic 409 on irs.gov has the limit on how much of a net capital loss can offset ordinary income in a year and how the rest carries forward. Worth reading that page to understand what you'd actually get to use in the current year versus what carries.

Kevin M.

Author

That carryforward piece is actually reassuring — even if I can't use everything this year the loss doesn't disappear.

Right, but remember the Section 1231 ordinary loss path (if that's what you end up with after Form 4797 Part II netting) doesn't face the same annual cap. It's only the net capital loss portion that has the limit and the carryforward mechanism.