Selling a Home? Avoid Capital Gains Tax on Real Estate in 2022

The money you make on the sale of your home might be taxable. Here's how it works and how to avoid a big tax bill.
Written by Tina Orem
Reviewed by Lei Han
Mar 3, 2022

Many or all of the products featured here are from our partners who compensate us. This may influence which products we write about and where and how the product appears on a page. However, this does not influence our evaluations. Our opinions are our own. Here is a list of our partners and here's how we make money.

It feels great to get a high price for the sale of your home, but in some cases, the IRS may want a piece of the action. That’s because capital gains on real estate can be taxable. Here’s how you can minimize or even avoid a tax bite on the sale of your house.

What is a capital gains tax?

  • A capital gains tax is the fee you pay on the profits made from selling an asset.

  • Capital gains taxes can apply to securities — think stocks and bonds — and tangible assets — real estate, cars and boats.

  • The IRS and many states assess capital gains taxes on the difference between what you pay for an asset (your cost basis) and what you sell it for (your sale price).

How do capital gains taxes work on real estate?

It depends on your tax filing status and your home sale price, but you may be eligible for an exclusion. The IRS typically allows you to exclude up to:

  • $250,000 of capital gains on real estate if you’re single.

  • $500,000 of capital gains on real estate if you’re married and filing jointly.

For example, if you bought a home 10 years ago for $200,000 and sold it today for $800,000, you’d make $600,000. If you’re married and filing jointly, $500,000 of that gain might not be subject to the capital gains tax (but $100,000 of the gain could be).

» Considering selling? Learn tips for any market

When do you pay capital gains on a home sale?

You pay tax on the whole gain of your home sale if any of these factors are true:

  • The house wasn’t your principal residence.

  • You owned the property for less than two years in the five-year period before you sold it.

  • You didn’t live in the house for at least two years in the five-year period before you sold it. (People who are disabled, and people in the military, Foreign Service or intelligence community can get a break on this part, though; see IRS Publication 523 for details.)

  • You already claimed the $250,000 or $500,000 exclusion on another home in the two-year period before the sale of this home.

  • You bought the house through a like-kind exchange (basically swapping one investment property for another, also known as a 1031 exchange) in the past five years.

  • You are subject to expatriate tax.

Still not sure whether you qualify for the exclusion? Our tool might help; otherwise, scroll down for ways to avoid capital gains tax on a home sale:

If it turns out that all or part of the money you made on the sale of your house is taxable, you need to figure out what capital gains tax rate applies.

  • Short-term capital gains tax rates typically apply if you owned the asset for less than a year. The rate is equal to your ordinary income tax rate, also known as your tax bracket. (What tax bracket am I in?)

  • Long-term capital gains tax rates typically apply if you owned the asset for more than a year. The rates are much less onerous; many people qualify for a 0% tax rate. Everybody else pays either 15% or 20%. It depends on your filing status and income.

Advertisement
Vanguard Personal Advisor Services
Zoe Financial
Facet Wealth
NerdWallet rating 
NerdWallet rating 
NerdWallet rating 
Fees

0.30%

management fee

Fees

Varies by advisor

Fees

$1,800 and up

per year (free initial consultation)

Account minimum

$50,000

Account minimum

$100,000

Account minimum

$0

Promotion

None

no promotion available at this time

Promotion

None

no promotion available at this time

Promotion

Get 2 free months

off your first year of financial planning.*

How to avoid capital gains tax on a home sale

  1. Live in the house for at least two years. The two years don’t need to be consecutive, but house-flippers should beware. If you sell a house that you didn’t live in for at least two years, the gains can be taxable. Selling in less than a year is especially expensive because you could be subject to the short-term capital gains tax, which is higher than long-term capital gains tax.

  2. See whether you qualify for an exception. If you have a taxable gain on the sale of your home, you might still be able to exclude some of it if you sold the house because of work, health or “an unforeseeable event,” according to the IRS. Check IRS Publication 523 for details.

  3. Keep the receipts for your home improvements. The cost basis of your home typically includes what you paid to purchase it, as well as the improvements you've made over the years. When your cost basis is higher, your exposure to the capital gains tax may be lower. Remodels, expansions, new windows, landscaping, fences, new driveways, air conditioning installs — they’re all examples of things that might cut your capital gains tax.

  • Federal: $24.95 to $64.95. Free version available for simple returns only.

  • State: $29.95 to $44.95.

  • All filers get access to Xpert Assist for free until April 7.

Promotion: NerdWallet users get 25% off federal and state filing costs.

  • Federal: $39 to $119. Free version available for simple returns only.

  • State: $49 per state.

  • TurboTax Live packages offer review with a tax expert.

Promotion: NerdWallet users can save up to $15 on TurboTax.

  • Federal: $29.99 to $84.99. Free version available for simple returns only.

  • State: $36.99 per state.

  • Online Assist add-on gets you on-demand tax help.

Get more smart money moves – straight to your inbox
Sign up and we’ll send you Nerdy articles about the money topics that matter most to you along with other ways to help you get more from your money.