Mackay, Caswell & Callahan, P.C.
Share this content
hand shadow on an income tax screen

Do You Know the Loophole in Section 121(b)(5)?

Jul 8th 2019
Mackay, Caswell & Callahan, P.C.
Share this content

In the investment world, great traders are those who can use research to identify or create new arbitrage opportunities which can be exploited. Among CPAs, we see parallels with regard to tax loopholes.

CPAs can stand out and solidify their client base if they gain a reputation as a loophole opportunity creator. Of course, identifying loophole opportunities is far from easy.

In general, identifying opportunities of this sort requires the mental ability to extrapolate and project forward the ramifications which follow from a given rule. These are mental abilities of a high order, but if a CPA has the requisite ability and work ethic, he or she can certainly distinguish himself or herself among competitors, particularly when it comes to IRC Section 121.

Section 121: General Overview

As all CPAs should know, Section 121 is the “principal residence exclusion” which allows sellers of a primary home or dwelling place to eliminate a certain amount of their capital gain. Section 121 applies to primary homes, and this means a home which the taxpayer has lived in for at least two years during the most recent 5 year period.

The time does not need to be accumulated sequentially, but may be accumulated by adding up periods of time separated by time living elsewhere. Hence, if a person lives in a home for one year, then lives in a second home for the next year, and then moves back to the original home for another year, the original home may be sold and Section 121 may be invoked.

However, Section 121 may only be used once every two years. This constraint prevents homeowners from abusing the purpose of Section 121.

What about property which is not originally used as a primary residence, but is converted to a primary residence after being used for another purpose? For instance, what happens if a rental property be converted to a primary residence and then the owner wishes to invoke Section 121? This type of conversion is governed by Section 121(b)(5).

Section 121(b)(5) and Nonqualified Use

This Section of the IRC refers to “Exclusion of Gain Allocated to Nonqualified Use.” The gain which is allowable for elimination under Section 121 must be gain associated with “qualified use.” This means the period of time during which the owner is actually living in the residence.

Under Section 121(b)(5)(B), taxpayers must develop a ratio to determine the gain which is not eligible for exclusion. This ratio consists of the period of nonqualified use and the total period of ownership by the taxpayer. As an example, if the taxpayer owns the property for four total years, but one year is nonqualified use, then ¼ of the gain is not eligible for exclusion.

Section 121(b)(5)(C) discusses the period of nonqualified use for calculation purposes. Section 121(b)(5)(C)(ii)(I) provides an important exception. This exception is for property which used for a different purpose (other than use as a primary residence) after the last date the property is used as a primary residence during the 5 year period referenced in Section 121(a).

The trick to grasp this important exception is to think of the original intent of the property. If you buy a property, move in, and then subsequently convert the property for a different purpose, then the exception will apply. And this is because the original intent was to hold the property as a primary residence. But if you hold the property for a nonqualified purpose at the beginning of the ownership period, and then convert the property to a primary residence, then you’ll need to compute the ratio referenced above.

The Possible Loophole Opportunity

In the event of nonqualified use, CPAs may counsel clients to avoid a sale in which the nonqualified use would decrease the maximum amount of gain allowed by the exclusion. If the gain be large enough, Section 121(b)(5) apparently indicates that the maximum amount of excludable gain may still be excluded even in the event of nonqualified use. Let’s consider two different hypothetical scenarios to illustrate this point.

Example number one: A taxpayer purchases a property and intends to hold the property as a rental property. The taxpayer holds the property as an investment (rental) property for three years.

The taxpayer then converts the property into a primary residence and lives in the property for two years. The taxpayer then sells the property in an outright sale. In this scenario, the taxpayer can compute the nonqualified use ratio easily, as 3/5th of the gain is not allowable for exclusion (because 3 years of the 5 total years were used as a rental property).

If we suppose that the original price (and cost basis) of the property was $100,000, and the sales price five years later is $300,000, we can see that only 2/5th of the $200,000 capital gain would be allowable for exclusion. If we assume the taxpayer is single, then the maximum amount of gain allowable for exclusion under Section 121 – $250,000 – for single filers cannot be excluded, because only $80,000 can be allocated to qualified use.

Example number two: Let’s assume the same facts as example one, but with changes to the original purchase price and subsequent sales price. If we assume an original purchase price of $50,000 and then a sales price of $750,000, then we can allocate $140,000 to each year of ownership.

In this scenario, we can see that 3/5th of the gain, or $420,000, is not eligible for exclusion due to nonqualified use. But, $280,000, or 2/5th of the gain, would still be eligible for exclusion. Hence, here we have a scenario in which a taxpayer has nonqualified use but is still able to take the maximum exclusion provided by Section 121. This would seem to go against the purpose of nonqualified use ratio implemented by the code. But, this is the result which comes about necessarily when the nonqualified use ratio is applied in certain cases, such as the one described here.

Example number two, therefore, can be thought of as a case of the “loophole opportunity” of Section 121(b)(5) being exploited. This may not seem like a big opportunity, but given the constant shifts in the real estate market, we can easily see how CPAs can counsel clients and assist them in preserving substantial sums of wealth.

If a client has a case in which the nonqualified use ratio will cut into their exclusion, then it may be desirable to avoid a sale until the market changes and the maximum exclusion becomes feasible. The code could have been written differently to prevent such a loophole opportunity.

For instance, the code could have been written such that any nonqualified use during the ownership period would result in a reduced exclusion. The gain allocated to nonqualified use could also have been directly subtracted from the allowable exclusion, but this was not done. This presents a very good opportunity for CPAs to create value for their clients. 

Related Articles

What is the Greatest Tax Loophole of All Time?

Guidance for Using Sections 121 & 1031

Replies (3)

Please login or register to join the discussion.

By lhuang
Jan 14th 2020 13:19 EST

Hi Jorgen,

Thanks for a terrific article on the $500k exclusion and the 2009 special rule!

My big question that I need to answer is whether or not I can take the $500k in my situation.

Based on your article, I believe that I can but hope that you can take a look at my situation and provide your feedback.

Here is my situation:

I have a Coop in Manhattan that I bought in 2006 and lived in as my primary residence for about 7 years and then rented out. I plan to move back into the apartment for 2 years as Primary Residence in 2023 and 2024 to cover the 2 out of 5 years.

2006-2013: My Primary Residence
2014-2022: Rented out
2023-2024: I plan to move back in and be my primary residence


If I sell the apartment in 2025 or 2026, can I take the full $500k exclusion or does the amount need to be prorated and if so by how much?

Based on your article, since the apartment started as my primary residence before I rented out, and then I plan to make my primary residence for 2 more years, that I would be able to take the full $500k exclusion (I am married) and therefore am NOT subject to the "prorating-unqualified use" special rule.

Thanks for your feedback!


Thanks (0)
Replying to lhuang:
By Jorgen Rex Olson
Feb 12th 2020 13:59 EST

Check your inbox

Thanks (0)
Replying to Jorgen Rex Olson:
By AtulG
Apr 21st 2021 18:48 EDT

Hello Jorgen,

Thank you so much for your extremely informative article. I have a home in NY that I purchased in 2010 and converted to rental on July 1 2018. I am trying to understand if I will have capital gains consequences if I sell the house now.

Any chance we can connect in person, so I can discuss my specific situation. Happy to compensate you for your time?


Thanks (0)