The exclusion of up to $500,000 of capital gains on the sale of a primary residence under IRC Section 121 is one of the most generous tax preferences available under the tax code, due in no small part to the fact that most people only have occasion to sell their home and harvest such gains a few times in a lifetime.
However, for those who also invest in rental real estate, the capital gains exclusion on the sale of a primary residence creates an appealing tax planning opportunity – to convert rental real estate into a primary residence, in an effort to take advantage of the capital gains exclusion to shelter all of the cumulative gains associated with the real estate. And since the Section 121 exclusion can be used as often as once every 2 years, the planning opportunity is quite significant for those with large rental real estate holdings.
To prevent abuse of this planning scenario, Congress has enacted several changes to IRC Section 121 over the past 15 years, preventing depreciation recapture from being eligible for favorable treatment, requiring a longer holding period for rental property acquired in a 1031 exchange, and more recently forcing gains to be allocated between periods of “qualifying” and “nonqualifying” use. Nonetheless, some opportunities remain for real estate investors who do have the flexibility to change their primary residence in an effort to shelter capital gains on long-standing real estate properties.
Rules For Excluding Gain On Sale Of Residence
The Taxpayer Relief Act of 1997 created IRC Section 121, which allows a homeowner is allowed to exclude up to $250,000 of gain on the sale of a primary residence (or up to $500,000 for a married couple filing jointly). In order to qualify, the homeowner(s) must own and also use the home as a primary residence for at least 2 of the past 5 years. In the case of a married couple, the requirement is satisfied as long as either spouse owns the property, though both must use it as a primary residence to qualify for the full $500,000 joint exclusion.
Notably, the use does not have to be the final 2 years, just any of the past 2-in-5 years that the property was owned. Thus, for instance, if an individual bought the property in 2010, lived in it until 2012, moved somewhere else and tried to sell it, but it took 2 years until it sold in 2014, the gains are still eligible for the exclusion because in the past 5 years (since 2010) the property was used as a primary residence for at least 2 years (from 2010-2012). The fact that it was no longer the primary residence at the time of sale is permissible, as long as the 2-of-5 rule is otherwise met.
If a sale occurs and it has been less than 2 years, a partial exclusion may still be available if the reason for the sale is due to a change in health, place of employment, or some other “unforeseen circumstance” that necessitated the sale. In such scenarios, a pro-rata amount of the exclusion is available; for instance, if an individual had to sell the home after 18 months instead of the usual 24, the available exclusion would be 18/24ths multiplied by the $250,000 maximum exclusion, which would provide a $187,500 maximum exclusion (which will likely still be more than enough, as it’s unlikely that the gain would be more than this amount unless it was an extremely large house!).
To the extent that a property is highly appreciated, and there is a gain in excess of the available exclusion. The gain will be subject to the usual capital gains brackets, including the new top 20% rate and the new 3.8% Medicare surtax, if total income is high enough for the capital gain to fall across the applicable thresholds.
Example 1. Max and Jenny, a married couple, bought a home decades ago for $250,000, and are now selling it for $900,000. Their total gain is $650,000, and they have easily met the 2-of-5 ownership-and-use requirement. As a result, they can exclude $500,000 of the capital gains. The remaining $150,000 capital gain – eligible for long-term capital gains treatment, as the holding period is far beyond the 12-month requirement – will be reported on their tax return as a normal long-term capital gain, subject to the usual tax rates (and potential 3.8% investment income surtax) that may apply.
The capital gains exclusion is only allowed once every 2 years. Thus, the partial exclusion still cannot be used if another exclusion had been claimed for another sale in the past 24 months, and in the event of a married couple the full $500,000 exclusion is only available as long as neither spouse has used it in the past 2 years (if one spouse sold a home recently and the other did not, the second spouse can still use his/her individual $250,000 exclusion). On the other hand, as long as “no more than once every 2 years” requirement is met, there is no limit on home many times an individual can take advantage of the primary residence capital gains exclusion throughout their lifetime!
Converting A Rental Property Into A Primary Residence
For most people, the exclusion of capital gains on the sale of a primary residence is something that only comes along a few times throughout their lifetime, as individuals and couples move from one home to the next as they pass through the stages of life. However, because the exclusion is available as often as once every 2 years, some homeowners may even try to sell and move and upgrade homes more frequently, to continue to “chain together” sequential capital gains exclusions on progressively larger homes (presuming, of course, that the real estate prices continue to rise in the first place!). However, in some cases taxpayers decided to go even further, taking long-standing rental property, moving into it as a primary residence for 2 years, and then trying to exclude all of the cumulative gains from the real estate (up to the $250,000/$500,000 limits), even though most of the gain had actually accrued prior to the property’s use as a primary residence! The opportunity is especially appealing in the context of rental real estate, as the potential capital gains exposure is often very large, due to the ongoing deductions for depreciation of the property’s cost basis that are taken along the way.
The limit this technique, Congress and the IRS have implemented several restrictions to the Section 121 capital gains exclusion in the case of a primary residence that was previously used as rental real estate. The first, created as part of the original rule under IRC Section 121(d)(6), stipulates that the capital gains exclusion shall not apply to any gains attributable to depreciation since May 6, 1997 (the date the rule was enacted), ensuring that the depreciation recapture will still be taxed (at a maximum rate of 25%).
Example 2a. Harold has a property in 2009 that was purchased for $200,000 and is now worth $350,000. It was rented for a period of years (during which $29,000 of depreciation deductions were taken), and last year Harold moved into the property as a primary residence. The current cost basis is now $171,000 (after depreciation deductions), which means the total potential capital gain is $179,000. However, at the most (subject to further limitations discussed below), Harold will only be eligible to exclude $150,000 of gains (the appreciation above the original cost basis) if he uses the property as a primary residence for the requisite two years, because the $29,000 of depreciation recapture gain is not eligible for the Section 121 exclusion.
In addition to the limitation of Section 121 regarding depreciation recapture, as a part of the Housing Assistance Tax Act of 2008, Congress further limited the exclusion of capital gains for property that was converted from a rental to a primary residence. The new rules, enshrined in IRC Section 121(b)(4), stipulate that the capital gains exclusion is specifically available only for periods during which the property was actually used as a primary residence; any other time (since January 1st, 2009) that the property was not used as a primary residence is deemed “nonqualifying use”. Accordingly, to the extent gains are allocable to periods of nonqualifying use (gains are assumed to be pro-rata over the holding period), those gains are not eligible for the exclusion.
Example 2b. Continuing the earlier example, if Harold had actually rented out the property for four years (2009, 2010, 2011, and 2012) and then used it as a primary residence for two years (2013 and 2014) to qualify for the capital gains exclusion, and sell it next year (after meeting the 2-year use test), the total $150,000 of capital gains (above the original cost) must be allocated between these periods of qualifying and non-qualifying use. Since there are only 2 years of qualifying use out of a total of 6 years the property was held, only 1/3rds of the gains (or $50,000) are deemed qualifying (and will be fully excluded, as $50,000 of qualifying gains is less than the $250,000 maximum amount of qualifying gains that can be excluded). As a result of these limitations, the remaining $100,000 of capital gains attributable to nonqualifying use will be subject to long-term capital gains tax rates (along with the $29,000 of depreciation recapture).
Example 2c. Assume instead that Harold had purchased the property not in 2009, but in 2000, and rented it for 13 years (from 2000 to 2012, inclusive) before moving into the property in early 2013 to live there for 2 years, with a plan to sell in 2015 and maximize the Section 121 capital gains exclusion. Because only nonqualifying use since 2009 counts under IRC Section 121(b)(4), Harold will be deemed to have 4 years of non-qualifying use (2009, 2010, 2011, and 2012), and 11 years of qualifying use (2000-2008 inclusive, and 2013-2014). As a result, 11/15ths of gains, or $110,000, would be qualifying gains eligible to be excluded (and since that’s less than the $250,000 maximum exclusion amount, it would all be excluded), while only 4/15ths of the gains, or $40,000, would be nonqualifying and subject to capital gains taxes. In addition, any depreciation recapture since 2000 would still be taxed as well.
Notably, an additional “anti-abuse” rule applies to rental property converted to a primary residence that was previously subject to a 1031 exchange – for instance, in a situation where an individual completes a 1031 exchange of a small apartment building into a single family home, rents the single family home for a period of time, then moves into the single family home as a primary residence, and ultimately sells it (trying to apply the primary residence capital gains exclusion to all gains cumulatively back to the original purchase, including gains that occurred during the time it was an apartment building!). To limit this, American Jobs Creation Act of 2004 (Section 840) introduced a new requirement (now IRC Section 121(d)) that stipulates the capital gains exclusion on a primary residence that was previously part of a 1031 exchange is only available if the property has been held for 5 years since the exchange.
Example 2d. Continuing the prior example, assume that Harold’s original ownership since 2000 was of an apartment building, and in early 2011 he had completed a 1031 exchange to a single family home, with the ultimate intention of moving into the property as a primary residence to claim the capital gains exclusion. Even if Harold moves into the property in early 2013 and lives there for 2 years, he will not be eligible for any capital gains exclusion until 2016 (five years after the 1031 exchange). At that time, he can complete the sale and be eligible for the exclusion. He will still have 4 years of nonqualifying use (2009 after the effective date, though the end of 2012 when the property was still a rental), but will now have 12 years of qualifying use (2000-2008 inclusive, and 2013-2016), which means 12/16ths of his gains will be eligible for the exclusion and 4/16ths will be deemed nonqualifying use capital gains and subject to taxes (in addition to any depreciation recapture).
Fortunately, while the rules do limit the exclusion of capital gains attributable to periods of nonqualifying use (after 2009) in the case of a rental property converted to a primary residence, the rules are more flexible in the other direction, where a primary residence is converted into a rental property. IRC section 121(b)(4)(C)(ii)(I) allows taxpayers to ignore any nonqualifying use that occurs after the last date the property was used as a primary residence, though the 2-of-5 ownership-and-use tests must still be satisfied.
Example 3. Donna has lived in her property as a primary residence since 2008. In 2012, she received a new job opportunity across the country, but decided she didn’t want to sell the property yet as home values were still recovering in her area, so she rented the property instead. Now, in 2014, as home prices have continued to appreciate, she wishes to sell the property. Even though there have been 2 years of otherwise-nonqualifying-use as a rental, Donna does not have to count nonqualifying use that occurred after she lived in the property as a primary residence. As a result, all gains will be treated as qualifying, and eligible for the capital gains exclusion (except to the extent of any depreciation recapture). Even though Donna does not still live in the house as a primary residence, she has still used it as a primary residence in at least 2 of the past 5 years (as she lived there in 2010 and 2011 before renting in 2012), so the Section 121 exclusion is available. However, it’s notable that if Donna waits until 2016 to sell, at that point there will be 4 years of rental use and only 1 year of use as a primary residence, so Donna will lose access to the Section 121 exclusion simply because she no longer meets the 2-of-5 ownership-and-use test.
In the above example, if Donna had chosen to subsequently exchange her converted rental property to a new one under IRC Section 1031, additional rules apply under IRC Section 2005-14 to properly allocate gains between Section 121 exclusion and Section 1031 deferral.
Planning Implications Of Section 121 Primary Residence Gain Exclusions
Arguably the Section 121 exclusion of capital gains on the sale of a primary residence is one of the most favorable tax preferences under the Internal Revenue Code, given both the sheer magnitude of the gains that can be excluded, and the fact that there is no limit to how many times it can be taken (beyond the limit of no more than once every 2 years).
Of course, from a practical perspective, many (most?) individuals and couples treat their home as a home, and not as an ongoing chain of serial real estate investments from which tax-free capital gains can be harvested as long as they live in it for at least 2 years first (which in reality is why Congress allows such favorable provisions in the first place). While a few clients might actually be inclined to move repeatedly from one property to the next – taking advantage of the capital gains exclusion every time gains approach the maximum exclusion amount – this will not likely be a popular strategy for most.
However, given that most clients will probably only have an opportunity to take advantage of these rules a couple of times throughout a lifetime, it becomes all the more important to properly plan in the first place to ensure the exclusion will be available. This may include having clear documentation to show exactly when the property was used as a primary residence (especially if it may not be the full 2-year period and the pro-rata partial exclusion may apply, or if there are periods of qualifying and nonqualifying use), and also planning around using the exclusion in the event of death or divorce of a spouse (in both situations, ownership and use of a deceased spouse or an ex-spouse can potentially be ‘tacked on’ to the subsequent owner to qualify for the exclusion). In the case of newly married couples, this may include additional coordination if either (or especially if both) previously owned a primary residence, and wish to sequence their sales to allow the maximal exclusion (for instance, one spouse sells one property for a $250,000 exclusion, both move into the other property for 2 years, and then the couple sells the second property for a $500,000 exclusion).
For clients that are more active real estate investors, there may be significant appeal to more proactively taking advantage of the primary residence exclusion rules, notwithstanding the limitations on nonqualifying use, especially in light of the fact that gain is always assumed to be allocated pro-rata across all the years, and not necessarily based on when gains actually occurred. This effectively creates an incentive for property that has rapidly appreciated during its rental period to be converted into a primary residence, even if the appreciation rate will slow.
Example 4. Donald purchased a rental property in early 2009 at the market bottom for $400,000, and it has appreciated in the 5 years since to $750,000. If Donald sells his current house, and moves into the rental property now to make it a new primary residence and sells it in 2 years for $775,000, the total gains above original cost will be $375,000. Since Donald will have 2/7 years of qualifying use, he will be eligible to exclude 2/7 * $375,000 = $107,143 of capital gains, even though the actual gains during his time living in the property were only $25,000. In addition, Donald will have been able to benefit from the capital gains exclusion on his prior home (sold 2 years ago), and the capital gains exclusion again on this rental-property-converted-to-primary-home, as long as the sales are at least 2 years apart. (Alternatively, if Donald had not sold his prior residence, he could have simply held it throughout, and then moved back into the original property and continued its use as a primary residence, though there would now be 2 intervening years of nonqualifying use for that property.)
Given that nonqualfiying use only counts for such use since 2009, real estate investors may find it most appealing to move into older rental real estate properties, that have a significant amount of gains that can be allocated prior to 2009 (where even though it was rental property, it doesn’t count as nonqualifying use). The qualifying/nonqualifying use rules will make the strategy less appealing for most real estate investors on a forward-looking basis, though planning opportunities remain in the aforementioned scenarios where rapid appreciation during nonqualifying use periods can be sheltered by subsequent qualifying use when there is slower growth (effectively shifting income from the less favorable time period to the more-tax-favored one).
In the case of properties that have been converted from a primary residence into rental real estate, the key planning issue is to recognize that there is a limited time window when a property can be rental real estate but still be eligible for the Section 121 exclusion – eventually, the property is rental real estate so long, the owner will no longer meet the 2-of-5 use-as-a-primary-residence test. For instance, in the earlier Example 3, Donna can only rent the property for up to 3 years after living there as a primary residence, before she can sell it and claim the Section 121 exclusion (or risk moving beyond the 2-of-5 years time window).
The bottom line, though, is simply this: for those who are more flexible about their primary residence living arrangements, and move more frequently (or are often forced to do so by job/life circumstances) there are significant tax planning opportunities available thanks to the Section 121 capital gains exclusion on a primary residence. For clients who are more active real estate investors, and have the flexibility to convert rental properties into primary residences, additional opportunities apply to navigate the nonqualifying use rules (and/or simply recognize that pre-2009 rental use won’t be counted against the owner as nonqualifying use in the first place!). However, because of the stringency of the rules – and the magnitude of the capital gains taxes that may be due if a mistake is made – it’s crucial to follow the rules appropriately to gain the maximum benefit (or any benefit at all!)!