Capital Gains Tax on Rental Property: What You Owe When You Sell
How a rental sale is taxed, in three layers
Start with your adjusted basis: what you paid plus capital improvements, minus every dollar of depreciation. Subtract it from the sale price net of commissions and closing costs, and that is your gain. A house bought for $320,000 and depreciated $130,000 has a $190,000 basis, so a $649,000 net sale produces a $459,000 gain.
That gain is then split. The part equal to the depreciation is unrecaptured Section 1250 gain, taxed at your ordinary rate but capped at 25% (IRC 1(h)(1)(E), 2026). Everything above it is long-term capital gain at 0%, 15% or 20%, with 20% starting above $613,700 of taxable income for joint filers (Rev. Proc. 2025-32, 2026); the capital gains hub has the full table. Then the 3.8% net investment income tax sits on top for most landlords. In our first example, a North Carolina couple pays $78,678 federal, $13,642 of NIIT and $18,314 to North Carolina, an effective 24.1% of the gain.
Residential buildings depreciate over 27.5 years under IRC 168(c), so after 14 years roughly half the building cost has already been deducted and now sits in the 25% layer.
Allowed or allowable: depreciation you skipped still counts
Some owners never claimed depreciation, or stopped when a tenant moved out for a few months. The tax law does not care. Basis is reduced by depreciation allowed, "but not less than the amount allowable" (IRC 1016(a)(2)). So the 25% layer is figured as if you took every deduction you were entitled to, and you pay tax on a benefit you never received.
The fix comes before the sale, not after. An automatic accounting method change on Form 3115 can usually catch up missed depreciation in the current year, as one deduction, instead of amending old returns. If you suspect a gap, have your CPA rebuild the depreciation schedule from the closing statement and every improvement invoice before you list. Our depreciation recapture analysis shows how that layer is built.
Suspended passive losses: the sale that finally frees them
Most landlords with day jobs cannot deduct rental losses beyond the $25,000 allowance, which phases out between $100,000 and $150,000 of modified AGI (IRC 469(i), fixed in statute since 1986). When you dispose of your entire interest in a passive activity in a fully taxable transaction, the suspended losses become nonpassive and offset wages, business income or anything else (IRC 469(g)(1)(A)).
In our second example, $48,000 of freed losses cuts the tax from $110,634 to $97,522, a difference of $13,112. Three conditions apply:
- Unrelated buyer. A sale to a family member or a controlled entity does not free the losses until the property leaves the related group (IRC 469(g)(1)(B)).
- Fully taxable. A 1031 exchange carries the losses forward with the replacement property; an installment sale releases them year by year in proportion to the gain recognized (IRC 469(g)(3)).
- Entire activity. If several rentals are grouped as one activity, selling one house does not count.
The 3.8% tax, and the real estate professional exception
Rental gain is net investment income for most owners, taxed at 3.8% on the lesser of that income or modified AGI above $250,000 for joint filers (IRC 1411, threshold not indexed, 2026). The exception is narrow. You must qualify as a real estate professional, meaning more than 750 hours a year and more than half your working time in real property trades in which you materially participate (IRC 469(c)(7)(B)), and the rental must rise to a trade or business.
The regulations add a safe harbor: a real estate professional who spends more than 500 hours on the rental activity in the year, or did so in any five of the prior ten years, is treated as holding the property in a trade or business, so the gain escapes the 3.8% tax (Treas. Reg. 1.1411-4(g)(7)). In our first example that status would remove $13,642. More on the tax itself on our NIIT on a sale page.
Moving into the rental before you sell
Moving in for two years to claim the $250,000 or $500,000 home sale exclusion works only in part since 2009. Gain is split by time, and the share tied to years after 2008 when the house was not your main home is "nonqualified use" that cannot be excluded (IRC 121(b)(5)). The depreciation layer is never excluded either (IRC 121(d)(6)), and it is carved out before the time split (IRC 121(b)(5)(D)).
In our third example the owners rented for 12 years and lived there for 2. Only 2/14 of the non-depreciation gain, about $47,000, is excluded. Tax falls from $110,634 to $94,201, a difference of $16,434.
Two timing rules can change the math. A house received in a 1031 exchange must be owned five years before any exclusion is available (IRC 121(d)(10)). And the opposite move, living in a home first and renting it out later, works far better: years after your last day of home use, within the five-year window, do not count as nonqualified use, so a sale within three years of moving out can still exclude everything except the depreciation. The Section 121 and 1031 combination covers a property that was both.
Rental versus primary residence: the differences that matter
| Issue | Rental property | Primary residence |
|---|---|---|
| Exclusion | None, except the time-based share under IRC 121(b)(5) | Up to $250,000, or $500,000 joint, under IRC 121 (unchanged for 2026) |
| Depreciation layer | Taxed at up to 25% (IRC 1(h)(1)(E), 2026) | Only for any home office or prior rental use |
| Loss on sale | Section 1231 loss, deductible against ordinary income (IRC 1231) | Personal loss, not deductible |
| 1031 exchange | Available | Not available |
| NIIT (IRC 1411) | Usually applies (IRC 1411, 2026) | Only on gain above the exclusion |
Vacation homes that you also rent sit in between. To use one in a 1031, the IRS safe harbor asks for 24 months of ownership with at least 14 days of fair rental and limited personal use in each of the two years (Rev. Proc. 2008-16).
The four main exits: cash, 1031, installment sale, Opportunity Zone
Cash sale. The baseline above: all three layers in one year, suspended losses freed.
1031 exchange. Roll the full price into like-kind real property within the 45-day and 180-day deadlines (IRC 1031) and the gain, including the 25% layer, carries into the new property. Losses stay suspended. If you want out of management, a Delaware statutory trust is a common replacement. Start at our 1031 exchange analysis.
Installment sale. Carry a note and the gain is taxed as principal arrives, with the 25% layer coming out first under Treas. Reg. 1.453-12. Our installment sale of rental property page walks through the order, the mortgage over basis trap and how to secure the note.
Opportunity Zone fund. Investing the gain in a qualified opportunity fund within 180 days defers it (IRC 1400Z-2); P.L. 119-21 made the program permanent with new zone designations from 2027. Rental gain, including the 25% layer, can qualify as Section 1231 gain. See Opportunity Zones.
Owners who are older, or planning to hold until death, should also weigh holding for the basis step-up, which wipes out the depreciation layer for heirs (IRC 1014).
The state layer on a rental sale
Most states tax rental gain as ordinary income. North Carolina is a flat 3.99% for 2026 (NCDOR), which is the $18,314 in our first example; at California's top rate of 13.3% (FTB, 2025 schedule) the same sale would cost far more. Rentals in another state are taxed by that state too, often with withholding at closing for nonresident sellers; see our state-by-state table.
Want your own numbers across all four exits? Get the Big Sale Tax Analysis.
What to know
Every exit trades something. A 1031 keeps the gain and the suspended losses locked in the next property and keeps you a landlord. An installment sale makes you the lender and still taxes any ordinary recapture in year one. Opportunity Zone funds carry fund risk and fees. Moving in shrinks the gain only modestly and costs you years of rent. The cash sale is simplest, and with freed losses it is often less painful than owners expect.
Worked example
Married couple with $150,000 of wages. Single-family rental bought in 2012 for $320,000 ($64,000 land), sold in 2026 for $690,000 less $41,000 of selling costs. $130,000 of straight-line depreciation; $459,000 gain, of which $130,000 is the 25% layer. Identical sale, but the couple carried $48,000 of passive losses they could never deduct; the full taxable sale releases them against other income (IRC 469(g)). Same house and price, but the owners moved in at the start of 2024 and sold in 2026. Depreciation stopped at $112,000. Of the remaining $329,000 of gain, 12/14 is nonqualified use and taxable; 2/14 ($47,000) is excluded under Section 121. Suspended losses left out.
| Engine run | Cash sale, North Carolina, passive landlord | Same sale, $48,000 of suspended losses freed | Rented 12 years, then lived in it 2 |
|---|---|---|---|
| Filing status | Married, joint | Married, joint | Married, joint |
| State | North Carolina | North Carolina | North Carolina |
| Other income (wages, pension, interest) | $150,000 | $150,000 | $150,000 |
| Long-term capital gain | $329,000 | $329,000 | $282,000 |
| Unrecaptured Section 1250 gain (25% max) | $130,000 | $130,000 | $112,000 |
| Suspended passive losses released | $0 | $48,000 | $0 |
| Federal income tax on the sale | $78,678 | $67,390 | $67,308 |
| Net investment income tax (3.8%) | $13,642 | $11,818 | $11,172 |
| State income tax on the sale | $18,314 | $18,314 | $15,721 |
| Total tax caused by the sale | $110,634 | $97,522 | $94,201 |
| Effective rate on the gain | 24.1% | 21.2% | 23.9% |
| Gain kept after these taxes | $348,366 | $361,478 | $299,799 |
Computed October 7, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2025-32 (OBBBA-adjusted) and the One Big Beautiful Bill Act (P.L. 119-21); NIIT under IRC 1411 (thresholds not indexed); state tax from the engine's state table. "Tax caused by the sale" = tax with the sale minus tax without it. Excludes selling costs, local taxes and estimated-tax timing. Education only.
Run your own numbers
2026 law from the engine: federal 0/15/20% brackets (Rev. Proc. 2025-32), 25% cap on unrecaptured 1250 gain, ordinary rates on 1245 recapture, 3.8% NIIT over $200,000 single / $250,000 joint (IRC 1411), AMT, and your state's rules. Tax shown is the tax caused by the sale. Excludes selling costs, local taxes and NIIT exceptions for active business owners. Education only.
Long-Term vs Short-Term Capital Gains (2026)
The one-year holding rule, the 2026 0/15/20% thresholds for every filing status, NIIT, recapture, the state layer and a worked $200,000 example: 11 months vs 13 months, and what spreading the gain can save.
Frequently asked questions
How much tax will I pay when I sell my rental property?
Can I avoid paying capital gains tax on a rental property?
What are the tax differences between selling a rental property and a primary residence?
Is depreciation recapture on a rental always taxed at 25%?
What happens to suspended passive losses when I sell a rental?
What are the tax implications of selling a rental property at a loss?
Sources
- IRC 1(h)(1)(E), 25% rate on unrecaptured 1250 gain (Cornell LII)
- IRC 1016(a)(2), allowed or allowable (Cornell LII)
- IRC 469, passive activity losses (Cornell LII)
- IRC 1411, net investment income tax (Cornell LII)
- Treas. Reg. 1.1411-4, real estate professional safe harbor (Cornell LII)
- IRC 121, home sale exclusion and nonqualified use (Cornell LII)
- Rev. Proc. 2008-16, dwelling unit 1031 safe harbor (IRS)
- IRC 1031 (Cornell LII)
- IRC 1400Z-2, Opportunity Zone deferral (Cornell LII)
- IRS Publication 527, Residential Rental Property
- NCDOR tax rate schedules
Figures as of October 7, 2026; each rate and limit above names its source and year. Education only, not legal or tax advice.
Keep reading
Installment sale of rental property
Selling a rental on a note: recapture first, the 3.8% tax on gain and interest, suspended losses released year by year, and the mortgage-over-basis trap.
ReadDepreciation recapture
The part of your gain that came from depreciation is taxed differently; here is which rate applies, how much, and what defers it.
Read1031 exchange
Defer the whole gain by trading investment real estate for more real estate, if you can find it and close inside 180 days.
ReadSection 121 plus 1031
A former home that became a rental can use both the home sale exclusion and a 1031 exchange on the same sale under Rev. Proc. 2005-14.
ReadCommercial property
Office, retail and industrial sales: why cost segregation comes back at ordinary rates, how the 1231 lookback works, and what states hold back at closing.
ReadSecond home
A vacation home gets no Section 121 exclusion, but rental history, a 1031 safe harbor or moving in can change the bill.
ReadKnow your number before you sign.
The Big Sale Tax Analysis is a flat $5,000. Start with a free scoping call; you are invoiced only after it, and only if you go ahead.
Prefer email? Request the analysis by email.