Home  /  Guides  /  Capital Gains on Real Estate
Capital Gains

How Capital Gains Tax on Real Estate Works

Sell an investment property and the tax can claim a third or more of your gain. Here's exactly how it's calculated — the rates, the surtaxes, the recapture — and the legal ways to reduce it.

By Jerry Baker · Updated June 2026 · 16 min read

Before you can plan around the tax on a property sale, you have to understand how it's built — and it's built from more parts than most investors expect. The headline capital gains rate is only the beginning; layered on top are a depreciation-recapture rate, a 3.8% surtax, and state income tax, which together can claim a far larger share of your gain than the rate alone suggests. This memo walks through the full calculation as it stands in 2026, then points to the legal strategies that can defer or reduce the bill. It's general information, not tax advice; your CPA should run your actual numbers.

Key Takeaways
  • Your gain is the sale price minus your adjusted basis (original cost plus improvements, minus depreciation taken).
  • Long-term gains (assets held over a year) are taxed at 0%, 15%, or 20% depending on income; short-term gains at ordinary rates.
  • Two extra layers often apply: depreciation recapture (up to 25%) and the 3.8% net investment income tax — plus state tax.
  • Several legal strategies — 1031 exchanges, DSTs, Opportunity Zones, and others — can defer or even eliminate the tax.

How real estate capital gains are calculated

Capital gains tax applies to your gain, not your sale price, and getting the gain right is the foundation. Your gain is the amount realized on the sale (price minus selling costs) less your adjusted basis — broadly, what you originally paid, plus capital improvements you made, minus the depreciation you claimed while you owned it. That last subtraction surprises investors: because depreciation lowers your basis over the years, it increases your taxable gain at sale, which is why long-held, heavily depreciated properties can show a large gain even if the price rose only modestly. Pin down your adjusted basis first; everything else builds on it.

Short-term vs. long-term rates

How long you held the property determines the rate. Hold it more than a year and the gain is long-term, taxed at the preferential federal rates of 0%, 15%, or 20% depending on your taxable income. Hold it a year or less and the gain is short-term, taxed at your ordinary income rates, which run considerably higher. For investment real estate held for the long haul, the long-term rates apply — but, as the next sections show, the long-term rate is rarely the whole story. The exact income breakpoints for the 0/15/20% tiers adjust annually for inflation, so check the current thresholds for your filing status.

The 3.8% net investment income tax

On top of the capital gains rate, higher-income investors owe the net investment income tax (NIIT) — an additional 3.8% on investment income, including real estate capital gains, above certain income thresholds (broadly $200,000 for single filers and $250,000 for married couples filing jointly). Notably, these NIIT thresholds are not indexed for inflation, so over time more investors are pulled into it. For a high earner, the NIIT effectively turns a 20% long-term rate into 23.8% federal before state tax even enters — a meaningful addition that the headline rate hides.

Depreciation recapture

The layer that catches the most investors off guard is depreciation recapture. The depreciation deductions you took each year reduced your basis (and saved you tax along the way), and at sale that benefit is partly recaptured: the portion of your gain attributable to depreciation — "unrecaptured Section 1250 gain" — is taxed at a federal rate of up to 25%, higher than the long-term capital gains rate. So a sale can be taxed in two tiers: the depreciation-driven portion at up to 25%, and the remaining appreciation at 0/15/20%, with the NIIT potentially on top. We cover this fully in our memo on depreciation recapture; the key point here is that it can substantially raise your effective rate.

State income tax

Finally, most states tax capital gains as ordinary income, and there's generally no preferential state rate the way there is federally. In a high-tax state, the state bite can add high single digits or more to your total rate; in a no-income-tax state, it adds nothing. Stack the pieces — long-term federal rate, up-to-25% recapture, 3.8% NIIT, and state tax — and it becomes clear why a large sale in a high-tax state can surrender a third or more of the gain. This combined burden is precisely what makes deferral strategies so valuable.

Legal ways to defer or reduce the tax

The good news is that real estate offers more ways to defer or reduce this tax than almost any other asset. The most powerful is the 1031 exchange, which defers the entire bill — capital gains, recapture, and NIIT — by reinvesting in like-kind property; a Delaware Statutory Trust lets you do that passively. For gains of any kind (not just real estate), an Opportunity Zone fund defers and can later eliminate tax on new appreciation. Other tools include installment sales, charitable remainder trusts, the primary-residence exclusion, and simply holding until death for a stepped-up basis. We compare these in our memo on ways to avoid capital gains tax. The right choice depends on your goals, but the menu is broad — which is the real reason this tax is so often deferred rather than paid.

Frequently Asked Questions

How is capital gains tax on real estate calculated?

On your gain — the sale price minus selling costs and your adjusted basis (original cost plus improvements, minus depreciation taken). The gain is then taxed at the applicable rate, with recapture and surtaxes layered on.

What are the long-term capital gains rates?

Federally, 0%, 15%, or 20% depending on your taxable income, for assets held more than a year. Short-term gains (held a year or less) are taxed at ordinary income rates.

What is the 3.8% net investment income tax?

An additional 3.8% tax on investment income, including real estate gains, above certain income thresholds (about $200,000 single / $250,000 joint). The thresholds aren't inflation-indexed, so more investors face it over time.

Why is depreciation recapture taxed higher?

The depreciation you claimed reduced your basis and saved tax along the way, so at sale the portion of gain from depreciation is recaptured at up to 25% federally — higher than the long-term capital gains rate.

How can I avoid capital gains tax on a property sale?

Through legal deferral and reduction strategies — a 1031 exchange (or DST), an Opportunity Zone fund, an installment sale, a charitable remainder trust, the primary-residence exclusion, or holding until death for a stepped-up basis.

Glossary

Adjusted Basis
Original cost plus capital improvements, minus depreciation taken; subtracted from the sale price to find the gain.
Long-Term Capital Gain
Gain on an asset held more than a year, taxed at preferential federal rates of 0/15/20%.
Net Investment Income Tax (NIIT)
A 3.8% surtax on investment income above certain income thresholds.
Unrecaptured Section 1250 Gain
The depreciation-related portion of a real estate gain, taxed at up to 25%.

Disclosures

This memo is published by Baker 1031 for general informational and educational purposes only. It is not investment, legal, or tax advice, and is not an offer to sell or a solicitation to buy any security. Tax rules, rates, and thresholds are complex, depend on your individual circumstances, and change over time; consult your own CPA and attorney before acting.

Every figure and example here is general and illustrative, not a projection or a representation about any specific transaction. Securities offered through Aurora Securities, Inc., member FINRA / SIPC; Baker 1031 Investments is independent of Aurora Securities, Inc. Private placements referenced are sold only to verified accredited investors and involve substantial risk including loss of principal.

Jerry Baker

Get our tax-advantaged real estate research in your inbox.