Capital Gains Tax When You Sell a Rental Property
Most people selling a rental do one calculation: sale price minus what I paid, times some tax rate. Then they get the closing statement and the tax return and discover the number was off by a lot — almost always in the wrong direction.
The reason is that selling an investment property doesn't trigger one tax. It triggers as many as three, and the one that surprises everyone isn't the capital gain at all.
It's three taxes, not one
When you sell a rental at a profit, here's what can come due:
- Long-term capital gains tax on the appreciation — 0%, 15%, or 20% depending on your income.
- Depreciation recapture — taxed up to 25% on all the depreciation you took (or were supposed to take) while you owned it.
- The extras — a 3.8% net investment income tax if your income is high enough, plus whatever your state charges.
Miss any of these and your estimate is wrong. The recapture is the one that blindsides people, so it's worth understanding exactly how the pieces fit.
Start with your adjusted basis
You don't owe tax on the sale price. You owe it on the gain, and the gain is measured against your adjusted basis — not what you paid.
Your basis started as the purchase price. Over the years it went up every time you made a real improvement (a new roof, an addition, a full kitchen remodel — not repainting or fixing a leak). And it went down every year by the depreciation you claimed.
Say you bought a rental for $250,000, put $30,000 into a genuine renovation, and claimed $60,000 of depreciation over the years you held it:
- Purchase: $250,000
- Plus improvements: +$30,000
- Minus depreciation: −$60,000
- Adjusted basis: $220,000
Sell for $400,000 and your total gain is $180,000 — not the $150,000 you'd get from "sale minus purchase." Depreciation quietly inflated the taxable number by lowering your basis. Which brings us to the part that catches people.
Depreciation recapture: the surprise
Every year you rent a property, the IRS lets you deduct a slice of the building's value — roughly 1/27.5 of it — against your rental income. It's one of the best perks of owning rentals. It's also a loan, and the bill comes due when you sell.
That deducted depreciation gets "recaptured" and taxed at a rate up to 25%, separately from and before the regular capital gains rate touches the rest. In the example above, the $60,000 of depreciation is peeled off first and taxed at up to 25% — as much as $15,000 — and only the remaining $120,000 of gain gets the friendlier long-term rate.
Here's the part that feels unfair: it applies whether or not you actually claimed the depreciation. The tax code says "allowed or allowable." Skip the deduction for ten years and the IRS still assumes you took it and taxes you accordingly at sale. If that's your situation, talk to a CPA before you sell — there are ways to correct missed depreciation, but they're not automatic.
What the gain itself gets taxed at
The portion left after recapture — the actual appreciation — is long-term capital gain if you owned the property more than a year, which for a rental you almost certainly did. Long-term rates are 0%, 15%, or 20%, set by your total taxable income for the year. Most sellers land at 15%. High earners hit 20%.
Hold it a year or less and you'd instead pay short-term rates, which match your ordinary income bracket and run up to 37%. Rarely an issue for a long-term rental, but it matters if you're flipping.
The taxes nobody mentions
Two more can ride along:
- Net investment income tax (NIIT): an extra 3.8% on investment gains once your income clears $200,000 single or $250,000 married. A large sale can push you over the line by itself.
- State income tax: most states tax the gain as regular income. In a high-tax state that's another several percent on the whole thing.
Stack federal gain, recapture, NIIT, and state tax and a "$180,000 profit" can shed $45,000–$60,000 before it reaches your account. The sale proceeds calculator lets you plug in your own basis, depreciation, and rates to see the after-tax number instead of the fantasy one.
Ways to lower or defer the bill
You have real options, and they're worth planning before you list:
- A 1031 exchange. Roll the proceeds into another investment property on a strict timeline and you defer the entire bill — gain and recapture both. The most powerful lever if you're staying in real estate.
- Convert it back to a primary residence. Live there two of the five years before selling and part of the gain can qualify for the primary-residence exclusion. Recapture still applies, and the excluded share gets prorated for the rental years, but it can shave off a chunk.
- Document every improvement. Each dollar of legitimate capital improvement raises your basis and lowers the gain. Dig up those old invoices — they're worth real money now.
- Time the sale. A year with lower income can drop your capital gains rate from 20% to 15%, or your recapture rate below the 25% ceiling.
None of this is tax advice for your specific return — the numbers here are estimates to help you plan, and depreciation recapture in particular gets technical fast. Run your figures, then take them to a CPA before you sign anything.
Frequently asked questions
How much is capital gains tax on a rental property?
The appreciation is taxed at 0%, 15%, or 20% based on your income (most sellers pay 15%), and separately, the depreciation you claimed is recaptured at up to 25%. A 3.8% federal surtax and state income tax may apply on top.
What is depreciation recapture?
It's the tax on the depreciation deductions you took while renting the property. At sale, that depreciation is added back and taxed at a rate up to 25% — before the regular capital gains rate applies to the rest of your gain.
Do I owe recapture if I never claimed depreciation?
Generally yes. The rule is "allowed or allowable" — the IRS taxes the depreciation you could have claimed even if you didn't. If you missed years of deductions, a CPA can help you correct it before you sell.
How can I avoid capital gains tax when selling a rental?
The cleanest deferral is a 1031 exchange into another investment property. You can also raise your basis with documented improvements, time the sale to a low-income year, or convert the property back to a primary residence to capture part of the exclusion. Each has strict rules.