How to Avoid Capital Gains Tax When You Sell Your Home

One of the tax tips that appears on the tax planning reports we prepare for clients is “Keep track of your home improvement expenses for determining your adjusted cost basis in the event of a home sale.” 

With home values increasing as much as they have over the past few years, it is more likely that the gain on the sale of your home could exceed the exclusion amount (explained below) and be taxable. That is why it is so important these days to track any investments in your property that increase your basis.

Today I am going to unpack this tip for you and provide context and some specific information to help you avoid tax on a gain when you sell your home.

When is the gain on selling a house taxable?

Like any other asset, your home may increase in value when you own it. In general, selling something for more than you paid results in a capital gain that may be taxable. The IRS allows homeowners to exclude up to $250,000 ($500,000 for a married couple) of the gain from selling a primary residence as long as certain conditions are met.

There are five steps to the eligibility requirements for the exclusion:

  1. Automatic disqualification: if you acquired the property through a 1031 in the last five years OR if you are subject to expatriate tax. If these don’t apply, move on to step 2.
  2. Ownership: you must have owned the property at least 24 months of the last five years. For a married couple, only one spouse needs to meet this requirement.
  3. Residence: you must have lived in the property for 24 months (730 total days) during the past five years. It doesn’t have to be the most recent period, and it can be separate periods that total the minimum number of days. For a married couple, BOTH spouses much meet this requirement to get the full joint exclusion.
  4. Look-back: If you have used this exclusion on the sale of another property in the past two years, you can’t take it again. You can only use it once every two years.
  5. Exceptions: divorce, death, military service, the home being condemned, and other special situations may affect eligibility. Refer to the IRS Publication 523 for the details.
 

How is a gain on the sale calculated?

The difference between the selling price and your basis in the property is your gain (or loss). Your basis is the amount that you paid for the home (including some closing costs) plus the cost of certain improvements.

In the example above, the homeowner paid $407,000 at closing and made improvements to the home of $47,000 before selling the home ten years later for $750,000. The homeowner was able to exclude $250,000 of the gain since this was her primary residence. She was smart enough to keep track of the cost of the improvements to her property, increasing her basis by $47,000 over the original purchase price and therefore only had a taxable gain of $46,000.

What improvements increase the basis in your home?

Not all home improvement expenses increase your basis. In general, repairs and regular maintenance are not considered improvements that would increase your basis. For example, replacing a broken window, fixing a leak, painting, and pressure washing do not increase your basis. However, if these repairs are made as part of a larger improvement project, the cost can be included in what you add to your basis.

Here is a list from IRS Publication 523 of home improvements that can add to your basis.


You can only include improvements that are still in place in your home. For example, you may change the carpet four or five times if you own your home for a long time. You can only include the cost of the carpet that remains in the home when you sell it as part of your cost basis.

Also, if you make an energy efficient improvement and receive a tax credit, you have to reduce the amount added to your cost basis by the amount of the credit you received.

How to keep track of these improvements:

  1. Old fashioned paper folder: keep printed copies of paid invoices that itemize what you did.
  2. An email folder: since many providers are paperless now, you may approve work order and receive invoices via email. Create a folder for home improvements and save all those emails to this folder.
  3. Software: If you use a budgeting or money tracking tool such as Mint or Quicken, you can tag expenses as home improvement and search on that tag later. You might want to make the tag the property address, “123 Poplar Street” in case you own more than one property and so that you can start a new tag after you sell the home.
  4. Excel spreadsheet: you might just start a list in an excel spreadsheet and save it on your computer or in whatever cloud storage program you use. It is easy to add descriptions and amounts any time you make an improvement to your home. Keep in mind you will still need the itemized invoice and proof of payment in case you are ever audited.

Do you know of a great app for tracking home improvement expenses? If so, please share with us so we can try it out and update this article!

Share this Post

Subscribe to our newsletter...