Search
Enter a search term.
line drawing document and pencil

File a claim

Need to file an insurance claim? We’ll make the process as supportive, simple and swift as possible.
Team

Action Teams

If you want to make an impact in your community but aren't sure where to begin, we're here to help.
Illustration of stairs and arrow pointing upward

Contact support

Can’t find what you’re looking for? Need to discuss a complex question? Let us know—we’re happy to help.
Use the search bar above to find information throughout our website. Or choose a topic you want to learn more about.

How to avoid or reduce capital gains tax on real estate: A guide for homeowners

May 27, 2025
Last revised: May 27, 2025

Selling a home or investment property can trigger capital gains taxes. Knowing the rules could save you a bundle. Learn how exemptions, special situations and smart tax planning can affect what you owe.

Key takeaways

  1. You can shield a big portion of your gain from capital gains taxes when selling your primary residence if you meet the eligibility requirements.
  2. To qualify for the capital gains tax exemption on a home sale, you generally must have owned and lived in the home as your primary residence for at least two of the past five years—and not used the exemption on another home in the last two years.
  3. Investment properties and second homes don't qualify for the home sale exemption and may trigger depreciation recapture.
  4. Special rules apply to widowed or divorced homeowners, military personnel and those who inherit property.

You've spent years building equity in your home, and now you're thinking about selling. But how much of that profit will you actually get to keep?

Capital gains tax on real estate can take a surprising bite out of your proceeds if you're not prepared. Fortunately, the tax code includes several ways to reduce or even eliminate the tax bite—but you have to know the rules to take advantage.

Knowing what to expect can help you plan ahead and avoid surprises at tax time. Here's what you need to know to calculate capital gains tax on real estate—and how to keep more of your home’s profit in your pocket.

Understanding capital gains tax on property sales

The capital gains tax applies when you sell an asset, like stocks, bonds, mutual funds, real estate, jewelry or collectibles, for more than you paid for it. The tax rate depends on how long you've owned the property.

  • Long-term capital gains: If you owned the property for more than a year before selling, your profit is considered a long-term capital gain and is usually taxed at 0%, 15%, or 20%, depending on your overall taxable income.
  • Short-term capital gains: If you've owned the property a year or less, you're taxed at your ordinary income rate, which ranges from 10% to 37%.

When it comes to real estate property, however, not all sales are treated the same. For example, gains on your primary residence might be tax-free, provided you meet specific ownership and use conditions.

What is the home sale tax exemption?

If you meet certain requirements, the home sale tax exemption lets you exclude some or all of the profit from selling your primary residence from capital gains tax. Here's how the exclusion typically works:

  • Single filer: You may be able to exclude up to $250,000 of the gain from the sale.
  • Married filing jointly: You may be able to exclude up to $500,000 of the gain.

You may recall the previous "over-55 home sale exemption," which allowed people over 55 to exclude up to $125,000 of gain on the sale of a home. That rule was replaced in 1997 by the current, more flexible home sale exclusion. Age is no longer a factor, and homeowners can use the exclusion multiple times, provided they meet eligibility requirements.

Who's eligible for the home sale tax exemption?

To qualify for the exemption, you must pass two tests, also known as the 2-in-5-year rule.

  • Ownership test. You must have owned the home for at least two years of the five years before the sale.
  • Use test. You must have used the home as your primary residence for at least two of those five years.

Let's say you bought a home in 2018, lived in it until 2022 and then rented it out before selling it in 2024. You would meet both tests because you lived in it for at least two of the five years prior to the sale.

If you're married and file income taxes jointly, only one spouse must meet the ownership test to be eligible for the exemption, but both must meet the use test to claim the full $500,000 exclusion.

You generally can't claim the exemption if you've used it on another home sale in the last two years.

Calculating tax on a home sale profit

Here are the steps for calculating the capital gains tax on your home sale:

  1. Determine your cost basis. Start with the price you paid for the home, then add the cost of any significant improvements, like a new roof or kitchen remodel. Subtract any depreciation you claimed on the property if you had a home office or used the property as a rental. The result is your adjusted cost basis.
  2. Subtract your selling expenses. Real estate commissions, legal fees and closing costs reduce your gain.
  3. Calculate your gain. Subtract your adjusted cost basis and selling expenses from the sale price.

The formula for this calculation looks like this:

Selling price (original price paid + cost of major improvements - depreciation) - selling expenses = gain

Once you know your total gain, you can determine eligibility and apply the home sale exemption (up to $250,000 as a single filer or $500,000 if married filing jointly).

Let's say you're single, and you bought your home for $300,000, spent $50,000 on improvements and sold it for $600,000 with $40,000 in selling costs. You owned the house for seven years and used it as your primary residence the whole time. You never claimed depreciation on the property.

Your adjusted basis is $350,000 (the original $300,000 purchase price, plus the $50,000 in improvements). Your gain would be:

$600,000 - $350,000 - $40,000 = $210,000 gain

Since you're under the $250,000 limit, you won't owe any capital gains taxes on the sale.

Now, assume the same facts, but that you've sold your home for $750,000. Your gain would be:

$750,000 - $350,000 - $40,000 = $360,000 gain

Because you're single, you can exclude only $250,000 of that gain, leaving $110,000 taxable as long-term capital gains.

Businesswoman discussing taxes with coworker in office
Interested in more smart tax tips?
Don't miss these strategies that can help reduce what you pay now and in retirement.

Learn about tax diversification

Capital gains tax on investment properties & second homes

Unlike primary residences, investment properties and second homes don't qualify for the home sale tax exemption. When you sell these properties at a profit, you owe capital gains tax on the entire gain based on how long you've held the property.

However, there's an additional factor to consider: depreciation recapture. If you claimed depreciation deductions over the years (common with rental properties), the IRS requires you to "recapture" that benefit when you sell. Depreciation recapture is taxed at a maximum 25% rate, potentially increasing your total tax bill.

For example, let's say you purchased a rental home for $400,000 more than a year ago, claimed $100,000 in depreciation over the years and sold it for $600,000. Your adjusted basis is $300,000. That's the $400,000 original purchase price, minus $100,000 in depreciation. So your gain would be:

$600,000 - $300,000 = $300,000 gain

Because of the depreciation recapture rules, $100,000 of that gain is taxed at 25%, and the lower long-term capital gains tax rate applies to the remaining $200,000 of gain.

Strategies to reduce capital gains on real estate sales

Paying capital gains tax on real estate may be unavoidable in some cases, but several strategies can reduce or defer the amount you owe. Depending on your financial situation and goals, one or more of these options may apply:

  • Like-kind exchange. For investment properties, a like-kind exchange (also known as a 1031 exchange) lets you defer taxes by reinvesting proceeds into similar property.
  • Tax-loss harvesting. If you have other investments that have lost value, tax-loss harvesting (selling those assets at a loss in the same year as your real estate sale) can offset your capital gains, reducing your overall tax liability.
  • Gifting property to charity. Donating property to a charitable remainder unitrust (CRUT) or charitable remainder annuity trust (CRAT) allows you to avoid immediate capital gains taxes, generate income for yourself or others for a set period and leave the remainder to charity while potentially earning a charitable deduction.
  • Timing the sale of your primary residence. Selling the property in a lower income year may help you qualify for a lower capital gains tax bracket.
  • Leaving the property to heirs. Instead of selling, leave the property to your heirs. Inherited properties benefit from special rules because they generally receive a step-up in basis. This means the seller calculates the gain based on the difference between the sale price and the property's fair market value at the time of inheritance rather than the original purchase price.

These tax strategies require careful consideration and timing, so be sure to discuss them with your tax advisor.

Other real estate capital gains tax scenarios to consider

Some life events and property types can bring special capital gains considerations. Here are a few situations that might affect how much tax you owe:

  • Widowed homeowners. If your spouse passed away recently, you may qualify for the full $500,000 home sale exemption if you sell within two years of their death and haven't remarried.
  • Military personnel. Active-duty military members and certain federal employees can suspend the 2-in-5-year rule for up to 10 years if stationed at least 50 miles from their main home and living in government housing.
  • Divorced homeowners. After a divorce, each former spouse can claim the exemption on their share of the property gain as long as they meet the ownership and use tests. Planning can preserve eligibility even if one spouse moves out before the sale.
  • Vacation homeowners. If you sell a vacation home that you only use personally, it is treated as a capital asset, and any profit from the sale is subject to capital gains tax. If, however, you've used it as a rental for more than 14 days per year, the IRS considers it a rental property, which means you have to report rental income. In this case, depreciation deductions could reduce your taxable income while you own it, but it is also subject to depreciation recapture.

Protect your profits & plan ahead

Dealing with capital gains taxes on real estate and other assets isn't always straightforward. Between exemptions, depreciation recapture and special rules for different life events, it's easy to overlook seemingly minor details that could wind up costing you more than necessary. Discussing options with an experienced tax advisor before you sell helps you take advantage of available tax breaks.

Thrivent financial advisor can work with you and your accountant to ensure your real estate decisions align with your long-term financial strategy. Working together can help you keep more of what you earn and use it to support the goals that matter most to you.

Thrivent and its financial advisors and professionals do not provide legal, accounting or tax advice. Consult your attorney or tax professional.

Hypothetical example is for illustrative purposes. May not be representative of actual results. Past performance is not necessarily indicative of future results.

Concepts presented are intended for educational purposes. This information should not be considered investment advice or a recommendation of any particular security, strategy, or product.

Investing involves risk, including the possible loss of principal.

4.20.42