How to calculate cost basis for rental property when you've got depreciation, improvements and a sale all mixed together

Trying to figure out how to calculate cost basis for rental property I've owned since 2019. I bought it for $310k, made some improvements over the years, and now I'm selling. My problem is I've been depreciating it on Schedule E every year and I know that affects the basis but I don't totally understand how. My 1099-S showed up and I'm staring at Form 8949 not sure what numbers go where. I read something about accumulated depreciation reducing my adjusted basis and also about depreciation recapture being taxed differently than regular capital gain. I've filed my own returns every year but this one feels different. Where do I even start to figure out the right basis number so I don't mess up the gain calculation?

35 comments

Form 4562 and your prior Schedule E returns are your starting point. Each year you claimed depreciation, that amount reduced your adjusted basis in the property. You need to add up every year's depreciation deduction going back to when you placed it in service. That total is your accumulated depreciation, which gets subtracted from your original cost (plus improvements, minus any casualty losses you deducted) to arrive at adjusted basis at the time of sale.

Matt P.

Author

So I literally need to pull every Schedule E I filed since 2019 and add up the depreciation line each year? I didn't realize it went all the way back to year one.

The land question matters a lot here. When you bought the property, only the structure (not the land) is depreciable. If you never separated land value from building value back in 2019, your original depreciable basis may be wrong, which ripples forward into every depreciation deduction you took. County assessor records or a contemporaneous appraisal are the usual ways to establish that split.

Matt P.

Author

I just used the full purchase price when I set up depreciation. I never allocated anything to land. Does that mean I over-deducted depreciation all these years?

Probably yes. If the assessor shows land at, say, 20% of total assessed value, a reasonable allocation puts 20% of purchase price to land and 80% to building. You may need to amend or at least recalculate your true accumulated depreciation for the sale.

Publication 551 at irs.gov/publications/p551 covers basis of assets including improvements and what gets added versus what reduces basis. Improvements that add value or extend useful life go into basis; routine repairs do not. The distinction matters because an improvement also gets its own depreciation schedule if it was placed in service after the original purchase.

I uploaded my closing disclosure, my improvement receipts and five years of Schedule E into taxr.ai and asked it to walk through the basis calculation step by step for each year. It pulled the depreciable basis figure, applied the land allocation, stacked each year's depreciation, then showed me the adjusted basis at sale date. Really useful for catching that one year where I had a roof repair I'd miscategorized as an improvement. The IRS page at irs.gov/publications/p550 on holding periods and cost basis is also worth reading alongside this.

Matt P.

Author

Did it also flag the depreciation recapture piece or just the basis calc?

It flagged that the accumulated depreciation would be subject to unrecaptured Section 1250 gain rules and showed which number feeds into Schedule D versus what goes on Form 4797. It didn't tell me the rate — said to check the Schedule D instructions for the current year — but it was clear about which form handles which piece.

Form 4797 is the form that matters for depreciation recapture on a rental, and the sale of a rental held over a year goes on Form 4797 rather than Form 8949. The gain attributable to depreciation previously allowed or allowable runs through Part III of Form 4797. The remaining gain (if any) can then flow to Schedule D as a long-term capital gain. Getting the split right depends entirely on your correct accumulated depreciation number.

Is the depreciation recapture always taxed as ordinary income or does it cap somewhere? I always get this confused.

Unrecaptured Section 1250 gain is a specific rate category, not full ordinary income rates. The instructions for Schedule D and the Unrecaptured Section 1250 Gain Worksheet walk through it. The cap and rate are in those instructions for the current year rather than a fixed number I'd want to quote here.

One thing I'd double-check: if you ever took a casualty loss deduction on this property, that also reduces your basis. Same with any insurance reimbursements you received that exceeded your basis in the damaged portion. Most people forget those when they're reconstructing basis years later.

Publication 527 and Publication 551 together cover most of the basis adjustment scenarios. But honestly for a rental sale I'd strongly consider an enrolled agent or CPA who handles real estate. The interaction between adjusted basis, depreciation recapture, the Section 121 exclusion if any personal use is involved, and state taxes can compound errors fast.

Matt P.

Author

No personal use — it's been purely a rental since day one. But the point about compounding errors is real. I may at least have someone review my numbers before I file.

The "allowed or allowable" rule is important and catches people off guard. Even if you forgot to claim depreciation in a particular year, the IRS treats your basis as reduced by the amount you *could* have claimed. So skipping a year doesn't preserve basis — it just means you gave up the deduction while still reducing your basis on paper.

Matt P.

Author

Wait, so if I under-deducted depreciation in any year, my basis is still reduced as if I took it? That seems harsh.

Yes, that's the rule. The fix is usually to file Form 3115 to catch up missed depreciation through a "change in accounting method" rather than amending every past year. Worth discussing with a CPA because the mechanics matter.

For improvements specifically, each one you made after placing the property in service has its own depreciable basis and its own placed-in-service date. If you put on a new roof in 2022, that's a separate asset depreciated starting that year, not added to the original building's depreciation schedule. Your total adjusted basis includes both schedules.

Does that mean the improvement also has its own accumulated depreciation that reduces basis separately from the building depreciation?

What goes in column (e) of Form 8949 for the basis — is it the original purchase price or the adjusted basis after all the depreciation and improvements?

Adjusted basis, but not on Form 8949, because a rental held over a year is reported on Form 4797. There you work from your cost basis at the time of sale: original cost, plus improvements, with accumulated depreciation (allowed or allowable) and any other basis reductions subtracted. The gross proceeds from the 1099-S go in the gross sales price column.

I ran into this last year on a rental I sold after eight years. I used Taxr to check my accumulated depreciation total against what my prior returns showed — it read through each Schedule E and flagged a year where I had the wrong depreciable basis because I'd included land in my original cost. It drafted a corrected basis schedule I could hand to my CPA to verify before we filed. The difference in gain was not small.

Matt P.

Author

This is exactly the scenario I'm worried about. Did the CPA end up agreeing with the corrected numbers?

She did, with minor tweaks. Having the year-by-year schedule laid out made her review much faster than starting from scratch.

Don't forget selling costs — broker commissions, legal fees, transfer taxes you paid as the seller — reduce your amount realized, which effectively reduces your gain. They don't adjust your basis but they do adjust the net proceeds number you're working with. Some people lump them into basis by mistake.

Selling costs point above is right. I had a similar question about proceeds versus basis adjustments and ended up uploading my HUD-1 and closing statement to Taxr. It sorted each line item — which ones reduce amount realized versus which ones adjust basis — and mapped them to the right spots on Form 4797. Saved me a lot of second-guessing on which line to use.

Matt P.

Author

HUD-1 or the newer closing disclosure? Mine is a 2024 closing so I have the CD form.

CD works the same way for this purpose — it's just the more current format. The line items are what matter, not which version of the form.

Topic no. 409 at irs.gov/taxtopics/tc409 has a plain-language summary of capital gains and losses including holding periods. Worth a quick read to make sure you're clear on long-term versus short-term treatment before you plug in numbers. For a property held since 2019 you're definitely in long-term territory, but as a rental it's section 1231 property, so it goes on Form 4797, not Part II of Form 8949.

Form 1099-S from the closing agent — did it show just the gross proceeds or did it net out your selling costs? Because if it's gross proceeds, you need to account for those costs in your gain calculation separately, not assume the 1099-S number is your net.

Matt P.

Author

It showed gross proceeds. So I put that in column (d) on Form 8949 and handle the selling costs separately in the gain calc?

Close, but for a rental it's Form 4797, not Form 8949. Gross proceeds go in the gross sales price column and your basis goes in the cost or other basis column. Selling costs are added there as expense of sale, which means they effectively reduce the gain. The instructions for Form 4797 describe the column entries.

If your adjusted basis ends up higher than your sale proceeds after all this, meaning you have a loss, that's worth flagging separately. Losses on rental property are generally treated as ordinary losses on Form 4797 rather than capital losses, which is a different and sometimes better tax outcome than a capital loss limited by the annual cap.

Matt P.

Author

Good to know — I'm pretty sure I have a gain here but I hadn't considered what a loss would mean for the form routing.