Capital Gains Tax on Real Estate Sale: 2024 Calculator & Guide

Master capital gains tax on real estate with our complete guide and IRS-compliant calculator for 2024–2025.

What Is Capital Gains Tax on Real Estate?

When you sell a property for more than you paid for it, the profit is considered a capital gain—and it's taxable income. The IRS treats real estate sales differently depending on how long you owned the property and whether it was your primary residence.

Capital gains tax applies to the difference between your sale price and your adjusted cost basis (typically what you paid plus improvements). For example, if you bought a house for $350,000, invested $50,000 in renovations, and sold it for $500,000, your capital gain would be $100,000 ($500,000 minus $400,000 basis).

The good news? The IRS allows significant exclusions for primary residences, and long-term capital gains (assets held over one year) receive preferential tax rates compared to ordinary income. Understanding these rules can save homeowners thousands of dollars in taxes.

Long-Term vs. Short-Term Capital Gains: The Critical Difference

The IRS taxes capital gains at dramatically different rates depending on your holding period. This distinction is one of the most important factors in calculating your real estate tax liability.

Short-term capital gains are profits from property sold within one year of purchase. These are taxed as ordinary income at your marginal tax bracket—potentially as high as 37% for high earners in 2024–2025.

Long-term capital gains apply to property held for more than one year. These receive preferential rates of 0%, 15%, or 20% depending on your income level. Most middle-income Americans fall into the 15% bracket. For 2025, the 15% rate applies to single filers earning up to $47,025 and married couples filing jointly up to $94,050.

Holding PeriodTax ClassificationTax Rates (2025)Who Pays
Less than 1 yearShort-term gain10%–37% (ordinary income rates)High-income investors, property flippers
More than 1 yearLong-term gain0%, 15%, or 20%Most homeowners and long-term investors

The difference is substantial. A $200,000 gain on a short-term sale could cost $74,000 in taxes (37% bracket), while the same gain held long-term might cost only $30,000 (15% bracket). Use Our Free Calculator to estimate your specific liability based on your holding period and income.

Primary Residence Exclusion: The Biggest Tax Break

The Section 121 exclusion is one of the most valuable tax benefits available to homeowners. If your property was your primary residence, the IRS allows you to exclude up to $250,000 of capital gains from taxation (or $500,000 if you're married filing jointly).

To qualify, you must meet three tests:

  1. Ownership test: You owned the property for at least 2 of the last 5 years before sale.
  2. Use test: You lived in the property as your primary residence for at least 2 of the last 5 years.
  3. Frequency test: You haven't used this exclusion on another property sale within the past 2 years.

Example: You purchased your home for $300,000 and sold it for $525,000 after living there for 6 years. Your capital gain is $225,000. As a single filer, you exclude $250,000—meaning zero capital gains tax is owed on this sale. If you were married, this would apply even to a $725,000 gain.

This exclusion applies to single homes only. Investment properties, vacation homes, and rental properties don't qualify. However, if you had to sell due to a job relocation, health issues, or unforeseen circumstances, the IRS may allow a partial exclusion under hardship provisions.

How to Calculate Your Capital Gains Tax Liability

Step-by-step, here's how the IRS calculates capital gains tax on real estate:

  1. Determine your adjusted cost basis. Start with what you paid for the property. Add the cost of permanent improvements (new roof, kitchen renovation, addition). Don't include repairs or maintenance. Subtract any depreciation taken if it was a rental property.
  2. Calculate your realized gain. Subtract your adjusted basis from your net sales price (sale price minus selling expenses like realtor commissions, title fees, closing costs).
  3. Determine holding period. Check if you owned it more or less than one year. Long-term gains receive preferential rates; short-term doesn't.
  4. Apply exclusions. If it's your primary residence, subtract up to $250,000 (single) or $500,000 (married filing jointly) from your gain.
  5. Identify your tax bracket. Your taxable income determines whether you pay 0%, 15%, or 20% long-term capital gains tax (or ordinary rates for short-term).
  6. Calculate tax owed. Multiply your taxable gain by your applicable rate. Add any 3.8% net investment income tax if applicable (high-income earners).

The IRS requires you to report this on Form 8949 (Sales of Capital Assets) and Schedule D when filing your 1040. If you use a tax professional (CPA or enrolled agent), they'll handle these forms for you.

Special Circumstances: Investment Properties, Rentals & Depreciation Recapture

If the property was not your primary residence—for example, if it's a rental property or investment property—different rules apply, and the tax bill is typically higher.

Rental and investment properties don't qualify for the primary residence exclusion. You'll owe long-term capital gains tax on 100% of your profit (assuming you held it over one year). Additionally, you'll face depreciation recapture—a 25% tax on the depreciation deductions you claimed during ownership years.

Example: You bought a rental property for $400,000 and claimed $80,000 in depreciation over 10 years. You sold it for $600,000. Your capital gain is $200,000. You'll owe:

Strategy consideration: Some investors use a 1031 exchange to defer capital gains tax indefinitely by reinvesting sale proceeds into another like-kind property. This is an advanced strategy that requires strict compliance with IRS rules.

Net Investment Income Tax (NIIT) and High-Income Considerations

High-income earners (single filers earning over $200,000 or married couples over $250,000) pay an additional 3.8% net investment income tax (NIIT) on capital gains. This was introduced as part of the Affordable Care Act and applies on top of regular capital gains tax.

For example, if you're in the 20% capital gains bracket plus 3.8% NIIT, your effective rate is 23.8% on long-term gains—significantly higher than middle-income earners.

Additionally, the Medicare surtax may push you into higher ordinary income brackets if you have substantial gains, creating a compounding effect on your tax bill. This is why high-net-worth property sellers often work with tax professionals to explore timing strategies, installment sales, or charitable remainder trusts.

Use our free capital gains calculator to model different scenarios, including the impact of NIIT on your specific situation.

Try TaxCalcTools Calculator →

Frequently Asked Questions

How much capital gains tax do I owe on selling my primary home?

If you're eligible for the primary residence exclusion, you may owe zero capital gains tax. The IRS excludes up to $250,000 (single) or $500,000 (married filing jointly) if you owned and lived in the home for at least 2 of the last 5 years. You only pay taxes on gains above the exclusion amount.

What's the difference between capital gains tax rates for long-term vs. short-term sales?

Long-term capital gains (held over 1 year) are taxed at preferential rates: 0%, 15%, or 20% depending on income. Short-term gains (held under 1 year) are taxed as ordinary income at rates up to 37%. The difference can save homeowners tens of thousands of dollars.

Do I need to pay capital gains tax on a real estate sale in the UK or Canada?

No. The US capital gains tax applies only to US property sales and US residents. UK residents pay capital gains tax through HMRC on UK property (primary residence exempt with some exceptions). Canadian residents pay tax on 50% of capital gains. Always consult a local tax professional for non-US property.

What expenses can I deduct from my capital gain on a home sale?

You can reduce your capital gain by selling expenses like realtor commissions, title insurance, attorney fees, and inspection costs. You can also increase your cost basis with permanent improvements (kitchen renovation, roof replacement, room additions), but not repairs or maintenance work.

What if I inherited a property—do I owe capital gains tax when I sell it?

No, not on the inherited gain. Inherited properties receive a 'stepped-up basis' equal to the fair market value on the date of the owner's death. If you inherit a property worth $500,000 and sell it immediately for $500,000, you owe zero capital gains tax. This basis step-up eliminates previously accumulated gains.

More from TUDITOOLS

Easy Calculators
100+ free everyday calculators
Snap It Tools
Free image tools — compress, convert, resize
LegalDraftKit
Free legal document templates & generators