Back to Insights
1031 Exchange

How Capital Gains Tax on Real Estate Works

July 2, 2025 12 min read Jerry Baker
Jump to FAQ
Listen to this insight

Executive Summary

A complete memo on capital gains tax for real estate investors: how the gain is calculated, short- vs long-term rates, the 3.8% net investment income tax, depreciation recapture, state tax, and the legal ways to defer or reduce it.

Sell an investment property and the tax can claim a quarter to a third of your gain, sometimes more. The headline capital gains rate is only the opening line. Stacked on top are a depreciation-recapture rate, a 3.8% surtax, and state income tax, and together they take a far bigger share than the rate alone implies. This memo walks through the full calculation as it stands in 2026, line by line, then lays out the legal strategies that defer or reduce the bill. It is general information, not tax advice. Your CPA should run your actual numbers before you sign anything.

How the gain is calculated

Capital gains tax applies to your gain, not your sale price. Getting the gain right is the whole foundation, and most disputes with a CPA start here. Your gain is the amount realized (sale price minus selling costs like the brokerage commission, title, and transfer taxes) less your adjusted basis. Adjusted basis is what you originally paid for the property, plus the capital improvements you made over the years, minus the depreciation you claimed while you owned it.

That last subtraction is the one that surprises people. Depreciation is a paper deduction that lowers your taxable income each year you hold a rental, but it also chips away at your basis. A lower basis means a larger gain at sale. So a property you bought for $500,000, improved with a $100,000 renovation, and depreciated by $150,000 over the years has an adjusted basis of $450,000, not $600,000. Sell it for $800,000 net and your gain is $350,000, not the $200,000 the purchase-to-sale spread suggests. Pin down your adjusted basis first. Every number that follows is built on it, and a sloppy basis figure quietly inflates the tax on everything downstream.

Keep the receipts. Improvements that add to basis (a new roof, an addition, a full kitchen rebuild) are easy to lose track of over a decade of ownership, and each dollar of documented improvement is a dollar that does not get taxed at sale. Routine repairs do not count, since those were already deducted as expenses. If you want to model the arithmetic on your own numbers, our capital gains tax calculator walks through the same steps.

One more wrinkle on basis. If you acquired the property through a prior 1031 exchange, your basis carried over from the property you gave up, not the price you paid for the new one. That carryover keeps the deferred gain alive inside the current property, so a building you bought for $1 million might carry a basis well below that. Inherited property works the opposite way, since the basis steps up to fair market value at the prior owner's death. Knowing which path your property took matters before you estimate any tax, because the two can produce very different gains on the same sale price.

Short-term vs. long-term rates

How long you held the property sets the rate, and the cutoff is exactly one year. Hold the property 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 top out far higher than 20%. For a flipper who closes in eight months, that distinction alone can be the difference between a 20% rate and a rate in the high 30s.

Most investment real estate is held for years, so the long-term rates usually apply. But the long-term rate is rarely the whole story, as the next three sections show. Which of the 0/15/20% tiers you land in depends on your total taxable income for the year, not just the size of the gain, and a large gain can push part of your income from the 15% tier into the 20% tier in the same return. The breakpoints below are approximate 2026 figures and adjust annually for inflation, so confirm the current numbers for your filing status before relying on them.

2026 long-term rateSingle (taxable income)Married filing jointly
0%Up to ~$49,450Up to ~$98,900
15%~$49,450 to ~$545,500~$98,900 to ~$613,700
20%Above ~$545,500Above ~$613,700
Approximate 2026 brackets, illustrative only. Thresholds are indexed for inflation and change each year. Short-term gains are taxed at ordinary income rates, not the figures above.

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 extra 3.8% on net investment income (which includes real estate capital gains) once your modified adjusted gross income clears the threshold. The thresholds are $200,000 for single filers and $250,000 for married couples filing jointly. The 3.8% applies to the smaller of your net investment income or the amount your MAGI exceeds the threshold, so a big one-time gain frequently triggers it in full.

Two details matter for planning. First, the NIIT thresholds are not indexed for inflation. They were set over a decade ago and have not moved, so each year, ordinary wage growth pulls more sellers above the line. Second, a property sale is exactly the kind of event that spikes your MAGI for a single year, which means investors who never owe NIIT on their normal income can owe it in the year they sell. For a high earner, the NIIT turns a 20% long-term rate into 23.8% federal before state tax even enters the picture. We break down the mechanics in our memo on the net investment income tax.

Depreciation recapture

The layer that ambushes the most investors is depreciation recapture. Every year you owned the rental, depreciation reduced your basis and saved you tax at your ordinary rate. At sale, the government takes some of that benefit back. The portion of your gain attributable to depreciation, called unrecaptured Section 1250 gain, is taxed at a federal rate of up to 25%, higher than the 0/15/20% long-term rate that applies to the rest of the gain.

In practice, a real estate sale gets sliced into two pieces. The depreciation-driven portion is taxed at up to 25%, and the remaining appreciation is taxed at the long-term 0/15/20% rate, with the 3.8% NIIT potentially riding on top of both. Take the $350,000 gain from the example above. If $150,000 of it represents recaptured depreciation, that slice faces up to 25%, while the other $200,000 of appreciation faces the long-term rate. Recapture is also why investors who depreciated aggressively can owe a large tax bill even when the sale price barely beat what they paid. It is not optional and it is not waived by simply forgetting to claim depreciation, since the IRS recaptures the depreciation you were allowed to take, whether or not you actually claimed it. Our memo on depreciation recapture covers the edge cases in full.

State income tax

Then the state takes its turn. Most states tax capital gains as ordinary income, with no preferential rate of the kind the federal system offers. A handful of states have no income tax at all, so the state layer adds nothing for residents there. Others, including California, sit at the high end and can add high single digits to your total rate on the same gain. The state generally taxes the gain where the property is located, not only where you live, so selling an out-of-state rental can pull you into another state's return.

Stack the pieces and the arithmetic gets heavy. A long-term federal rate, depreciation recapture up to 25% on part of the gain, the 3.8% NIIT, and a state income tax all apply to the same sale. That is how a seller in a high-tax state can hand over roughly 25% to 35% or more of the gain in combined tax. This is the exact pressure that makes deferral strategies worth the trouble. The table below shows the full stack a high-income seller in a high-tax state can face.

Tax layerApplies toIllustrative federal rate
Long-term capital gainsAppreciation portion of the gain0%, 15%, or 20%
Depreciation recapture (§1250)Depreciation-driven portion of the gainUp to 25%
Net investment income taxGain, once MAGI clears the threshold3.8%
State income taxThe full gain, on the state's scheduleVaries (0% to high single digits+)
Illustrative layers, not a projection. A given sale may face some or all of these depending on income, holding period, depreciation history, and state. Confirm your numbers with your CPA.

Ways to defer or reduce the tax

Real estate offers more ways to defer or reduce this tax than almost any other asset, which is the real reason the bill is so often pushed forward rather than paid. The catch worth stating plainly: most of these are deferral, not forgiveness. They move the tax to a later year, a later transaction, or a different taxpayer, and each comes with its own rules and risks. Here is the menu.

  • A 1031 exchange defers the entire bill, capital gains, recapture, and NIIT, when you reinvest the proceeds into like-kind property. The rules are strict: identify replacement property within 45 days, close within 180 days, buy equal or up in value, and replace the debt you paid off. Miss a deadline and the deferral is gone.
  • A Delaware Statutory Trust (DST) is a passive way to complete a 1031. Instead of buying and managing a replacement building yourself, you take a fractional interest in an institutionally managed property. DSTs are securities, speculative and illiquid, sold only to verified accredited investors via private placement memorandum, and you can lose principal.
  • An Opportunity Zone fund works on gains of any kind, not just real estate. Rolling a gain into a qualified fund defers it, and appreciation on the new investment can later be excluded if you hold long enough.
  • An installment sale under §453 spreads the gain (and the tax) across the years you collect payments, which can keep you in lower brackets. Note that depreciation recapture is generally taxed up front, not spread.
  • A §1033 involuntary conversion defers tax when property is lost to condemnation, casualty, or a forced sale and you reinvest the proceeds, with timelines more generous than a 1031.
  • The §121 primary-residence exclusion wipes out up to $250,000 of gain for single filers and $500,000 for joint filers, but it is for a home you lived in, not a rental.
  • A charitable remainder trust lets you contribute the property, sell it inside the trust without immediate tax, draw an income stream, and leave the remainder to charity.
  • The step-up in basis at death resets an heir's basis to fair market value, which can erase the built-in gain entirely for the next generation. This is why some investors hold until death rather than sell.

No single tool is right for everyone, and several can be combined. We line them up side by side in our memo on how to avoid capital gains tax on investment property, and weigh the trade-offs in tax deferral strategies compared. The right path depends on your goals, your timeline, and whether you want to stay an active landlord or step back. None of it guarantees a tax outcome, and you should confirm any strategy with your own CPA and attorney before acting.

A worked example

Numbers make the stack concrete. Suppose you bought a rental for $500,000, put $100,000 into a documented renovation, and claimed $150,000 of depreciation over the years you held it. Your adjusted basis is $450,000. You sell for $830,000 and pay $30,000 in selling costs, so your amount realized is $800,000 and your total gain is $350,000.

That gain splits in two. The first $150,000 is unrecaptured §1250 gain, taxed at up to 25% federally. The remaining $200,000 is long-term appreciation, taxed at the 0/15/20% rate that matches your income, likely 15% or 20% on a gain this size. If your MAGI clears the NIIT threshold, add 3.8% across the gain. Then your state applies its own rate to the full $350,000. Depending on your bracket and state, the combined federal-and-state tax on this sale can land somewhere in the neighborhood of $90,000 to $120,000, which is why a 1031 exchange that defers the entire amount is worth serious thought before you list. Notice how much of that bill comes from the recapture slice and the surtax, the two layers the headline rate never mentions. These figures are illustrative, not a projection, and your CPA should run the real ones on your actual basis, holding period, and state of residence.

FAQ

Frequently Asked Questions

How is capital gains tax on real estate calculated?

On your gain, not your sale price. The gain is the net sale price (price minus selling costs) less your adjusted basis, which is original cost plus capital improvements, minus the depreciation you took. That gain is then taxed at the applicable rate, with depreciation recapture and surtaxes layered on top.

What are the 2026 long-term capital gains tax rates?

Federally, 0%, 15%, or 20% depending on your taxable income, for assets held more than a year. As an approximate 2026 guide, the 0% tier runs up to about $49,450 of taxable income for single filers and $98,900 for joint filers, and the 20% tier begins above roughly $545,500 single and $613,700 joint. Short-term gains, on property 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 net investment income, including real estate gains, once your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers. Those thresholds are not indexed for inflation, and a one-time property sale often spikes your income enough to trigger it in the year you sell.

Why is depreciation recapture taxed higher than capital gains?

The depreciation you claimed reduced your basis and saved you tax at your ordinary rate while you owned the property. At sale, the portion of gain attributable to that depreciation, called unrecaptured Section 1250 gain, is recaptured at a federal rate of up to 25%, higher than the long-term capital gains rate that applies to the rest of the gain.

How much of my gain will I actually lose to tax?

It depends on your income, your state, and how much depreciation you took, but a high-income seller in a high-tax state can lose roughly 25% to 35% or more of the gain once the long-term rate, up-to-25% recapture, the 3.8% NIIT, and state income tax are all stacked together. In a no-income-tax state with a modest gain, the share is lower.

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

Through legal deferral and reduction tools: a 1031 exchange (or a passive DST version), an Opportunity Zone fund, an installment sale, a Section 1033 involuntary conversion, the Section 121 exclusion for a primary residence, a charitable remainder trust, or holding until death for a stepped-up basis. Most defer rather than erase the tax, and each has its own rules and risks.

Does the primary-residence exclusion apply to a rental property?

No. The Section 121 exclusion of up to $250,000 of gain for single filers and $500,000 for joint filers applies to a home you used as your primary residence, generally for two of the last five years. A pure rental does not qualify, though converting a former residence has its own partial rules. Investors typically reach for a 1031 exchange instead.

Is a 1031 exchange the same as avoiding the tax forever?

Not quite. A 1031 exchange defers the tax by rolling it into your replacement property's basis, so it carries forward until you sell without exchanging again. If you keep exchanging and ultimately hold until death, the step-up in basis can eliminate the deferred gain for your heirs, which is how some investors turn deferral into permanent savings.

Glossary

Key Terms

Adjusted Basis
Original cost plus capital improvements, minus depreciation taken. Subtracted from the net sale price to find your taxable gain.
Amount Realized
The sale price minus selling costs such as commissions, title, and transfer taxes. The starting figure for computing gain.
Long-Term Capital Gain
Gain on an asset held more than one year, taxed at the preferential federal rates of 0%, 15%, or 20% by income.
Short-Term Capital Gain
Gain on an asset held one year or less, taxed at ordinary income rates rather than the preferential long-term rates.
Net Investment Income Tax (NIIT)
A 3.8% surtax on net investment income above $200,000 of MAGI for single filers and $250,000 for joint filers. Thresholds are not inflation-indexed.
Unrecaptured Section 1250 Gain
The depreciation-related portion of a real estate gain, taxed at a maximum federal rate of 25%.
1031 Exchange
A like-kind exchange under IRC Section 1031 that defers capital gains, recapture, and NIIT when proceeds are reinvested in qualifying replacement property within the 45- and 180-day windows.
Step-Up in Basis
The reset of an inherited asset's basis to fair market value at the owner's death, which can erase the built-in gain for heirs.
JB
Gerald F. “Jerry” Baker, III
Managing Principal · Baker 1031 Investments · Registered Representative, Aurora Securities, Inc.

Jerry works directly with investors — principal to investor — sourcing and independently vetting institutional-quality DST and 1031 offerings, and helping investors understand the structure before deciding whether it suits their goals.

Educational content, not tax, legal, or investment advice. DST and securities interests are offered to accredited investors through Aurora Securities, Inc. (member FINRA/SIPC) following a suitability review. Subject to Aurora Securities principal approval before publication.