Search
Enter a search term.

File a claim

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

Thrivent Action Teams

If you want to make an impact in your community but aren't sure where to begin, we're here to help.

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: July 27, 2026

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 part 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 you must not have used 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.

How does capital gains tax on property sales work?

When you sell something for more than you paid for it, the profit is generally considered a capital gain, and it may be subject to capital gains tax.

This applies to a wide range of assets. Think stocks, bonds, mutual funds, real estate, and even certain types of jewelry and collectibles. How much tax you'll owe depends largely on how long you owned the asset before selling it.

  • 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%.

Real estate follows these same basic rules, but there are important exceptions. For example, profits from the sale of a primary residence may qualify for special tax exclusions if you meet certain ownership and residency requirements.

2025 and 2026 long-term capital gains tax rates

Long-term capital gains generally apply to assets held for more than one year before they're sold. The tax rate you'll pay depends on your taxable income and filing status.

Tax YearRateSingle Filers (Taxable Income)Married Filing Jointly (Taxable Income)
20250%Up to $48,350Up to $96,700
15%$48,351 – $533,400$96,701 – $600,050
20%Over $533,400Over $600,050
20260%Up to $49,450Up to $98,900
15%$49,451 – $545,500$98,901 – $613,700
20%Over $545,500Over $613,700

Source: IRS inflation-adjusted tax thresholds for 2025 and 2026.

A note for higher-income taxpayers

If your modified adjusted gross income exceeds $200,000 ($250,000 for married couples filing jointly), you also may owe the 3.8% net investment income tax (NIIT) on your capital gains. This additional tax can increase the top federal tax rate on long-term capital gains from 20% to 23.8%.

What is the home sale tax exemption?

If you meet certain requirements, the home sale tax exclusion lets you exclude some or all of the profit from selling your primary residence from capital gains tax.

Here's how much you may be able to exclude:

  • Single filer: Up to $250,000 of gain
  • Married filing jointly: Up to $500,000 of gain

What was the over-55 home sale exemption?

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.

How do you calculate 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.

Can you still qualify if you didn't live there for the full two years?

In some situations, you may qualify for a partial exclusion even if you don't meet the full two-year ownership and use requirements.

You may qualify for a reduced exclusion if you sold your home because of certain life events, including:

  • A work-related move
  • A health-related need
  • Certain unforeseen events, such as changes in employment, divorce or other qualifying hardships

The amount you're allowed to exclude is generally based on how much of the two-year ownership and use requirement you completed before the sale.

For example, if you're a single filer who lived in the home for one year before relocating for a qualifying job opportunity, you may be eligible to exclude up to half of the standard $250,000 exclusion amount.

Because eligibility depends on your specific situation, it's a good idea to consult a tax professional before assuming you don't qualify.

Two professional women looking at computer monitor
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

How are investment properties and second homes taxed?

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.

How can you reduce capital gains tax on a real estate sale?

While capital gains taxes can reduce the profit you keep from a real estate sale, several strategies may help lower or defer what you owe. The right approach depends on your financial goals, the type of property you're selling and your overall tax situation.

Consider a like-kind exchange

If you're selling an investment property and plan to reinvest in another, a like-kind exchange, often called a 1031 exchange, may help you defer capital gains taxes. By rolling the proceeds from the sale into another qualifying investment property, you can postpone paying taxes on the gain and keep more of your money working toward your long-term goals.

For example, an investor who sells a rental property may use the proceeds to purchase another income-producing property rather than recognizing the gain immediately. Deferring taxes can preserve additional capital for future investments and portfolio growth.

It's important to plan ahead, however, because 1031 exchanges are subject to strict IRS deadlines. Generally, you must identify potential replacement properties within 45 days of selling the original property and complete the purchase of the replacement property within 180 days. Missing either deadline can cause the transaction to lose its tax-deferred status.

Since the rules governing like-kind exchanges can be complex, many investors work with a qualified intermediary, tax professional and financial advisor throughout the process. With careful planning, a 1031 exchange can be a valuable tool for building and preserving long-term wealth through real estate investing.

Use tax-loss harvesting to offset gains

If you have investments that have declined in value, selling them in the same year as a real estate sale may help offset some of your capital gains. This strategy, known as tax-loss harvesting, allows investment losses to reduce taxable gains, potentially lowering your overall tax bill.

For instance, if you realize a gain from selling an investment property and also sell stocks or mutual funds at a loss, those losses may help offset part of the taxable gain. While tax considerations can be important, investment decisions should still align with your long-term financial goals rather than tax savings alone.

Include charitable giving into your tax strategy

If you’re already planning to support charitable causes, donating appreciated real estate may provide both philanthropic and tax benefits. In some cases, transferring property to a charitable remainder trust, such as a charitable remainder unitrust (CRUT) or charitable remainder annuity trust (CRAT), can help avoid immediate capital gains taxes while providing income for you or your beneficiaries for a period of time.

Depending on your situation, you also may qualify for a charitable income tax deduction. This approach can be especially appealing for those looking to make a lasting charitable impact while potentially improving the tax efficiency of highly appreciated assets.

Be mindful of when selling your home

Timing when you sell your residence can influence how much tax you owe. Because long-term capital gains rates are based in part on your taxable income, selling during a lower-income year may reduce the tax rate applied to your gain.

For example, someone planning to retire, take a sabbatical or experience a temporary reduction in income may benefit from delaying a sale until their taxable income is lower. While taxes shouldn't be the only factor driving a decision, thoughtful timing can be an important part of a broader tax-planning strategy.

Or, instead of selling, you always can consider leaving 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.

Explore Qualified Opportunity Funds

Investors with significant capital gains may be able to defer taxes by reinvesting eligible gains into a Qualified Opportunity Fund (QOF). These funds invest in designated Qualified Opportunity Zones, which are communities identified for economic development and investment.

Generally, investors have 180 days from the sale of an asset to reinvest eligible gains into a Qualified Opportunity Fund. The Opportunity Zone program was extended and enhanced by the One Big Beautiful Bill Act of 2025, creating additional planning opportunities for some investors.

This strategy may be particularly attractive for sellers with large gains who want long-term tax deferral but don't have another investment property lined up for a 1031 exchange. Because Opportunity Zone investments involve unique risks and requirements, professional guidance is essential before investing.

Consider an installment sale

An installment sale allows you to receive payments from a buyer over time rather than all at once at closing. Because gains are generally recognized as payments are received, spreading income across multiple years may help manage the tax impact of a sale.

For example, instead of recognizing a large gain in a single tax year, a seller may receive payments over several years, potentially reducing the amount of gain subject to higher tax rates in any one year.

Installment sales can be useful in certain situations, but they also introduce additional considerations, including buyer credit risk and ongoing tax reporting obligations.

Think about your legacy plans

For some families, holding appreciated property and passing it to heirs may offer important tax advantages. Inherited assets generally receive a step-up in basis, meaning the property's tax basis is adjusted to its fair market value at the owner's death.

As a result, heirs may owe little or no capital gains tax on appreciation that occurred during the original owner's lifetime if the property is sold shortly after inheritance. While estate planning decisions involve much more than taxes alone, understanding how inherited property is treated can help inform conversations about preserving wealth for future generations.

Whatever tax strategies you cultivate, they require careful consideration and timing, so be sure to discuss them with a trusted financial advisor.

What special capital gains tax situations should you know about?

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 also is subject to depreciation recapture.

Protect your profits and 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.

A Thrivent financial advisor can work with you and your tax advisor to make sure 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.

FAQ on capital gains tax for real estate

Do I pay capital gains tax if I sell my house after living in it for two years?

Not always. If you've owned and lived in the home as your primary residence for at least two of the five years before the sale, you may qualify for the home sale exclusion. This tax benefit allows eligible homeowners to exclude up to $250,000 of gain ($500,000 if married filing jointly) from federal capital gains taxes.

What is the $250,000 / $500,000 home sale exclusion?

The home sale exclusion allows eligible homeowners to exclude a portion of the profit from selling their primary residence from federal capital gains taxes. Generally, the exclusion is up to $250,000 for single filers and up to $500,000 for married couples filing jointly, provided certain ownership and residency requirements are met.

How do I calculate capital gains on a home sale?

Start with the home's sale price and subtract your adjusted cost basis—which generally includes the purchase price plus qualifying home improvements—as well as eligible selling expenses, such as real estate commissions and closing costs. The amount that remains is your capital gain.

Can I avoid capital gains tax by reinvesting in another house?

Buying another home doesn't automatically eliminate capital gains taxes. However, some real estate investors may be able to defer taxes through a qualifying 1031 exchange. Homeowners selling a primary residence may instead benefit from the home sale exclusion if they meet the eligibility requirements.

What is depreciation recapture and how is it taxed?

If you've claimed depreciation deductions on a rental or investment property, the IRS generally requires you to repay some of that tax benefit when the property is sold. This is known as depreciation recapture and is generally taxed at a maximum federal rate of 25%.

Is the capital gains tax different for investment properties versus primary residences?

Yes. A primary residence may qualify for the home sale exclusion, while investment properties and second homes generally do not. Investment properties also may be subject to depreciation recapture, which can increase the amount of tax owed when the property is sold.

Do I have to pay capital gains tax if I inherit a house?

Inherited property typically receives a step-up in basis, meaning its value generally is adjusted to the fair market value at the time of the original owner's death. As a result, any taxable gain usually is based on appreciation that occurs after you inherit the property, which can reduce the amount of capital gains tax owed when you sell.

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