The Waterfall Strategy

Home / Articles

Capital Gains on Rental Property: Every Tax You Owe on a Sale

By Hans Goldstein · Updated 2026-09-27

When you sell a rental, the gain is taxed in up to five layers: depreciation recapture on cost-segregated parts at ordinary rates, building depreciation at up to 25%, the rest of the long-term gain at 0%, 15% or 20%, the 3.8% net investment income tax, and state tax. For a high earner in a high-tax state, the combined federal and state rate on some of that gain can pass 40 cents on the dollar. Two things most guides leave out can move the number a lot: the suspended passive losses the sale can release, and the choice of when the gain lands.

The five layers

A simple example to hang the layers on: you bought a rental for $900,000 and took $600,000 of depreciation: $100,000 on cost-segregated short-life parts and $500,000 of regular straight-line building depreciation. Adjusted basis: $300,000. You sell for $1,500,000 (ignore selling costs). Gain: $1,200,000.

Layer Simple example Federal rate When it is taxed
1. Ordinary recapture (cost-seg parts) $100,000 Ordinary, up to 37% Always the year of sale, even on an installment sale (§453(i))
2. Unrecaptured §1250 gain (building depreciation) $500,000 Ordinary, capped at 25% As payments arrive; comes out of the earliest payments first (Reg. §1.453-12)
3. Long-term capital gain $600,000 0%, 15% or 20% As payments arrive
4. Net investment income tax On all of it, above the threshold 3.8% Same year as the gain
5. State Depends on the state Up to 13.3% in California On the state's own schedule

Layer 1: ordinary recapture. Depreciation on 5- and 7-year parts from a cost segregation study (and on personal property) is §1245 recapture. The 15-year land improvements (paving, fencing, landscaping) are §1250 property, but depreciation on them beyond straight line, including bonus, is recaptured as ordinary income under §1250(a). Both come back as ordinary income. It is taxed in the year of sale no matter how you are paid. See cost segregation before selling, and the depreciation recapture guide for how all three recapture layers are calculated.

Layer 2: unrecaptured §1250 gain. Straight-line depreciation on the building itself. It is taxed at your ordinary rate with a 25% ceiling (§1(h)(1)(E)). Where your income falls in brackets under 25%, it is taxed at those lower rates. The ISC guide to installment sale depreciation recapture covers how it is reported over time, and the Form 4797 guide shows where a rental sale lands on the return.

Layer 3: long-term capital gain. For 2026, married filing jointly: 0% while taxable income is at or below $98,900, 15% up to $613,700, and 20% above (Rev. Proc. 2025-32). The thresholds count your whole taxable income, gain included.

Layer 4: the 3.8% tax. It applies to the lesser of net investment income or modified AGI over $250,000 joint ($200,000 single, $125,000 married filing separately; §1411(b)). These thresholds are not indexed. Rental gain is investment income for a passive owner. A real estate professional who materially participates in a rental trade or business may be outside this layer (real estate professional status). The details are in net investment income tax on a rental property sale.

Layer 5: state. California has no capital gain rate: gain is ordinary income, up to 12.3% plus 1% on taxable income over $1 million, and that $1 million line is not doubled for joint filers (R&TC §17043). The state where the property sits taxes the gain wherever you live.

Worked example: $1.5 million sale, $600,000 of depreciation

Same simple example. Assumptions, stated plainly so you can check the math:

Without the sale: taxable income $167,800. Federal tax $26,340.

With the sale: taxable income $1,367,800 ($167,800 + $1,200,000).

Piece How it is taxed Tax
Wages after deduction, the $100,000 of recapture, and the first $135,750 of the building layer Regular brackets on the first $403,550 of taxable income (all of it taxed below 25%) $82,048.00
Long-term gain: first $210,150 15% (the band from $403,550 up to $613,700) $31,522.50
Long-term gain: remaining $389,850 20% $77,970.00
Remaining building layer: $364,250 25% ceiling (the tax computation stacks this slice last) $91,062.50
3.8% tax: modified AGI $1,400,000, minus $250,000 = $1,150,000 (less than the $1,200,000 of investment income) 3.8% $43,700.00
Total federal tax $326,303.00

The sale adds $299,963.00 of federal tax, about 25% of the gain (simple example). A California couple would add state tax on top at ordinary rates.

Notice what did not happen. The building layer was not all taxed at 25%: the slice that fit under the top of the 24% bracket was taxed at ordinary rates of 24% or less. And the Schedule D tax worksheet stacks the 25% slice last, so only $210,150 of the long-term gain got the 15% rate; the other $389,850 paid 20% because the sale year pushed taxable income far past $613,700. That is why spreading the gain over several years helps even with no losses at all.

The offset nobody mentions: suspended losses released on sale

If you are not a qualifying real estate professional, all of this gain, recapture included, is passive activity income (Temp. Reg. §1.469-2T(c)(2)(i)(A)). Passive losses stuck on Form 8582 are allowed to meet it. Two mechanisms:

  1. Any passive gain absorbs any passive loss. Losses from your other rentals and K-1s, current and carried forward, come off.
  2. The sold building's own suspended losses are freed when you sell your entire interest in the activity to an unrelated buyer in a fully taxable sale (§469(g)(1)(A)).

Add $200,000 of suspended passive losses to the worked example:

Simple example Federal tax Added by the sale
No sale $26,340.00
Sale, no suspended losses $326,303.00 $299,963.00
Sale, $200,000 of suspended losses released $268,703.00 $242,363.00

$200,000 of released losses cut the sale's federal tax by $57,600 (simple example). They took $200,000 off taxable income, and because the 25% slice is stacked last, all $200,000 came off that slice ($50,000). They also reduced investment income for the 3.8% tax ($7,600).

The losses help more when your other income is taxed higher. An allowed passive loss is a deduction, not a reduction of the gain, and §1(h) taxes ordinary income first. So the loss comes off your highest-taxed dollars first while the gain keeps its capital gain rate. The book calls that the rate swap, and it is explained in what happens to suspended passive losses when you sell.

Three limits. A 1031 exchange frees none of the building's own losses. A sale to a related party frees none. And if your rentals are grouped, or you made the real estate professional aggregation election, selling one building may not free that building's losses.

The loan payoff trap

Your gain does not depend on your loan. It is price minus adjusted basis. A mortgage paid off at closing is not cash to you, but the gain is still all yours.

A simple example: Same $1.5 million sale, but the owner did a cash-out refinance years ago and owes $1.2 million. After the payoff, $300,000 reaches his account. The gain is still $1,200,000, and in the worked example the federal tax the sale adds is $299,963, nearly all of the $300,000 he received, before any state tax (simple example).

On an installment sale, the trap has a second edge: cash the buyer uses at closing to pay off your mortgage is treated as a payment to you in the year of sale. Only a loan the buyer actually assumes or takes subject to is excluded, and only up to your basis (Temp. Reg. §15a.453-1(b)(3)(i)). A large payoff means a large year-one slice of gain whatever else you structure.

State tax: the ceilings

Ceilings, not typical rates. Each top state rate applies only above a high income line. Federal 25% or 20%, plus 3.8%, plus the state's top rate (from the book's state table):

State Top state rate used Building layer (§1250) Regular long-term gain
California 13.3% (12.3% + 1% over $1M) 42.1% 37.1%
New Jersey 10.75% (over $1M) 39.55% 34.55%
Minnesota 9.85% + 1% on net investment income over $1M 39.65% 34.65%
Oregon 9.9% 38.7% 33.7%
Massachusetts 5% + 4% over $1,107,750 (2026) 37.8% 32.8%
Pennsylvania 3.07% flat 31.87% 26.87%
Texas, Florida, Nevada, Tennessee 0%, only if the property is also there 28.8% 23.8%

Cost segregation recapture in California can reach 54.1 cents: 37% plus 3.8% plus 13.3%, due in year one. Spread over several years, California's piece is often 9.3% to 11.3% instead of 13.3%, because its brackets are graduated.

State passive loss rules differ too. California treats every rental as passive, even for a real estate professional, and allows no bonus depreciation, so its reservoir of losses is different from the federal one. Pennsylvania has no passive loss carryforward, and New Jersey's is limited.

Ways to shrink or spread it

Move What it does The catch
Full 1031 exchange Defers all five layers into a new property You stay in real estate; frees no suspended losses; boot is taxable (1031 boot)
Installment sale (seller financing or a structured sale) Layers 2 through 5 arrive as you are paid, in lower brackets, and each year's gain can meet that year's passive losses Layer 1 still lands in year one; the money is tied up; see below
Time the sale to a low-income year More gain in the 0% and 15% bands, under the 3.8% line One year only absorbs so much
Move into it first (§121) Excludes up to $250,000 ($500,000 joint) of gain Depreciation is never excluded; rental years after 2008 shrink the exclusion (how it works)
Hold until death Step-up erases the gain and the recapture (§1014) Suspended losses are allowed only above the step-up; the rest are lost
Give some away A gift of the property to charity avoids tax on that slice; a charitable remainder trust spreads it over the trust's payouts The gift is gone; a gift to family carries your basis with it

The full menu, with when each one wins, is in 30 alternatives to selling a rental, honestly ranked.

On installment sales. You can carry the buyer's note yourself (seller financing, secured by the property, with the buyer's credit and early-payoff risk) or use a structured installment sale, where the buyer's obligation is assigned to a company that makes the payments, usually funded by a fixed annuity that company owns; some programs use a funding agreement. In a structured sale you are an unsecured creditor of that company, the schedule is locked (no acceleration, pledging or changes), no IRS ruling specifically approves the arrangement, and the provider's commission is built into the pricing. The §453 tax math is the same either way. The ISC guide to an installment sale of real estate walks through both.

Where spreading does not help much: a high basis (little gain to spread), heavy cost segregation recapture (it is year one regardless), a large loan payoff at closing, or no losses and a gain small enough for one year's brackets. Spreading also locks up money you may need, and future payments are taxed at whatever rates apply when they arrive.

Bottom line

A rental sale is not one tax. It is recapture, a 25% layer, capital gain, the 3.8% tax and your state, and the sale year usually pushes every layer to its highest rate. The gain is passive income, so the losses stuck on your Form 8582 can come off your highest-taxed income in the same year. Run your own layers in the free calculator, then read the free book for how to time the gain to the losses.

Questions to ask your CPA

Get the full playbook. The Waterfall Strategy, the 20-minute version and the one-page Cliff Notes, free.

Send me the books Try the calculator

Educational only, not tax, legal or investment advice. Examples are illustrative. Have your CPA or tax attorney review your facts before you act. Hans Goldstein is a licensed insurance agent (CA Insurance License #4273294) and is not a CPA or attorney. He is paid a commission only if a structured installment sale is funded; seller financing pays him nothing. Disclosures.