Capital Gains Tax on Real Estate 2026: How to Calculate and Minimize

What Capital Gains Tax Means for Homeowners and Investors

When you sell a property for more than you paid, the profit is a capital gain. The IRS wants a share of that profit, and the amount depends on how long you owned the property, whether it was your primary residence, and your taxable income. For many homeowners, the tax bill is zero thanks to the primary residence exclusion. For investors, the bill can be substantial, but there are legal strategies to reduce or defer it.

This guide covers the 2026 rules for capital gains on real estate, walks through the calculations with real numbers, and explains every major strategy for minimizing what you owe. Use the estimate your property taxes to understand your ongoing tax obligations alongside these one-time capital gains considerations.

Short-Term vs Long-Term Capital Gains

The IRS draws a hard line at one year of ownership. Properties sold within 12 months of purchase are taxed at short-term capital gains rates, which are the same as your ordinary income tax rate. Properties held for more than 12 months qualify for the more favorable long-term capital gains rates.

Holding Period Tax Treatment 2026 Tax Rates
12 months or less Short-term (ordinary income) 10%, 12%, 22%, 24%, 32%, 35%, or 37%
More than 12 months Long-term capital gains 0%, 15%, or 20%

The difference is enormous. A married couple with $150,000 in ordinary income who flips a property for a $100,000 profit within 6 months pays 24% on that gain ($24,000 in tax). If they had held the same property for 13 months, the long-term rate of 15% applies ($15,000 in tax). That extra month of ownership saved $9,000.

2026 Long-Term Capital Gains Brackets

Filing Status 0% Rate 15% Rate 20% Rate
Single Up to $48,350 $48,351 – $533,400 Over $533,400
Married Filing Jointly Up to $96,700 $96,701 – $600,050 Over $600,050
Head of Household Up to $64,750 $64,751 – $566,700 Over $566,700

Note: High earners may also owe the 3.8% Net Investment Income Tax (NIIT) on top of these rates, pushing the effective maximum to 23.8%.

The Primary Residence Exclusion: $250K/$500K

Section 121 of the tax code allows homeowners to exclude up to $250,000 of capital gains ($500,000 for married couples filing jointly) when selling a primary residence. This is one of the most valuable tax benefits available to individuals.

Qualification Requirements

You must have owned the home for at least 2 of the last 5 years before the sale (ownership test). You must have lived in the home as your primary residence for at least 2 of the last 5 years (use test). You have not used this exclusion on another home sale in the past 2 years.

The 2-year requirements do not need to be consecutive. You could live in the home for 12 months, move out for 18 months, move back for 12 months, and still qualify as long as the total time meets 24 months within the 5-year window.

Partial Exclusion

If you do not meet the full 2-year requirements due to a work relocation, health condition, or other unforeseen circumstances, you may qualify for a partial exclusion proportional to the time you did live there. For example, living in the home for 12 months instead of 24 gives you 50% of the exclusion ($125,000 single / $250,000 married).

Calculating Your Capital Gain

Your capital gain is not simply the sale price minus the purchase price. The calculation is more detailed and works in your favor if you track expenses properly.

Capital Gain = Sale Price – Selling Costs – Adjusted Cost Basis

Your adjusted cost basis includes the original purchase price, closing costs when you bought (title insurance, attorney fees, transfer taxes), capital improvements (not repairs) made during ownership, and any depreciation claimed if the property was rented.

Example Calculation

Item Amount
Sale price $650,000
Selling costs (agent commissions, closing costs) -$39,000
Net sale proceeds $611,000
Original purchase price $350,000
Purchase closing costs +$8,500
Capital improvements (new roof, kitchen remodel) +$62,000
Adjusted cost basis $420,500
Capital gain $190,500

If this was a primary residence owned for 2+ years, the $190,500 gain falls entirely within the $250,000/$500,000 exclusion. Tax owed: $0. If this was an investment property, the tax at the 15% rate would be $28,575, or $36,099 including the 3.8% NIIT.

Review our net proceeds calculator to estimate your actual take-home amount after taxes and closing costs.

Capital Improvements vs Repairs: What Counts

Capital improvements increase your cost basis and reduce your taxable gain. Repairs do not. The distinction matters and the IRS is specific about the difference.

Capital Improvements (Add to Basis) Repairs (Do Not Add to Basis)
New roof Patching a leak
Kitchen or bathroom remodel Replacing a faucet
Room addition Repainting walls
New HVAC system HVAC filter replacement
Deck or patio construction Deck staining
Finished basement Fixing drywall cracks
New windows Replacing broken glass pane
Swimming pool installation Pool cleaning and chemical treatment

The general rule: if it adds value, extends the useful life, or adapts the property to a new use, it is an improvement. If it merely maintains the property’s current condition, it is a repair. Keep receipts for everything. An organized file of improvement receipts can save you tens of thousands in taxes when you eventually sell. The renovation ROI calculator helps you evaluate which improvements are worth making from both a resale and tax perspective.

Strategies to Minimize or Defer Capital Gains Tax

1. Use the Primary Residence Exclusion Strategically

If you are converting a rental property to your primary residence, plan ahead. Live in the property for at least 2 of the 5 years before selling to qualify for the exclusion. Note that any gain attributable to depreciation taken during rental use is subject to depreciation recapture tax at 25%, even if the overall gain falls within the exclusion.

2. 1031 Exchange for Investment Properties

Section 1031 allows you to defer capital gains tax by reinvesting the sale proceeds into a like-kind property. The gain is not eliminated but deferred until you eventually sell the replacement property (or it passes to heirs with a stepped-up basis). Read our complete 1031 exchange guide for the rules and timelines.

3. Installment Sales

Instead of receiving the full sale price at closing, you can structure an installment sale where the buyer pays you over several years. This spreads the capital gain across multiple tax years, potentially keeping you in a lower tax bracket each year. The IRS requires you to report gain proportionally as you receive payments.

4. Harvest Losses

Capital losses from other investments can offset capital gains from real estate. If you have stocks or other assets with unrealized losses, selling them in the same tax year as your property can reduce your net capital gain. Up to $3,000 of excess capital losses can offset ordinary income, with the remainder carried forward.

5. Timing the Sale

If you are close to a bracket threshold, timing your sale to a year with lower income can drop your capital gains rate. Retirees who have a gap year between working and drawing Social Security, for example, might pay 0% on long-term gains if their total income stays within the 0% bracket.

6. Opportunity Zones

Investing capital gains into a Qualified Opportunity Zone fund within 180 days of the sale can defer the original gain. If the investment is held for 10 or more years, any appreciation on the new investment is tax-free. This strategy is complex and requires careful due diligence on the opportunity zone investment itself.

Depreciation Recapture: The Hidden Tax

If you claimed depreciation on a rental or investment property, the IRS requires you to “recapture” that depreciation at sale. Depreciation recapture is taxed at a flat 25%, regardless of your income level. This applies even if the overall gain qualifies for the lower 15% or 20% long-term rate.

Example: You bought a rental for $300,000, claimed $50,000 in depreciation over the years, and sold for $400,000. Your adjusted basis is $250,000 ($300,000 – $50,000 depreciation). Your total gain is $150,000. The first $50,000 (depreciation recapture) is taxed at 25% ($12,500). The remaining $100,000 is taxed at your long-term capital gains rate.

This is why a 1031 exchange is so popular with rental property owners: it defers both the capital gain and the depreciation recapture tax.

State Capital Gains Taxes

Federal tax is only half the picture. Most states also tax capital gains, typically at the same rate as ordinary income. A few notable state situations include California taxing capital gains up to 13.3%, New York plus New York City combined rate up to 12.7%, and states like Florida, Texas, Nevada, and Washington having no state income tax on capital gains. Check your state’s page for local context on tax implications.

Record-Keeping Essentials

The IRS can audit your capital gains calculation, and the burden of proof for cost basis and improvements falls on you. Keep the original closing disclosure (HUD-1 or CD) from when you bought. Save all receipts for capital improvements with dates and descriptions. Maintain records of any casualty losses or insurance reimbursements. Keep proof of primary residence status (utility bills, voter registration, driver’s license). Store these records for at least 3 years after filing the return that reports the sale, or 6 years if you underreported income by more than 25%.

Frequently Asked Questions

Do I pay capital gains tax if I sell my house at a loss?

No. If you sell for less than your adjusted cost basis, there is no capital gain and no tax. However, if the property was your primary residence, you cannot deduct the loss on your tax return. Losses on investment or rental properties can offset other capital gains or up to $3,000 of ordinary income per year.

Can I avoid capital gains by reinvesting in another home?

For your primary residence, the $250K/$500K exclusion makes reinvestment irrelevant for most homeowners since the gain is excluded regardless. For investment properties, a 1031 exchange allows you to defer the tax by reinvesting into a like-kind property within strict timelines. Simply using the proceeds to buy another home without following 1031 rules does not defer the tax.

How does divorce affect the primary residence exclusion?

If the home is transferred as part of a divorce settlement, the receiving spouse takes over the original cost basis. They can use the transferring spouse’s time of ownership and use toward the 2-year requirement. If the home is sold as part of the divorce, both spouses can claim up to $250,000 each if they both meet the ownership and use tests.

What if I rented out my primary residence for a few years?

You can still claim the primary residence exclusion if you lived in the home for at least 2 of the last 5 years. However, gain attributable to periods after 2008 when the home was not your primary residence may not qualify for the exclusion. Additionally, any depreciation claimed during the rental period is subject to 25% recapture tax. The calculation is complex and worth discussing with a tax professional.

Is inherited property subject to capital gains tax?

Inherited property receives a “stepped-up” basis equal to the fair market value on the date of the decedent’s death. This means that all appreciation during the original owner’s lifetime is never taxed. You only owe capital gains on appreciation from the date of inheritance to the date of sale. This makes inheriting real estate one of the most tax-efficient ways to transfer wealth. Review the broader implications in our real estate glossary.