How to calculate capital gains tax on investment property — step by step

Trying to figure out how to calculate capital gains tax on investment property I sold this year. I bought a rental condo back in 2018, sold it in April. I know there's a gain but I'm not sure if I'm doing the math right. I subtracted my original purchase price from the sale price, but my preparer mentioned something about adjusted basis and depreciation recapture that I hadn't accounted for. The 1099-S arrived from the closing and I have my closing disclosure from both purchase and sale. Do I start with Form 8949 or Schedule D? And does the depreciation I took over the years actually change the gain number, or is that a separate calculation? I've owned it more than a year so I'm assuming long-term, but I want to make sure I'm doing this right before I hand everything to my preparer.

29 comments

Form 4797 is where you start for the sale itself. Even though you received a Form 1099-S, a rental held more than one year is section 1231 property, so you report the sale on Form 4797 (Part III, carried to Part I), not on Form 8949. The net section 1231 gain then flows to Schedule D line 11. Your adjusted basis is not the purchase price alone. It includes purchase closing costs you capitalized, any improvements you made, minus accumulated depreciation you claimed (or were allowed to claim) over the years. That adjusted basis goes on Form 4797 Part III.

Darius W.

Author

So the depreciation actually reduces my basis, making the gain larger? I figured depreciation was just a separate thing. That changes my numbers quite a bit.

Yes and there's a wrinkle on top of that. The depreciation you deducted over the years gets taxed separately at a maximum rate of 25% for the unrecaptured Section 1250 gain. That part doesn't go through the same rate calculation as the rest of your long-term capital gain. Publication 550 and the Schedule D instructions both have worksheets for figuring this out.

Darius W.

Author

Wait — so part of the gain is taxed at one rate and part at another? Do both parts still land on Schedule D?

Schedule D is the summary. For a rental, Form 4797 feeds into it, not Form 8949. Your net section 1231 gain from Form 4797 flows to Schedule D line 11. Form 8949 and lines 8a/8b are for capital assets like stock, not depreciable rental property, so with a 1099-S on a rental, Form 4797 is the right path. The unrecaptured Section 1250 gain computation runs through the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions. It doesn't create a separate line on Form 4797, but it affects the tax rate applied at the end.

I sold a rental property two years ago and ran into the same depreciation recapture confusion. I uploaded my closing disclosures and depreciation schedule to taxr.ai and it identified every cost I'd capitalized at purchase that I'd forgotten to include in basis — things like title insurance and recording fees from the HUD-1. It then compared my adjusted basis figure against what I'd put on Form 8949 and listed the differences. For your situation: pull every closing cost from the original purchase, go through your tax returns for every year you rented it and add up the depreciation deducted on Schedule E, then subtract that total from your starting basis. That adjusted basis number is what goes on Form 4797.

Darius W.

Author

Recording fees and title insurance — I definitely did not include those. This is going to change my basis calculation significantly. Where in Publication 551 does it list which closing costs get added to basis?

Publication 551 (Basis of Assets) covers which settlement costs you can include. Generally: abstract fees, charges for installing utility services, legal fees related to the purchase, recording fees, surveys, transfer taxes, title insurance, and amounts the seller owed that you paid. Real estate taxes allocated to you at closing may or may not add to basis depending on how they were handled. Things you can't add: fire insurance premiums, rent for occupancy before closing, charges for services related to occupying the property.

does the same list apply if you converted the property from personal use to rental partway through ownership?

Holding period question: you said you bought in 2018 and sold in April of this year, so that's well over one year. Per Publication 550, the holding period for securities runs from the day after the trade date, but for real property the general rule applies — you count from the day after acquisition to the date of sale. You're long-term, which means the sale goes on Form 4797 as section 1231 property held more than one year, not in Part II of Form 8949.

One thing that tripped my preparer up on mine: if you ever took a home office or any other deduction that reduced basis separately, that also needs to be backed out. And if you made capital improvements — a new roof, HVAC system, added square footage — those increase basis and reduce your gain. Keep the receipts because the IRS can ask for them.

Darius W.

Author

I did replace the HVAC in 2021. That gets added back to basis then, right? Not just deducted as an expense?

HVAC replacement on a rental is a capital improvement, not a current expense (assuming it was treated that way on your Schedule E). It gets added to basis. But it also generates its own depreciation — so you need to check whether you depreciated it separately on Form 4562. If you did, that depreciation also reduces basis and feeds into the unrecaptured Section 1250 gain calculation.

Darius W.

Author

So I need to pull every Form 4562 from every year I rented it. I did not realize this was going to involve that many documents.

The full calculation in plain steps: (1) Start with purchase price plus capitalized closing costs. (2) Add capital improvements. (3) Subtract total depreciation allowed or allowable on the property (including HVAC and any other separate assets). That's your adjusted basis. (4) Sale price minus selling costs (commissions, closing costs at sale) = amount realized. (5) Amount realized minus adjusted basis = your total gain. (6) The portion equal to depreciation taken is unrecaptured Section 1250 gain. The rest is straight long-term capital gain.

This is the clearest rundown in this thread. The "allowed or allowable" part in step 3 matters — the IRS counts depreciation you could have taken even if you didn't actually claim it.

Can someone clarify step 6 — if the total gain is less than the total depreciation taken, is all of the gain Section 1250 recapture?

Yes. Unrecaptured Section 1250 gain is the lesser of: the total depreciation allowed or allowable, or your total gain. If your gain is smaller than the depreciation taken, the entire gain is recaptured at the Section 1250 rate. The Schedule D Unrecaptured Section 1250 Gain Worksheet walks through this.

Form 4797 is also relevant here if the property was used in a trade or business — and a residential rental held more than a year generally goes on Form 4797, with the result carried to Schedule D, not on Form 8949. Worth confirming with a CPA or enrolled agent which form applies to your specific rental. I had a similar pile of documents when I sold my rental and I uploaded everything to Taxr — it read through all my Schedule E depreciation rows year by year and produced a running total of depreciation allowed, which I handed straight to my CPA. Saved a lot of back-and-forth.

Darius W.

Author

Is Form 4797 ever used for residential rentals? I thought that was only for business property.

Form 4797 is for property used in a trade or business. A residential rental is treated as depreciable property used in a trade or business for this purpose. So residential rentals with depreciation recapture go through Form 4797 and the Section 1250 worksheet, not Form 8949. If yours was purely a rental with no other business use, Form 4797 is the standard path. When in doubt, an enrolled agent or CPA who works with rental properties can tell you which form is correct for your facts.

Don't overlook selling costs in your amount realized calculation. Commissions paid to a real estate agent, legal fees for the closing, and transfer taxes you paid as the seller all reduce the amount realized. They reduce your gain, but on Form 4797 you enter the gross sales price and add these costs to your cost or other basis (the line for cost or other basis plus expense of sale), not in column (d) or (g) of Form 8949.

Darius W.

Author

The 1099-S shows gross proceeds. So I would put that in column (d) and then enter an adjustment in column (g) for the selling costs?

For a rental, Form 4797 is where the sale goes, and you enter the gross sales price as it appears on the 1099-S even if it doesn't match what you actually netted. Then add the selling costs to your cost or other basis on the line for cost or other basis plus expense of sale, which reduces your gain. Form 8949 column (f) codes and column (g) adjustments don't apply on Form 4797. I went through this same exercise last year and uploaded my closing disclosure and 1099-S to Taxr — it compared the two documents, identified the proceeds difference, and drafted the column (g) adjustment entry for me to review before I passed it to my preparer.

Does the same column (g) adjustment approach work if you have both a proceeds adjustment and a basis adjustment on the same row?

If you have net capital losses in other accounts this year, those can offset the gain. Per Topic 409, if losses exceed gains, the deductible amount against other income is capped — check the IRS Topic 409 page for the current limit and carryover rules. They can reduce the Section 1250 portion too: on the Unrecaptured Section 1250 Gain Worksheet, net short-term losses and loss carryovers offset 28% rate gain first, then unrecaptured Section 1250 gain.

Publication 550 is the main reference document for all of this — chapter 4 covers capital gains and losses in detail including holding periods and what goes on Form 8949. The IRS instructions for Form 8949 at irs.gov/instructions/i8949 also have a column-by-column guide that's worth reading before you fill anything in.

Darius W.

Author

Between Publication 550, Publication 551 for basis, the Schedule D instructions, and Form 8949 instructions — that's a lot of documents to piece together. Good to know which ones to start with though.

Final check before you hand this to a preparer: make sure the total depreciation figure you've assembled matches what was reported on your Schedule E each year. If any year had depreciation that wasn't actually deducted (sometimes happens with passive loss limitations), the IRS still treats it as "allowed or allowable" and reduces your basis regardless. A preparer or enrolled agent can confirm that figure from your prior returns.