THE PRIMARY RESIDENCE TAX EXEMPTION UNDER IRS CODE SECTION 121

The $250,000 (single) / $500,000 (married) home sale gain exclusion is a major benefit of homeownership, but the rules can be confusing if you鈥檙e not familiar with them.

How do you calculate your gain in the first place?

What if you owned your house before you got married? Can you exclude $500,000 of gain or only $250,000?

What about if you rented out your home at some point?

These questions are more are what we鈥檙e going to dig into in this article.

How to Calculate Your Gain

Typically, when you sell a piece of property, you have to pay taxes on your gain from the sale.

Your gain is the difference between what you sold the property for (your 鈥減roceeds鈥) less selling expenses less your 鈥渂asis鈥 in the property.

Your 鈥渂asis鈥 is what you originally paid for the property plus various closing costs plus various improvements you鈥檝e made over the years less depreciation. However, people don鈥檛 depreciate their primary home unless it鈥檚 used for business or rental, so we鈥檒l leave the depreciation talk out for now.

So let鈥檚 say you bought a property for $100,000, paid $2,000 in capitalizable closing costs on it, and made $13,000 in capitalizable improvements on it. Your basis is $115,000.

Now you go and sell the property for $200,000 and incur $10,000 of selling costs.

Your gain is $75,000, and you would typically have to pay tax on this gain.

How the Home Sale Gain Exclusion Works

Now, there is an exception to the general rule of paying tax on your gain when it comes to your primary residence.

This exception is known as the Home Sale Gain Exclusion, and it鈥檚 found in Section 121 of the Internal Revenue Code.

This Home Sale Gain Exclusion lets you exclude (i.e., not pay tax on) up to $250,000 of gain on the sale of your primary residence if you are single or $500,000 of gain on the sale of your primary residence if you are married filing jointly with your spouse.

You have to have owned and lived in the house for 2 out of the last 5 years ending on the date of the sale of the home (2 years being defined here as 730 days or 24 full months).

Also, you can only take advantage of this exclusion once every 2 years. So if you plan on selling two primary residences in the near future, it would be wise to use the exclusion on the one that will result in the most gain.

However, keep in mind that the exclusion defaults to the first residence sold, so if you want to exclude the gain on the second residence sold, you must make a specific election to be taxed on the first so you can use the exclusion on the second.

Note that the ownership and use requirements need not be concurrent, so if you simply lived in the home (say on a lease) in Years 1 and 2, and then purchased it in Year 3 but moved somewhere else in Years 4 and 5 (while still keeping the home), you would still qualify.

Also, this exclusion is only available on your primary residence. If you own multiple residences, the home you use for the majority of time during the year is considered your primary residence.

I Bought Our House Before I Got Married. Can We Exclude $250,000 or $500,000?

Oftentimes, a married couple will sell a home that one spouse purchased before marriage, and the question becomes, 鈥淐an we exclude $500,000 or only $250,000?鈥

In order to take advantage of the $500,000 gain exclusion in a situation like this, the following requirements must be met:

– One spouse needs to meet the ownership requirement, meaning that only one spouse needs to have actually owned the home for 2 out of the last 5 years.
– However, both spouses must meet the use requirement, meaning that both spouses must have lived in the home for 2 out of the last 5 years.
– Also, neither spouse can have used the Home Sale Gain Exclusion (on another residence) in the 2-year period ending on the date of the sale of the home.

If all of these requirements are met, then the couple may exclude $500,000 of gain on the sale of the home that one spouse purchased before marriage.

If these requirements are not met, then the couple may only exclude $250,000 of gain on the sale of this home insofar as one spouse meets all requirements.

Obviously, if no spouse meets the requirements, then no gain may be excluded.

Are There Any Exceptions to the 2-Year Rule?

Believe it or not, the IRS is merciful at times, and they do allow for some (limited) exceptions to the requirement that a taxpayer live in a home for 2 out of 5 years in order to take advantage of the Home Sale Gain Exclusion.

The exclusion will be reduced, but it is still possible to exclude some gain on the sale of a primary residence if you:

– Changed your place of employment
– Had a sudden health issue
– Underwent some other unforeseen circumstance or hardship

These exceptions also apply to the rule that one may only take advantage of the Home Sale Gain Exclusion once every 2 years.

As qualifying for these exclusions can be tricky, it鈥檚 recommended that you speak with a tax professional about your particular situation.

What If My Home Is Unique?

The term 鈥渞esidence鈥 is fairly broad for purposes of the Home Sale Gain Exclusion and includes such living arrangements as houseboats, trailers, and stock held in a cooperative housing corporation.

However, if you live in personal property that is not considered a fixture under local law, this property will not count as a residence, and you cannot exclude your gain on it.

So if you live in a mobile home, be sure to speak with a tax professional about whether or not your home qualifies as a 鈥渞esidence鈥 for purposes of the Home Sale Gain Exclusion.

What If My Spouse Dies?

If your spouse dies, and you have not remarried as of the date you sell the home, you will be considered to have used the home as a principal residence for the same period that your deceased spouse used the home as their primary residence. So if you need to us this rule to maximize your exclusion, be sure to sell the home before you remarry!

What If I Rent Out the House and Then Live In It?

If you use a house first as rental property and then use it as a primary residence, then unfortunately you lose a part of your exclusion.

Let鈥檚 walk through an example to show you what we mean.

– January 1, 2013: you buy a house for $100,000 and begin renting it out immediately.
– January 1, 2015: you kick out the tenant and begin living in the house.
– January 1, 2017: you sell the house for $300,000.

For example鈥檚 sake, let鈥檚 say your cost basis is that $100,000 and the $300,000 has already taken into account selling expenses, so your gain is $200,000.

Well, I have some bad news for you. You can only exclude 50% of your gain, i.e., $100,000, because 50% of the years before the sale are considered 鈥渘onqualified鈥 for the exclusion since during those years* the home was not used as a primary residence.

And to top it all off, you will have to pay depreciation recapture for the depreciation you took (or were entitled to take) when the house was a rental.

However, a 1031 exchange, which we discuss below, can be very useful in this situation.

*Note that years before 2009 do not count for purposes of this calculation.

What If I Rent Out the House and then Live in It and then Rent It Out and then Live In it Again?

Some situations, of course, are more complicated.

What if you first buy a house, rent it out, live in it, then rent it out, and then live in it again?

Here鈥檚 another example.

Let鈥檚 walk through an example to show you what we mean.

– January 1, 2003: you buy a house for $600,000 and rent it out.
– January 1, 2005: you move into the house and live in it.
– January 1, 2007: you move out of the house and rent it out.
– January 1, 2019: you move into the house and live in it.
– January 1, 2021: you sell the house for $1,300,000.

For example鈥檚 sake, we鈥檒l assume that there were no renovation expenses over the years and the $1,300,000 is net of selling expenses.

Let鈥檚 also assume that you took $200,000 of depreciation over the years.

What Does the Tax Code Say?

Oh boy, this is a doozy.

Let鈥檚 look at what the tax code says.

Section 121(b)(5)(A) says that you may not exclude gain allocated to periods of nonqualified use.

Section 121(b)(5)(B) says that gain allocated to periods of nonqualified use is your total gain multiplied by the ratio of the period of nonqualified use divided by the total period the property was owned by the property.

Section 121(b)(5)(C) says that the period of nonqualified use includes any period (not including periods before 2009) during which the property is not used as your or your spouse鈥檚 or former spouse鈥檚 principal residence.

Section 121(b)(5)(C) also says that the period of nonqualified use would not include:

– Any time within the 5-year window before you sold the house that is after the last date you lived in the house. This would not apply in this situation since there is no rental period after January 1, 2021 (the last date you lived in the house) since you sold it on that date.
– Any time during which you or your spouse served on qualified official extended duty. Let鈥檚 assume that isn鈥檛 applicable here.
– Any time of temporary absence (not to exceed 2 years) due to change of employment, health conditions, or such other unforeseen circumstances. Let鈥檚 assume that doesn鈥檛 apply here.

So How Much Non-Qualified Use Do I Have?

So putting it all together, given the situation above, all periods before 2009 are qualified use.

But you have 10 years of non-qualified use from 2009-2018, i.e., the periods beginning in 2009 when you didn鈥檛 use the property as your primary residence.

And since you owned the house for 18 years (from 2003-2020), your non-qualified use ratio is 10/18 = 55.55%.

So 55.55% of your gain not attributable to depreciation recapture is ineligible for the home sale gain exclusion.

Your total gain on sale not including depreciation recapture is $1,300,000 net selling price 鈥 $600,000 original cost = $700,000.

So you multiply $700,000 by 55.55% = $388,850. This is your gain allocated to non-qualified use. You have to include this gain in income and may not exclude it.

So How Much Do I Owe If I Move Back In for 2 Years?

Because the remaining gain of $311,150 ($700,000 鈥 $388,850) is less than the maximum gain of $500,000 (let鈥檚 assume you are married and file jointly with your spouse), this $311,150 may be excluded from income.

But you still have to pay capital gains tax on the $388,850. Assuming you鈥檙e in the 20% capital gains rate, you鈥檙e looking at a $77,770 federal capital gains tax bill, assuming 2018 rates.

And of course you have depreciation recapture under Section 1250 on the $200,000 of depreciation you took at 25% (assuming you鈥檙e in the top tax bracket). So you鈥檙e looking at $50,000 of depreciation recapture tax, assuming 2018 rates.

So if you move back in for 2 years, your total federal tax bill is still $127,770. And this doesn鈥檛 even take into account state taxes! If you鈥檙e in California like me, you鈥檒l be paying as much as $61,500 (depending on your tax bracket) of state taxes as well!

So How Much Did I Really Save By Moving Back In?

Now let鈥檚 look at your tax bill if you didn鈥檛 move in for two years.

Instead of only paying capital gains tax on 55.55% of your gain not attributable to depreciation recapture, you will now pay capital gains tax on the entire $700,000.

$700,000 x 20% = $140,000 capital gains tax.

And the depreciation recapture tax is the same at $50,000.

So if you don鈥檛 move back in, your total federal tax bill is $190,000. And you could be looking at a 6-figure state tax bill as well (up to $110,700 if you live in California like me!). So if you鈥檙e a California resident in the highest tax bracket, you鈥檙e looking at an over $300,000 combined federal and state tax bill! The same would go for other high income tax states like New York.

Subtracting $127,770 from $190,000, you would save $62,230 in federal taxes by moving back in for 2 years. And of course you would also potentially save tens of thousands of dollars in state taxes.

In a situation like this, it may actually be more advisable from a tax perspective to simply 1031 the property while it is a rental (see below) where you can potentially defer all taxes (including depreciation recapture) rather than taking a partial, albeit tax-free, home sale gain exclusion under Section 121.

What If I Rent Out a Part of the House or Take the Home Office Deduction?

Now, let鈥檚 say you rent out only a part of your home (say, a room) or take the home office deduction on part of it. Let鈥檚 call this part of your home, whether the rental portion or the home office or both the 鈥渂usiness use portion鈥 of your home.

Whether or not you can apply the Home Sale Gain Exclusion to the business use portion of your home depends on whether or not the business use portion is within the walls of your dwelling unit (e.g., a room in the house you live in) or outside the walls of your dwelling unit (e.g., a guest house in the backyard).

Business Use Portion Is Within the Walls

If the business use portion of your home is within the walls, you can apply the Home Sale Gain Exclusion to the amount of gain allocated to the business use portion.

So let鈥檚 say your business use portion occupies 10% of your home. You otherwise qualify for the Home Sale Gain Exclusion, and you have a $100,000 gain on your home.

Congratulations! $90,000 of gain is tax-free on the sale of the personal residence portion of your home, and $10,000 of gain is tax-free on the business use portion of your home!

However, any depreciation deduction you historically claimed on your business use portion is subject to recapture as unrecaptured Section 1250 gain, though this can be deferred through a 1031 exchange (we talk about this later).

Business Use Portion Is Outside the Walls

If the business use portion of your home is outside the walls, you cannot apply the Home Sale Gain Exclusion to the amount of gain allocated to the business use portion.

So let鈥檚 say your business use portion occupies 10% of your home. You otherwise qualify for the Home Sale Gain Exclusion, and you have a $100,000 gain on your home.

Well, only $90,000 of gain is tax-free on the sale of the personal residence portion of your home, but you have to recognize $10,000 of gain is tax-free on the business use portion of your home.

And any depreciation deduction you historically claimed on the business use portion is subject to recapture as unrecaptured Section 1250 gain.

But here鈥檚 the deal. The 1031 exchange discussed below can defer taxes on both the $10,000 gain and the unrecaptured Section 1250 gain for your depreciation recapture!

Can I Use a 1031 Exchange in Conjunction with the Home Sale Gain Exclusion?

The answer is yes, you can use a 1031 exchange along with the home sale gain exclusion under Rev. Proc. 2005-14.

Doing so can help you avoid paying taxes this year on any gains or depreciation recapture attributable to your home office, a rental of part of your home, or the nonqualified use periods of your entire home.

HTTPS://KCREALESTATELAWYER.COM