What is Capital Gains Tax?

Capital gains tax is a federal tax imposed on the profit you make when selling an asset for more than you paid for it. In real estate, this means the tax applies to the difference between your property's sale price and its adjusted cost basis.

Key Formula:

Capital Gain = Sale Price - Adjusted Cost Basis - Selling Expenses

The adjusted cost basis includes your original purchase price plus any capital improvements you've made to the property. Selling expenses include real estate commissions, legal fees, and other costs directly related to the sale.

Short-term vs. Long-term Capital Gains

The length of time you own the property significantly affects your tax rate:

  • Short-term gains: Property held for one year or less - taxed as ordinary income (10%-37%)
  • Long-term gains: Property held for more than one year - taxed at preferential rates (0%, 15%, or 20%)

2025 Capital Gains Tax Rates

Long-term capital gains tax rates for 2025 are based on your taxable income and filing status:

Long-term Capital Gains Tax Rates (2025)

Tax Rate Single Filers Married Filing Jointly Married Filing Separately Head of Household
0% $0 - $47,025 $0 - $94,050 $0 - $47,025 $0 - $63,000
15% $47,026 - $518,900 $94,051 - $583,750 $47,026 - $291,850 $63,001 - $551,350
20% $518,901+ $583,751+ $291,851+ $551,351+

Net Investment Income Tax (NIIT)

High-income earners may also owe an additional 3.8% Net Investment Income Tax on capital gains from investment properties. The NIIT applies to taxpayers with modified adjusted gross income above:

  • $200,000 for single filers
  • $250,000 for married filing jointly
  • $125,000 for married filing separately

How to Calculate Your Capital Gain

Calculating your capital gain requires understanding your adjusted cost basis, which includes more than just your purchase price.

Components of Cost Basis:

  1. Original purchase price
  2. Purchase closing costs: Title insurance, legal fees, recording fees, surveys
  3. Capital improvements: Major renovations that add value or extend property life
  4. Less: Depreciation claimed (for rental properties)

Example Calculation:

Purchase price: $300,000
Purchase closing costs: $8,000
Capital improvements: $50,000 (new roof, kitchen remodel)
Adjusted cost basis: $358,000

Sale price: $500,000
Selling expenses: $30,000 (commissions, fees)
Net proceeds: $470,000

Capital gain: $470,000 - $358,000 = $112,000

Use our free calculator to estimate your capital gains tax →

Primary Residence Exemption

One of the most valuable tax benefits available to homeowners is the primary residence capital gains exclusion, also known as Section 121 exclusion.

Exclusion Amounts (2025):

  • Single taxpayers: Up to $250,000 in capital gains
  • Married couples filing jointly: Up to $500,000 in capital gains

Qualification Requirements:

  1. Ownership test: You must have owned the home for at least 2 years
  2. Use test: You must have lived in the home as your primary residence for at least 2 years
  3. Frequency test: You haven't used the exclusion in the previous 2 years

💡 Pro Tip:

The 2-year requirement doesn't have to be consecutive or immediately before the sale. You can meet the requirement if you lived in the home for 24 months total during the 5-year period ending on the sale date.

Partial Exclusions

If you don't meet the full requirements due to:

  • Change in employment
  • Health reasons
  • Unforeseen circumstances

You may qualify for a partial exclusion based on the time you did meet the requirements.

1031 Like-Kind Exchanges

Named after Section 1031 of the Internal Revenue Code, a like-kind exchange allows you to defer capital gains taxes by reinvesting the proceeds from your property sale into a similar investment property.

Key Requirements:

  • Both properties must be held for investment or business use
  • Properties must be of "like-kind" (any real estate for any other real estate)
  • Must follow strict timing rules

Critical Deadlines:

  1. 45-day rule: Identify replacement property within 45 days of sale
  2. 180-day rule: Complete purchase of replacement property within 180 days

1031 Exchange Example:

You sell a rental property for $400,000 with a basis of $200,000 (potential gain of $200,000). Instead of paying capital gains tax, you reinvest in a $450,000 replacement property through a 1031 exchange, deferring the $200,000 gain until you eventually sell the new property.

Calculate your 1031 exchange savings →

Depreciation Recapture

If you've owned rental property and claimed depreciation deductions, you'll face depreciation recapture when you sell. This applies even if you didn't actually claim the depreciation - the IRS treats it as if you should have claimed it.

How Depreciation Recapture Works:

  • Recapture rate: Up to 25% (regardless of your capital gains rate)
  • Applies to the lesser of: depreciation claimed or actual gain
  • Calculated separately from capital gains

Depreciation Recapture Example:

Rental property details:
Purchase price: $300,000
Total depreciation claimed: $60,000
Sale price: $450,000
Adjusted basis: $240,000 ($300,000 - $60,000)

Total gain: $210,000 ($450,000 - $240,000)
Depreciation recapture: $60,000 (taxed at 25%)
Capital gain: $150,000 (taxed at capital gains rates)

Calculate depreciation recapture →

State Capital Gains Taxes

While federal capital gains rules are consistent nationwide, state treatment varies significantly:

No State Capital Gains Tax:

  • Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming

States with Favorable Rates:

  • Arizona: 25% exclusion on long-term gains
  • Hawaii: Alternative capital gains rate
  • South Carolina: 44% exclusion for gains on assets held 5+ years

High-Tax States:

  • California: Up to 13.3% (including 1% mental health tax on income over $1 million)
  • New York: Up to 10.9% (plus NYC tax)
  • Oregon: Up to 9.9%

See complete state-by-state tax rates →

Tax Minimization Strategies

Smart tax planning can significantly reduce your capital gains tax burden:

1. Timing Your Sale

  • Hold property for more than one year to qualify for long-term rates
  • Consider spreading sales across multiple tax years
  • Time sales to stay within lower tax brackets

2. Maximize Your Cost Basis

  • Keep detailed records of all capital improvements
  • Include purchase-related expenses in basis
  • Consider cost segregation for rental properties

3. Installment Sales

  • Spread gain recognition over multiple years
  • May keep you in lower tax brackets
  • Reduces impact of NIIT for high earners

4. Tax-Loss Harvesting

  • Offset gains with losses from other investments
  • Carry forward unused losses to future years
  • Consider timing of other asset sales

5. Charitable Strategies

  • Donate appreciated property to charity
  • Consider charitable remainder trusts
  • Get deduction at fair market value, avoid capital gains

Real-World Examples

Case Study 1: Primary Residence Sale

Situation: Married couple sells primary residence after living there 5 years
Purchase price: $400,000
Capital improvements: $75,000
Sale price: $850,000
Selling costs: $50,000

Calculation:
Adjusted basis: $475,000
Net proceeds: $800,000
Total gain: $325,000

Tax result:
Primary residence exclusion: $325,000 (within $500,000 limit)
Capital gains tax owed: $0

Case Study 2: Investment Property Sale

Situation: Single investor sells rental property held for 3 years
Purchase price: $250,000
Depreciation claimed: $22,727
Capital improvements: $30,000
Sale price: $380,000
Investor's income: $85,000

Calculation:
Adjusted basis: $257,273 ($250,000 + $30,000 - $22,727)
Total gain: $122,727

Tax result:
Depreciation recapture: $22,727 × 25% = $5,682
Capital gain: $100,000 × 15% = $15,000
Total tax: $20,682

Case Study 3: 1031 Exchange Strategy

Situation: Investor uses 1031 exchange to defer taxes
Same facts as Case Study 2, but reinvests in $420,000 replacement property

Tax result:
Capital gains tax deferred: $20,682
Immediate tax savings: $20,682
Additional investment capacity: $20,682

Conclusion

Understanding capital gains tax on real estate is crucial for making informed decisions about property sales and investment strategies. Key takeaways include:

  • Hold for more than one year to qualify for preferential long-term capital gains rates
  • Maximize the primary residence exemption - it can save you up to $100,000+ in taxes
  • Consider 1031 exchanges for investment properties to defer taxes and build wealth
  • Plan for depreciation recapture on rental properties
  • Keep detailed records of all improvements and expenses to maximize your cost basis
  • Consider state taxes in your overall strategy

Remember that tax laws are complex and subject to change. While this guide provides comprehensive information based on 2025 tax law, you should consult with a qualified tax professional or CPA for advice specific to your situation.

Ready to Calculate Your Capital Gains Tax?

Use our free calculator to get an instant estimate of your capital gains tax liability and explore different scenarios.

Calculate Your Capital Gains Tax →