Login
Financial Independence

Savings rate, FI number, and the path to freedom.

Retirement Strategies

Withdrawal plans, Roth ladders, and early access.

Investing

Index funds, asset allocation, and real estate.

Tax Strategies

Roth conversions, capital gains, and FI tax planning.

Earning More

Career growth, side hustles, and entrepreneurship.

Money Mindset

Beliefs, purpose, and financial psychology.

Health & Fitness

Exercise, nutrition, and mental wellness.

Capital Gains Tax on Real Estate: How It Works

Capital Gains Tax on Real Estate: How It Works

ChooseFI has partnered with CardRatings for our coverage of credit card products. ChooseFI and CardRatings may earn compensation from card issuers when a customer clicks on a link, when an application is approved, or when an account is opened. Opinions, reviews, analyses & recommendations are the author's alone, and have not been reviewed, endorsed or approved by any of these entities. American Express is a ChooseFI advertiser.

Capital Gains Tax on Real Estate: How It Works

Key Takeaways

  • You can exclude up to $250,000 in capital gains ($500,000 for married couples) when selling your primary residence if you lived in it for at least 2 of the past 5 years
  • Short-term capital gains (property held less than one year) are taxed at ordinary income tax rates up to 37%, while long-term gains are taxed at preferential rates of 0%, 15%, or 20%
  • Your cost basis is not just the purchase price — it includes closing costs, capital improvements (new roof, kitchen remodel, additions), and in some cases selling expenses, all of which reduce your taxable gain
  • Strategies to minimize or defer real estate capital gains include the Section 121 exclusion, 1031 exchanges for investment properties, installment sales, and opportunity zone investments

What's your FI number? Calculate it in 60 seconds

The one number that changes everything

Run the Calculator

Real Estate Capital Gains at a Glance

$250,000
Primary Residence Exclusion (Single)
$500,000
Primary Residence Exclusion (Married)
20%
Max Long-Term Rate

How Close Are You to Financial Independence?

Free calculators, a personalized FI roadmap, and a community of 25K+ on the same journey.

Short-Term vs Long-Term Capital Gains on Real Estate

The amount of tax you owe on a real estate sale depends primarily on how long you held the property. This single factor — your holding period — determines whether you pay ordinary income tax rates or the lower long-term capital gains rates.

Short-Term Capital Gains (Held 1 Year or Less)

If you sell a property you have owned for one year or less, the profit is taxed as short-term capital gains at your ordinary income tax rate. For high earners, this can mean paying 32% to 37% federal tax on the gain, plus state income tax. Short-term gains are the most expensive way to realize real estate profits, which is why house flippers face a significantly higher tax burden than long-term investors.

Long-Term Capital Gains Rates (Held More Than 1 Year)

Filing Status 0% Rate 15% Rate 20% Rate
Single Up to $47,025 $47,026 – $518,900 Over $518,900
Married Filing Jointly Up to $94,050 $94,051 – $583,750 Over $583,750
Head of Household Up to $63,000 $63,001 – $551,350 Over $551,350

These rates apply to taxable income after deductions, not gross income. Many FI retirees who have left traditional employment find themselves in the 0% or 15% long-term capital gains bracket — one of the most powerful tax advantages of early retirement.

The Net Investment Income Tax (NIIT)

In addition to the capital gains rate, high-income taxpayers owe an additional 3.8% Net Investment Income Tax on investment income (including real estate gains) when modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly). This brings the maximum effective federal rate on long-term real estate gains to 23.8%.

Real Example: The Tax Difference

Suppose you bought a rental property for $300,000, made $50,000 in improvements, and sold it for $500,000. Your gain is $150,000.

  • Short-term (held < 1 year), 32% bracket: $48,000 in federal tax
  • Long-term (held > 1 year), 15% bracket: $24,500 in federal tax
  • Savings from holding more than one year: $25,500

This is why timing matters enormously in real estate. Holding a property for just one additional day — crossing the one-year threshold — can save you tens of thousands of dollars.

The Primary Residence Exclusion (Section 121)

The Section 121 exclusion is the single most valuable tax benefit in real estate. If you sell your primary residence and meet the ownership and use tests, you can exclude up to $250,000 in capital gains from taxation ($500,000 for married couples filing jointly). This is not a deduction — it is a complete exclusion. The gain simply does not exist for tax purposes.

The Two-of-Five-Year Rule

To qualify, you must have owned AND used the home as your primary residence for at least 2 of the 5 years before the sale. The two years do not need to be consecutive. You can use this exclusion once every two years.

This rule creates powerful planning opportunities for FI-focused homeowners. If you bought a home, lived in it for two years, converted it to a rental for up to three years, and then sold it, you could still qualify for the exclusion because you used it as your primary residence for 2 of the past 5 years.

How to Calculate Your Cost Basis

Your capital gain is not simply the sale price minus the purchase price. The IRS allows you to add several costs to your basis, which reduces your taxable gain.

Adds to Your Basis (Reduces Gain) Does NOT Add to Basis
Original purchase price Routine maintenance and repairs
Closing costs at purchase (title, legal, recording fees) Homeowner's insurance premiums
Capital improvements (new roof, HVAC, addition, remodel) Utility costs
Assessments for local improvements (sidewalks, sewers) Landscaping maintenance
Selling expenses (agent commissions, transfer taxes) Furniture and personal property

Basis Calculation Example

  • Purchase price: $280,000
  • Closing costs at purchase: $8,000
  • Kitchen renovation: $35,000
  • New roof: $15,000
  • Bathroom addition: $22,000
  • Adjusted basis: $360,000

If you sell for $700,000:

  • Gross gain: $700,000 - $360,000 = $340,000
  • Less selling expenses (6% commission + fees): $44,000
  • Net gain: $296,000
  • Married filing jointly exclusion: $500,000
  • Taxable gain: $0

Keep every receipt for capital improvements. A $35,000 kitchen remodel receipt from 2015 could save you $5,250 or more in capital gains tax when you sell.

Strategies to Minimize or Defer Real Estate Capital Gains Tax

Beyond the primary residence exclusion, several strategies allow real estate investors to reduce, defer, or eliminate capital gains tax on property sales.

1031 Exchange (Like-Kind Exchange)

A 1031 exchange allows you to sell an investment property and defer all capital gains tax by reinvesting the proceeds into a "like-kind" replacement property. The rules are strict:

  • 45-day identification period: You must identify potential replacement properties within 45 days of selling
  • 180-day closing deadline: You must close on the replacement property within 180 days
  • Equal or greater value: The replacement property must be equal to or greater in value than the property sold
  • Qualified intermediary required: A third-party intermediary must hold the sale proceeds; you cannot touch the money
  • Investment property only: Your primary residence does not qualify; both properties must be held for investment or business use

A 1031 exchange does not eliminate the tax — it defers it. If you eventually sell the replacement property without doing another exchange, you owe tax on the accumulated gain from all prior exchanges. However, many investors execute a series of 1031 exchanges throughout their careers and eventually pass the properties to heirs, who receive a stepped-up basis that effectively eliminates the deferred gains.

Depreciation Recapture for Rental Properties

If you have been depreciating a rental property (as required by the IRS), the depreciation you claimed is "recaptured" at sale and taxed at your ordinary income tax rate, up to a maximum of 25%. If your marginal tax rate is below 25% (for example, 12% or 22%), you pay that lower rate on the recaptured depreciation — the 25% is a ceiling, not a flat rate. This is separate from and in addition to regular capital gains tax.

Component Tax Rate Example ($100K Total Gain)
Depreciation recapture Ordinary rate, up to 25% max $40,000 depreciation × up to 25% = up to $10,000
Remaining long-term gain 0%, 15%, or 20% $60,000 gain x 15% = $9,000
Total tax Blended $19,000

Other Strategies

Installment Sale (Section 453): Spread the gain over multiple years by receiving payments from the buyer over time. This can keep you in a lower tax bracket each year and is especially useful for large gains that would push you into the 20% capital gains bracket or trigger the 3.8% NIIT.

Opportunity Zone Investment: Invest capital gains into a Qualified Opportunity Zone Fund within 180 days of realizing the gain. You can defer the original gain until 2026 and potentially exclude gains on the new investment if held for 10+ years.

Convert to Primary Residence: If you own a rental property with significant appreciation, move into it and make it your primary residence for at least 2 years. You can then sell and use the Section 121 exclusion. Note: gains attributable to periods of non-qualified use (rental use after 2008) are not eligible for the exclusion.

Harvest Losses: If you have other investments with unrealized losses, sell them in the same year as your profitable real estate sale. Capital losses offset capital gains dollar-for-dollar, and up to $3,000 in excess losses can offset ordinary income.

Top Travel Card

Ready to unlock a world of free travel? Start with the Chase Sapphire Preferred® Card

$95 annual fee | Earn 75,000 bonus points

Best Card for Side Hustlers and Business Owners

Side hustlers! With the Ink Business Preferred® Credit Card you can earn free travel from your business expenses.

$95 annual fee | Earn 100,000 bonus points

Most Flexible Travel Card

The Capital One Venture Rewards Credit Card can be used to offset almost any travel expense.

$95 annual fee | Earn more than $1,000 in Travel Bonuses with a limited-time $300 Capital One Travel stays credit, plus earn 75,000 bonus miles once you spend $4,000 on purchases within the first 3 months of account opening—that's more than $1,000 in travel value

ChooseFI has partnered with CardRatings for our coverage of credit card products. ChooseFI and CardRatings may receive a commission from card issuers.

Keep Records of Every Home Improvement

Your cost basis includes every capital improvement you make to the property — new roof, HVAC replacement, kitchen remodel, bathroom addition, deck construction, and more. A $50,000 in documented improvements on a property held for 20 years can save you $7,500 to $10,000 in capital gains tax. Keep receipts, invoices, and before/after photos in a dedicated folder for each property. Routine repairs and maintenance do not count, but anything that adds value, prolongs life, or adapts the property to a new use qualifies as a capital improvement.

How to Calculate Capital Gains Tax on a Real Estate Sale

Follow these steps to determine your tax liability before selling.

1

Determine Your Adjusted Cost Basis

Start with your original purchase price. Add closing costs from the purchase, all capital improvements made during ownership, and any assessments for local improvements. Subtract any depreciation claimed on rental property. The result is your adjusted basis.

2

Calculate Your Net Gain

Subtract your adjusted basis from the net sale price (sale price minus selling expenses like real estate commissions, transfer taxes, and closing costs). The result is your capital gain.

3

Apply the Primary Residence Exclusion (If Eligible)

If the property was your primary residence and you lived in it for at least 2 of the past 5 years, exclude up to $250,000 ($500,000 married filing jointly) from the gain. If your gain is below the exclusion amount, you owe zero capital gains tax.

4

Determine Your Holding Period and Tax Rate

If you held the property for more than one year, long-term capital gains rates (0%, 15%, or 20%) apply based on your taxable income. If held for one year or less, short-term rates (your ordinary income tax rate) apply. Add 3.8% NIIT if your MAGI exceeds $200,000 single or $250,000 married.

5

Account for Depreciation Recapture (Rental Properties)

If you claimed depreciation on a rental property, the total depreciation is recaptured and taxed at your ordinary income tax rate (up to a maximum of 25%) when you sell. Calculate this separately from the remaining capital gain, which is taxed at your applicable long-term capital gains rate.

Correction — October 30, 2026

An earlier version of this article stated that depreciation recapture is taxed at a flat 25% rate. The correct rule is that depreciation recapture is taxed at your ordinary income tax rate, up to a maximum of 25%. The article has been updated.

Frequently Asked Questions

The Bottom Line

Capital gains tax on real estate can take a significant bite out of your profits — but the tax code provides powerful tools to reduce, defer, or eliminate it. The Section 121 exclusion ($250K single / $500K married) makes selling a primary residence tax-free for most homeowners. For investment properties, 1031 exchanges defer gains indefinitely, and strategies like installment sales, opportunity zones, and loss harvesting provide additional options. The key for FI-focused real estate investors is planning: track your cost basis meticulously, time your holding periods to qualify for long-term rates, and consult a tax professional before selling high-value properties. Real estate remains one of the most tax-advantaged asset classes when you understand and use the rules strategically.

Section 121 Exclusion (MFJ)

$500,000

Long-Term Max Rate

20% + 3.8%

Max Depreciation Recapture Rate

25%

Up Next

Scroll up to cancel

Calculate Your FI Number

See exactly how much you need to retire on your terms. Get a personalized plan in seconds.

Trusted by 30,000+ members

Model pensions, Social Security & life changes

100% free — no credit card required

or

100% free — no credit card required

Account created! Redirecting...

Try searching for

⌘K to open anytime

Where Are You on the Path to FI?

1/3

Step 1 of 3

Which of these sounds most like you?

Scan to get the app

Point your phone camera at the QR code