How to avoid paying taxes when selling your home (2023)

  • The IRS allows for homeowners to exclude $250,000 in capital gains if filing separately or $500,000 if filing jointly
  • Active military personnel may qualify for up to ten years
  • If you lived in the house AND it was used as a rental property there are special rules
  • When selling an inherited home, property taxes are based on the value of the home the day the owner died

Get an as-is cash offer for your home

"*" indicates required fields

Thinking of selling your home and worry about how much taxes you will owe? How much you will need to pay, if any, will depends on one question.  Have you lived in the house recently or not?  How you answer that question, will determine which of two possible ways you may be able to avoid or defer paying taxes.

Avoid Taxes with your Personal Residence Exemption

If you have lived in your house for 2 of the last five years, you are eligible for the personal residence exemption. This exemption is known as the IRC 121 exemption. The IRC 121 comes from the Internal Revenue Code and Section 121. A homeowner can exclude the difference between what you paid for your home and what you sell it for up to a specified amount. If you are single or file your taxes separately, you may qualify for exempting $250,000. If you are married and file jointly, you may qualify to exclude $500,000 from the sale of your house.

In order to avoid taxes for the sale of your home you must meet two qualifications.  “You have owned and used your home as your main home for a period aggregating at least two years out of the five years prior to its date of sale” according to IRS.  It is not necessary for you to have lived in the house for two continuous years.  As long as the total amount of time adds up to two years or more during the previous five years prior to the sale, you may qualify.  The one exception is that you cannot have claimed this exemption on the sale of another residence in the previous two years.

Extending the five year exemption rule

Active military personnel on extended duty, or their spouses can extend the five year rule to up to 10 years.  This is because many military personnel become accidental landlords when they are forced to move due to military orders. In order to qualify you must meet one of the following requirements.

  1. You were required by the government to live in government housing


  1.  Your main duty station was at least 50 miles from the home you are seeking an exemption for.

Special rules for former rental properties

If you wish to claim the personal residence exemption for a property that you have used as a rental income property, there are special rules that apply.    For example, Let’s say you have owned a rental for three years and moved into the property two years ago.  Now, after living in the home for two years you want to exclude your profit by claiming this exemption.  In simple terms, the IRS will require you to prorate your deduction.   Please contact your tax professional for help as this is a complex situation.

Rental property – Deferring Taxes with a 1031 Exchange

You can avoid capital gains tax on the sale of a rental property by doing a 1031 exchange.  Like the IRC 121 exemption, the name comes from a section number in the Internal Revenue Code.  It is also known as a “like-kind exchange” or a “Starker” named after the a court case.

With a 1031 exchange, you aren’t eliminating the taxes on your gain, you’re deferring them.  With a 1031 exchange, you can defer your taxes by purchasing a different but similar type property.  You transfer the taxable gain from the first property to the second property.   This allows your investment to continue to grow while postponing the payment of any capital gains tax.

Benefits of a 1031 exchange

The biggest benefit of a 1031 exchange is that you don’t have to pay capital gains taxes on your proceeds until you liquidate all, or portion of your investment.

Example:  Let’s say you have a rental property that you purchased for $100,000 several years ago.  Your rental property is now worth $200,000.  Your property has a $100K gain in it’s value, also known as capital gains.  Since you’ve owned it for more than a year, it qualifies for long term capital gains.  As of 2021, long term capital gains tax ranges from zero to 20% depending upon your income.

You’re now ready to retire and want to move to a new city but don’t want to give up your rental income or pay the capital gains taxes.   Using a 1031 exchange allows you to buy another rental (like kind exchange) in a new city.  You transfer your increased value from the first property to the second property and avoid having to pay taxes on the increased value of the property you sold.

If all of the proceeds from the sale of your first property go towards your second property and you won’t have any capital gains taxes. If you receive any excess proceeds, referred to as “boot”, you will be taxed on these proceeds alone. You may also be taxed on your depreciation, known as depreciation recapture tax which as of this year is set at 25%.

Challenges of a 1031 exchange

One of the biggest challenges of doing a 1031 exchange is timing.  You must coordinate the sale of your first property with the purchase of your second property.  In order for the sale of your rental property to qualify for a 1031 exchange, you must close on your new purchase within 180 days.  Sometimes, this can lead to making a rushed decision to purchase an inferior property because you are running out of time.  Especially if you are close to the end of your 180 days and you still have not found a perfect replacement.

When looking for a buyer for your income property, you want a flexible buyer.  You need to look for a buyer who is flexible with the closing date so you can avoid triggering your 180 day window too early.  If you initiate your 1031 exchange before you have found your replacement property, you could exceed the 180 window and be liable for taxes.

The perfect scenario is to have a prearranged buyer who will buy your property just before you buy your next property.  A buyer who is also an investor can make the transition easier and won’t be under the same limitations as an end user who needs a place to live.

Some items excluded from 1031 Exchange

There are several things you cannot use a 1031 exchange for.  You cannot use a 1031 exchange on your personal residence.  As of December 2017, you cannot use a 1031 for the sale of personal property.  This includes items such as cars, airplanes and franchise licenses.  However, tenant in common interest (TICs) do qualify.

Inherited Properties

Inherited properties are considered investment properties.  When considering the tax consequences of selling an inherited property, you have to determine its basis.  Basis, also called stepped-up-basis, is the value the home was worth the day the previous owner died.  In most cases, the value will be more than what the previous owner paid for the property.  If you sell it for more than its new basis, you have a taxable gain.  If you sell it for less than its new basis you have a loss.  Assuming you are not living in the home, losses can be deducted from your current year’s ordinary taxable income up to $3,000.  Any losses exceeding $3,000 must be spread across multiple tax years.


If you are worried about how much taxes you will own if you sell your home, you’re in luck when it comes to the Federal government.  Most homeowners can claim either $250,000 or $500,000 depending on their tax filing status.  If the property was used as a rental property and your residence, you’ll need to prorate your deduction.  For rental properties, most will require a 1031 to defer property taxes.  Lastly, if you pass your home on to your children, they may be able to avoid any taxes based on the property’s stepped up basis.

This article is not intended to provide any legal or financial advice.  Please consult with your tax professional for additional information.