Big Sale TaxHans Goldstein: Tax & Exit Planning
Home / Capital Gains / Rental property
Rental property sale

Capital Gains Tax on Rental Property: What You Owe When You Sell

Short answerSelling a rental is taxed in layers. Depreciation you took, or could have taken, comes back at up to 25%; the rest of the gain is long-term capital gain; most landlords also owe the 3.8% net investment income tax. Suspended passive losses are released by the sale. In our North Carolina example the sale costs $110,634 in tax on $459,000 of gain.

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

IssueRental propertyPrimary residence
ExclusionNone, 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 layerTaxed at up to 25% (IRC 1(h)(1)(E), 2026)Only for any home office or prior rental use
Loss on saleSection 1231 loss, deductible against ordinary income (IRC 1231)Personal loss, not deductible
1031 exchangeAvailableNot 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 runCash sale, North Carolina, passive landlordSame sale, $48,000 of suspended losses freedRented 12 years, then lived in it 2
Filing statusMarried, jointMarried, jointMarried, joint
StateNorth CarolinaNorth CarolinaNorth 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 gain24.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

Federal on the sale$0
NIIT$0
State$0
Total tax, held over a year$0
Effective rate0%
If held one year or less$0

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.

Free PDF sheet

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.

By entering your email you agree to receive this sheet and occasional educational emails from Hans Goldstein: Tax & Exit Planning. Unsubscribe anytime.

Frequently asked questions

How much tax will I pay when I sell my rental property?
Federal tax runs up to 25% on the depreciation you took or could have taken, 0%, 15% or 20% on the rest of the gain (Rev. Proc. 2025-32, 2026), plus 3.8% NIIT for most landlords, plus state tax. In our North Carolina example a $459,000 gain costs $110,634, about 24.1% of the gain.
Can I avoid paying capital gains tax on a rental property?
You can defer it, not erase it, during your life: a 1031 exchange rolls it into new real estate, an installment sale spreads it over the payment years, and an Opportunity Zone fund defers it for a set period. Heirs who inherit get a basis step-up that eliminates it.
What are the tax differences between selling a rental property and a primary residence?
A primary residence can exclude up to $250,000 of gain, or $500,000 for a married couple (IRC 121). A rental gets no exclusion, its depreciation is taxed at up to 25%, and the gain is usually subject to the 3.8% NIIT. A rental can use a 1031 exchange and a loss is deductible; a home cannot do either.
Is depreciation recapture on a rental always taxed at 25%?
No. 25% is a ceiling. Unrecaptured Section 1250 gain is taxed at your ordinary bracket if that is lower, so a couple with modest income may pay 12% or 22% on it (IRC 1(h)(1)(E), 2026). Ordinary recapture at full rates applies only to personal property and to bonus or accelerated depreciation, such as cost segregation components.
What happens to suspended passive losses when I sell a rental?
A fully taxable sale of your entire interest to an unrelated buyer frees them all against any income that year (IRC 469(g)). In our example $48,000 of freed losses saves $13,112. A 1031 exchange carries them forward, and an installment sale frees them in proportion to the gain recognized each year.
What are the tax implications of selling a rental property at a loss?
A loss on a rental held over a year is generally a Section 1231 loss, deductible against ordinary income rather than limited to $3,000 a year like a capital loss (IRC 1231). Watch the five-year lookback: a net 1231 loss now turns the next five years of 1231 gains into ordinary income up to the loss amount.
How Hans helps: the $5,000 Big Sale Tax Analysis runs your sale through every path that fits: a cash sale, a Section 453 installment sale, 1031, Opportunity Zones, charitable trusts, timing and loss offsets, year by year, and ends with a written recommendation your CPA can check. Get the Big Sale Tax Analysis.
Next step

Know 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.

Book a callCall Hans