Selling a rental property: the full tax bill
TL;DR: Your taxable gain is the sale price minus selling costs minus adjusted basis (cost plus improvements minus depreciation). That gain is taxed in layers: ordinary recapture on personal property, up to 25% on building depreciation, 0/15/20% on the rest, possibly 3.8% NIIT, plus state tax. Suspended passive losses are released and can offset a big chunk.
Educational only, not tax, legal, or investment advice. Examples are illustrations, not predictions. Rules and limits change; verify current figures and talk to a qualified professional about your situation.
Selling a rental feels like a victory lap until the tax bill shows up wearing a referee's shirt. The good news: the bill is predictable, once you see the layers. This guide builds it from scratch, in the order your tax software (and the IRS) does it, using the same characters as the rest of the site. Frugal Fran sells. Lavish Larry watches and takes notes, which is a first.
CPA Warning Label: A big sale can push you into the NIIT, a higher capital gains bracket and an underpayment penalty all at once. Run the numbers before you list.
Adjusted basis
Gain starts with adjusted basis, per IRS Publication 544 and Publication 527:
- Original cost: purchase price plus settlement costs that are added to basis, such as title insurance, recording fees, transfer taxes and legal fees (not loan costs, which are amortized separately). See closing costs and basis.
- Plus capital improvements: roofs, additions, new HVAC, kitchen remodels, anything you capitalized. Keep receipts; see the capital improvements list.
- Minus depreciation allowed or allowable: everything you deducted, or could have deducted, including bonus and section 179.
- Minus casualty losses deducted, insurance reimbursements and partial dispositions written off.
If you converted your home to a rental, the depreciable basis is the lower of your adjusted basis or fair market value at conversion. For gain, though, you use your regular adjusted basis. That's covered in converting your home to a rental.
Closing costs
Selling expenses reduce the amount realized: broker commissions, title and escrow fees, attorney fees, transfer taxes paid by the seller, and staging or advertising costs tied to the sale. Prorated property tax and rent credits aren't selling costs; they're income and expense items for the final year.
Repairs made to sell the property are generally deductible rental expenses if the property was still held for rental, or added to basis if they're improvements. A fresh coat of paint while the tenant moves out: likely a repair. New windows to boost the price: an improvement, added to basis.
Gain layers: recapture, LTCG, NIIT, state
Once you have the total gain, it's sliced by character:
| Layer | What it is | Federal rate |
|---|---|---|
| 1. Section 1245 recapture | Gain on appliances, furniture, cost seg personal property up to depreciation taken | Ordinary rates |
| 2. Unrecaptured section 1250 gain | Gain up to straight-line depreciation on the building | Ordinary rates, capped at 25% |
| 3. Section 1231 gain / LTCG | Everything above depreciation, if held more than a year | 0%, 15% or 20% |
| 4. NIIT | Applies to net gain if MAGI exceeds $200,000 single / $250,000 joint (not indexed) | 3.8% |
| 5. State | Most states tax gains as ordinary income | Varies (0% to over 13%) |
For 2026, the 0% long-term rate applies up to taxable income of $49,450 single or $98,900 married filing jointly (Rev. Proc. 2025-32), with 15% above that and 20% at higher incomes. A large gain stacks on top of ordinary income, so it often spans brackets. Recapture details live in depreciation recapture on rental property, and stacking is explained in capital gains stacking rules.
If you held the property one year or less, the whole gain is short-term and taxed as ordinary income.
Order matters for the brackets. Ordinary income fills the brackets first, then unrecaptured 1250 gain, then regular long-term gain. So a large ordinary income year (a bonus, a Roth conversion) pushes the gain into higher rate zones, and a low ordinary income year leaves more room at 0% and 15%. Lavish Larry once did a Roth conversion in the same year he sold a rental. He now owns a very expensive lesson.
Suspended losses release
Section 469(g) is the silver lining. When you dispose of your entire interest in a passive activity in a fully taxable transaction to an unrelated party, all suspended passive losses from that activity become fully deductible, first against income from that activity, then against other passive income, then against non-passive income (wages, interest, anything).
A landlord above the $150,000 MAGI phase-out may have years of suspended losses. On sale, those losses offset the gain and other income in the year of sale. A 1031 exchange, a sale to a relative or a gift doesn't trigger the release. See suspended passive losses.
If you grouped multiple rentals as one activity, selling one property may not be a disposition of your entire interest. Grouping decisions matter here; see grouping elections.
Worked example
Illustration (made-up numbers): Frugal Fran, married filing jointly, sells a rental in 2026. Her other taxable income (wages minus deductions) is $150,000.
| Line | Amount |
|---|---|
| Sale price | $600,000 |
| Selling costs (6%) | −$36,000 |
| Amount realized | $564,000 |
| Original cost $350,000 + improvements $40,000 − depreciation $110,000 | Adjusted basis $280,000 |
| Total gain | $284,000 |
| Unrecaptured 1250 gain (all depreciation was building) | $110,000 |
| Long-term capital gain | $174,000 |
| Suspended passive losses released | −$45,000 |
The $45,000 of released losses reduce ordinary income. Her taxable income becomes about $150,000 + $284,000 − $45,000 = $389,000. Her ordinary taxable income is now $105,000, and the gains stack on top. The $110,000 of 1250 gain is taxed at ordinary rates under the 25% cap, here spanning the 22% and 24% brackets (2026 joint 22% bracket ends at $211,400): about $24,300. The $174,000 of capital gain lands entirely in the 15% zone: about $26,100. NIIT at 3.8% on net investment income (gain minus released losses, simplified) above the $250,000 MAGI threshold: her MAGI is around $389,000, so NIIT applies to the lesser of net investment income or the excess over $250,000, about $139,000 × 3.8% = $5,280. State tax at 5%: about $12,000 after losses. Total: roughly $67,700 on a $284,000 gain, an effective rate around 24%.
Without the released losses, the bill would be about $14,000 higher. That's the reward for carrying losses for years. Estimate yours with the depreciation recapture calculator or the 1031 vs sell calculator.
Special situations
- Inherited rental: basis is generally fair market value at the date of death (section 1014), and prior owners' depreciation disappears. Your depreciation starts fresh. Gain is always long-term. See inherited rental property.
- Gifted rental: you take the donor's basis (carryover), including their depreciation history, so recapture follows the property. See gifting a rental to kids.
- Selling at a loss: a loss on rental property is generally a section 1231 loss, which is ordinary, not capped at $3,000 like capital losses. Watch the five-year 1231 lookback, which can recharacterize later 1231 gains as ordinary.
- Multi-state: the state where the property sits generally taxes the gain; your home state may tax it too and give a credit. Some states require withholding at closing for nonresident sellers.
- Partnership or LLC owners: the entity reports the sale and passes gain through on your K-1, character intact.
Ways to shrink or move the bill
- Time the sale: selling in a low-income year (early retirement, a sabbatical) can put more gain in the 0% or 15% bracket and keep MAGI under the NIIT threshold.
- 1031 exchange: defer everything if you'll keep investing in real estate.
- Installment sale: spread capital gain over years (recapture still mostly hits year one).
- Harvest losses: capital losses from a taxable brokerage account offset capital gain.
- Former home? If you lived there 2 of the last 5 years, the home sale exclusion can shelter most of the gain except depreciation.
- Make estimated payments. A big gain with no withholding can trigger an underpayment penalty; see rental estimated taxes.
Forms you'll see
Form 4797 reports the sale of business and rental property and splits 1245 recapture, 1250 items and 1231 gain. Schedule D picks up the 1231 gain and unrecaptured 1250 gain worksheet. Form 8582 releases suspended losses. Form 8960 computes NIIT. Your title company issues a Form 1099-S with gross proceeds. Report the final year's rent and expenses on Schedule E as usual.
FAQ
How is the sale of a rental property taxed?
Gain equals sale price minus selling costs and adjusted basis. Depreciation-related gain is taxed at up to 25% (or ordinary rates for personal property), the rest as long-term capital gain if held over a year, plus possible 3.8% NIIT and state tax.
What happens to suspended passive losses when I sell?
They are released in full when you sell your entire interest in the activity in a fully taxable sale to an unrelated party, and can offset any type of income in that year.
Are selling costs deductible?
They reduce the amount realized on the sale rather than being deducted separately, which lowers your gain. Commissions, title fees and seller-paid transfer taxes qualify.
Can I avoid capital gains tax when selling a rental?
You can defer it with a 1031 exchange or spread it with an installment sale. Holding until death generally eliminates it under step-up in basis rules. A former home may qualify for the home sale exclusion, except for depreciation.
What form do I use to report selling a rental?
Form 4797, with gains flowing to Schedule D. Form 8582 handles released passive losses and Form 8960 computes the net investment income tax.
Sources & fact-check notes
- IRS Publication 544, Sales and Other Dispositions of Assets (accessed 2026-10-27)
- IRS Publication 527, Residential Rental Property (accessed 2026-10-27)
- IRS Publication 925, Passive Activity and At-Risk Rules (accessed 2026-10-27)
- IRS: Net Investment Income Tax (accessed 2026-10-27)
- IRS Topic 409, Capital gains and losses (accessed 2026-10-27)
- IRS Rev. Proc. 2025-32 (2026 inflation adjustments) (accessed 2026-10-27)
Figures checked October 27, 2026. Rules and limits change; verify with the official source before acting.