Finder makes money from featured partners, but editorial opinions are our own. Advertiser Disclosure

How to avoid capital gains tax when selling property

Tips to minimize — or eliminate — your capital gains tax.

Selling your home is exhausting and expensive enough without the stress of surprise taxes and fees.

When putting your house on the market, taxes are inevitable. But there are few strategies that can help you hold on to more of your money.

As home prices continue to surge, here’s how to minimize how much you pay on your profits — also called a capital gains tax.

What is a capital gains tax?

A capital gains tax is a fee that you pay to the government when you sell your home, or something else of value, for more than you paid for it. For example, if you bought a house years ago at $200,000 and sold it for $300,000, you’d pay a percentage of your $100,000 profit — or capital gains — to the government.

When you make money from selling a house or property, your capital gains tax depends on whether you lived in the house and how long you lived there.

Short-term capital gains

In general, you’ll pay higher taxes on property you’ve owned for less than a year. This is because short-term capital gains are taxed at the same rate as ordinary income. In 2017, that rate is between 10% and 39.6% of your profit, but most people pay around 25%.

Long-term capital gains

With long-term capital gains, you get the benefit of a reduced tax rate that typically doesn’t exceed 20%. If you’re selling a residence or investment property you’ve held on to for at least a year, you’ve effectively lowered your capital gains tax.

Does the capital gains tax apply only to real estate?

No. The IRS can take capital gains tax on anything you sell that makes a profit, including car and other investments, like stocks and bonds. (Most retirement accounts, however, allow you to defer paying taxes on gains until you’re eligible to withdraw money.)

If the price has gone up since you purchased an asset and you plan to sell it, you’ll typically pay capital gains tax on the profit.

Is my primary residence exempt from capital gains tax?

Yes. The IRS allows you skim up to $250,000 off the profit of a primary residence when calculating capital gains tax. That amount jumps to $500,000, if you’re married.

You can typically take advantage of this exemption if you meet three requirements:

  • You’ve owned your home for at least two years in the five years before you’ve looked to sell it.
  • Your home was your primary residence for at least two years of that same five-year period.
  • You haven’t taken a capital gains exclusion for any other property sold at least two years before this current sale.

Staying in your home longer than two years might help you qualify for an exemption. Even if it takes three years to sell it after you move, you could still avoid capital gains tax if you lived in the home for at least two years.

How much will I have to pay?

Most taxpayers miscalculate their capital gains by simply subtracting the purchase price from the selling price. But under the tax code, “purchase price” and “selling price” are much more.

Your purchase price — or “cost basis” — is what you paid for the house or property plus all the taxes and fees you paid when you bought it, typically from 2% to 5% of the cost. You can also include money spent on projects that added value to the property, like that extra bathroom or garage improvements.

On the other end of your investment, your selling price is what you sell your property for minus any commission or closing fees you pay to sell it.

Let’s say that years ago you paid $200,000 for a house. At that time, you paid $8,000 in taxes and closing fees. Since then, you’ve made $30,000 in improvements. In this case, your cost basis is $238,000.

Original purchase pricePLUS taxes and fees at time of purchasePLUS added valueEQUALS cost basis

You’ve now sold this home for $450,000. To calculate your taxable profit, you’d subtract your cost basis from the price you sold it for.

Selling priceLESS cost basisEQUALS taxable profit

Your taxable profit on your recent sale is $212,000. And because you bought the home more than two years ago, you can walk away with your $212,000 tax-free.

How can I reduce capital gains tax on a property?

If your property isn’t exempt from the capital gains tax, here are a few strategies to minimize or reduce it.

Live in the property for at least 2 years.

To get around the capital gains tax, you need to live in your primary residence at least two of the five years before you sell it.

Note that this does not mean you have to own the property for a minimum of 5 years, however. Once you’ve lived in the property for at least 2 years, you’d reach capital gains tax exemption.

Plan to sell a property after you’ve experienced capital losses.

If you’re going through a period in which you’re producing less income than usual, it could be a good time to sell a property. Because your tax rate factors in your income, you can take advantage of a reduced rate.

Let’s say that your spouse leaves her job to pursue studies. Prior to her resignation, your two-income household put you in a higher tax bracket that could mean a capital gains rate of 15%. With your drop in income, you’re now in a lower tax bracket — which means fewer taxes on any home sale during this period.

Track your home improvements or selling expenses.

Don’t miss out on claiming all value you added to your house while living there. Keep track of how much you spend on improvements and upgrades to your property, and reflect that amount in your ultimate cost basis. You’ll need records and receipts when submitting your taxes.

Turn your primary residence into a rental.

Renting your property can be a solid way to cover your mortgage while you live elsewhere. But to be exempt from the capital gains tax, you’ll need to limit how long you rent it. After three years, it’s considered an investment property.

Are there specific exemptions for investment property?

Yes. Investors can look to Tax Code Section 1031 to profit on business or investment properties without paying capital gains tax.

Section 1031 allows you to trade “like-kind” properties to avoid paying taxes on the initial profit. These like-kind properties must be similar: You can trade a retail space for another retail space, but you can’t trade a retail space for a rental property.

If the value of one property is greater than the other, you can add cash to the deal. The person who owns the property of lesser value can pay any difference at the time of sale.

Can I avoid the tax by moving into my investment property?

Yes. If you live in your property for at least two years, it changes the nature of your property from an investment property back to your primary residence. You’re then eligible for the capital gains tax exemption of up to $250,000 (or $500,000 if you’re married).

Say you live in New York City with your spouse. You decide to sell your place in the city, where you’ve lived for the past two years, and move into your vacation home upstate. Since your city apartment was your primary residence, you take your $500,000 profit tax-free.

Your move upstate doesn’t have to be permanent. If you want to ultimately move back to the city, stay in your vacation home at least two years. After two years, that property becomes your primary residence, and you can sell it and pocket another tax-free profit of up $500,000.

Compare mortgage lenders

Compare top brands by home loan type, state availability and credit score. Select See rates to provide the lender with basic property and financial details for personalized rates.

1 - 9 of 9
Name Product Loan products offered State availability Min. credit score
(NMLS #7872)
Freedom Mortgage
(NMLS #2767)
Freedom Mortgage
Conventional, Jumbo, FHA, VA, USDA, Refinance
Available in all states
A lender that excels in FHA and VA loans, offering low down payment options to borrowers.
Rocket Mortgage
(NMLS #3030)
Rocket Mortgage
Conventional, Jumbo, FHA, VA, Refinance
Available in all states
Streamline your mortgage from quote to final payment — all from your computer or phone.
(NMLS #1168)
Conventional, Jumbo, FHA, VA, USDA, Refinance
Not available in: NY
Great customer reviews and customized rate quotes in three minutes with no SSN needed.
Veterans United
(NMLS #1907)
Veterans United
Conventional, FHA, VA, USDA, Jumbo, Refinance
Available in all states
Veterans United stands out from other lenders for its focus on serving the military community.
(NMLS #1121636)
Conventional, Jumbo, Home equity, Refinance
Not available in: HI
No hidden fees, multiple loan terms, and member discounts available.
Guaranteed Rate
(NMLS #2610)
Guaranteed Rate
Conventional, Jumbo, FHA, VA, Refinance
Available in all states
Find competitive rates and highly-rated customer service with this lender.
(NMLS #1429243)
Conventional, Jumbo
Not available in: AZ, HI, MA, MO, NV, UT
Preapproval in minutes and closing in as little as 3 weeks with no origination fees.
(NMLS #1136)
HELOC, Home Equity loans
Available in all states
Connect with vetted lenders quickly through this free online marketplace.

Compare up to 4 providers

Bottom line

Homeownership often comes with the headache of ultimately selling your home. By knowing more about the intricacies of the capital gains tax, you could line up your sale to maximize the profits you make on your home or investment property. And save a big headache at tax time.

Frequently asked questions

More guides on Finder

Ask an Expert

You are about to post a question on

  • Do not enter personal information (eg. surname, phone number, bank details) as your question will be made public
  • is a financial comparison and information service, not a bank or product provider
  • We cannot provide you with personal advice or recommendations
  • Your answer might already be waiting – check previous questions below to see if yours has already been asked provides guides and information on a range of products and services. Because our content is not financial advice, we suggest talking with a professional before you make any decision.

By submitting your comment or question, you agree to our Privacy and Cookies Policy and Terms of Use.

Questions and responses on are not provided, paid for or otherwise endorsed by any bank or brand. These banks and brands are not responsible for ensuring that comments are answered or accurate.

257 Responses

  1. Default Gravatar
    vjMarch 4, 2020

    All within 5 month period. Sold home for 170,000, paid off mortgage of 70,000. Purchased home for 100,000 (was not suitable) so sold for 110,000. Purchased current home for 120,000. What is taxable gains result?

    • Default Gravatar
      nikkiangcoMarch 5, 2020

      Hi VJ,

      Thanks for your comment and I hope you are doing well.

      It’s great to know that you are able to sell and purchase homes easily. It’s helpful to know that while we review capital gains in selling property on our page, our site doesn’t compute for capital gains tax. It would be best to seek an account / tax expert to get your capital gains tax.

      I hope this helps and feel free to reach out to us again for further assistance.


  2. Default Gravatar
    JudyJuly 24, 2019

    If I sell stocks or bonds to purchase my primary residence in cash can I avoid during tax time paying the capital gains tax associated with the sale/profit of the cash because it was directly put into the investment of home?

    • Avatarfinder Customer Care
      BellaJuly 26, 2019Staff

      Hi Judy,

      Thanks for your inquiry.

      Generally, the IRS can take capital gains tax on anything you sell that makes a profit including stocks and bonds. If you sell your stocks or bond and buy a property residence, the IRS will not let you do a 1031 exchange (a properly structured 1031 exchange allows an investor to sell a property, to reinvest the proceeds in a new property and to defer all capital gain taxes). Since CGT is a bit complex, you may discuss this with a tax specialist to receive more information on how the CGT works in your state.

      I hope this helps.

      Kind regards,

  3. Default Gravatar
    DavidJuly 11, 2019

    Hello, I sold my down town loft a couple years ago and paid a hefty CGT. Prior to selling the loft I bought a home which I am currently living in. My neighbors are needing to sell their home and asked me if I was interested. They owe about 18k on their home but have thousands of dollars in liens and Home Equity Loan(s). How do I go about this; Who do I talk to first? How do i pit all my ducks in a row so to speak?

    If I do decide to purchase the house and still own my current home will I be destroyed in CGT?

    • Avatarfinder Customer Care
      fayemanuelJuly 12, 2019Staff

      Hi David,

      Thanks for contacting Finder.

      Since CGT is a bit tricky and complicated, you will need to contact a tax lawyer. They will be able to tell you how it works when it is part of an inheritance.

      Kind Regards,

  4. Default Gravatar
    RickJuly 5, 2019

    My wife and I are preparing to sell our home and look to gain about 220k from the sale. We meet all of the criteria for not having to pay capital gains when we sell our home. We are actively in the process of purchasing a new home in a different state. Is there a restriction as to what the profits (Gains) of our prevoius home can be used for? Can we pay down other debts and then put the balance of what is left towards our potential new home without having to pay any taxes?

    • Avatarfinder Customer Care
      BellaJuly 6, 2019Staff

      Hi Rick,

      Thanks for your inquiry.

      Generally, If you sell your home residence and buy another one, the IRS will not let you do a 1031 exchange (a properly structured 1031 exchange allows an investor to sell a property, to reinvest the proceeds in a new property and to defer all capital gain taxes). Since CGT is a bit complex, you may discuss this with a tax specialist to receive more information on how the CGT works in your state.

      I hope this helps.

      Kind regards,

  5. Default Gravatar
    MarciaJune 24, 2019

    We are selling our vacation home that we have owned for 30 years. How can we avoid the exorbitant capital gain tax? Can we invest in another vacation home? We are in our 70’s and do not have an exorbitant income or investments.

    • Avatarfinder Customer Care
      JhezJune 25, 2019Staff

      Hi Marcia,

      Thank you for your comment.

      If you sell your vacation home residence and buy another one, the IRS will not let you do a 1031 exchange (a properly structured 1031 exchange allows an investor to sell a property, to reinvest the proceeds in a new property and to defer all capital gain taxes). You can, however, exclude a large portion of the gain from your taxes as that you have lived in for two of the past five years in the property and used it as your primary residence. A married couple filing jointly can exclude $500,000. This means that you can sell the house and do whatever you want with the income without paying taxes on it.

      Please also discuss this with a tax specialist to receive more information on how the CGT works in your state.


Go to site