IRS Says “Not So Fast” On 2 out of 5 Primary Residence Rule

This post is in: Blog, Real Estate

One of the most misunderstood parts of real estate tax is the capital gains exclusion for primary residences that you have lived in for 2 out of the previous 5 years. It used to be just that simple. If you lived in a property 2 out of the past 5 years, you got to take either $250,000 of capital gains tax free (single) or $500,000 of capital gains tax free (married, filing jointly).

Quietly, the IRS has been changing the rules. Or maybe not so quietly, it’s just that there has been so much other news that than it’s been easy to have missed some of the changes.

There are three major changes. In today’s blog, I’m going to talk about what happens if you move into your former rental property.

First of all, you do not get to move into a former rental property and automatically get all the gains tax free as long as you’re under the capital gains exclusion amount.

The first change, which I think is a little better known is that you have to pay tax on the recaptured accumulated depreciation. So even if you normally would have had capital gains exclusion to cover all the gain, you still have to pay tax on the previous depreciation that you have taken on the property.

The second change has to do with the fact that it was rented before. You have to calculate the total gain first and then determine how much is applicable to the period that it was rented out past 2009 and how much was applicable to the years you lived in it.

Let’s say that you owned a property for 6 years. For the first 4 years you rented the property out. You then lived in the home as your primary residence for the next 2 years. You had a total of $150,000 of capital gains over the 6 year period.

However, you lived in the home for 2 out of 6 years since 2009, so only 1/3 (2 divided by 6) of the capital gains will be considered qualifying use. That means you have a capital gains exclusion of $50,000 (1/3 of $150,000). Of course, there is depreciation which also must be recaptured.

And, of course, there are some strategies you can use to maximize the capital gains exclusion. That’s just one little aspect of tax that has changed. Make sure you pick up your copy of “FIRST LOOK! Taxmageddon 2018” when it releases with a soft opening here on


  1. Ken says:

    My wife and I
    1. Bought our only house in 1987 and lived there until 1994 and rented it until 2013.
    2. Sold the first house and bought another house through a 1031 exchange in 2013.
    3. Plan to sell it and buy a similar house through a 1031 exchange again in Q1 this year.
    4. Plan to rent it for two years and then live there many years as our primary residence but live there at least three years.

    Can we (joint filing) get the maximum exclusion if we sell the house in the step (3) above after five years?

  2. Diane Kennedy says:

    Great question, Ken. It brings up 3 different important law changes that people often forget and is too much to cover in a response here.

    I’m going to write a blog about it to post sometime from 1/22/21 – 1/24/21.

  3. Daine says:

    If you sell a home and still have a mortgage, say 60K left on your mortgage. Please confirm if my capital gains tax will only be based on the profit I’ve made from selling the house (i.e., after I’ve deducted the 60K still owed on the mortgage of the home.) I’ve lived in the house now worth 400K during the entire period of the mortgage for over 5 years.

    Also, how would this rule work on a duplex property you have a mortgage on if you’re living in one unit A and renting out unit B?

    Thank you in advance.

  4. Diane Kennedy says:

    Hi Daine:

    Your gain is calculated as the sales price minus your sales costs, minus you basis and minus improvements.

    So if it’s now worth $400,000, we would subtract the cost of sales, such as commissions and seller fees. Then we subtract the basis. Let’s say your cost of sales are $30,000 and your basis in the home (what you paid plus improvements) is $200,000.

    Your gain would be calculated as $400K – $30K – $200K.

    The amount of your loan doesn’t figure into the calculation for gain at all.

    I’ll answer the duplex question in a separate note.

  5. Diane Kennedy says:


    Question #2 from your post. What if you sell a duplex?

    In the case of a duplex (2 family home) you will need to divide up the basis and sales price. You end up with two separate calculations.

    Presumably, you’ve been depreciating the rented portion of the duplex, so you already have that basis.

    Then for the sales price, you need to divide the selling price. If the two units are absolutely the same, just divide it in two. If your home unit was fixed up more with a higher grade of materials, you may actually allocate more sales price to your own home.

    Let’s say the total sales price is $500,000 and they are exactly the same. Sales price is $250,000/ea. The basis was $200,000 again split exactly the same. There is also accumulated depreciation of $25,000 on the rental side. That has to be added back in the gain calculation.

    Cost of sales is $30,000 in total.

    So home gain is: $250,000 – $100,000-15,000 = $135,000 Rental gain is $250,000 – $100,000-15,000 +25,000 = $160,000.

  6. Charles Murray says:

    How does the IRS know for sure if you have lived 6 mo,, 1 dayi
    for at least 2 years out of the last 5 to avoid the capital gains tax? I assume they don’t do a bed check every night.

  7. Diane Kennedy says:

    If they call you into audit, you need to prove it. Could you lie? Sure. Just be careful what you post on open forums like this.

Leave a Comment