Updated 10/07/2019 by Geoff Curran, Jeff Barnett, & Scott Christensen

National real estate prices have been on the rise since 2014, and many investors who jumped into the rental industry since the Great Recession have substantial gains in property values (S&P Dow Jones Indices, 2019). You might be considering selling your rental to lock in profits and enjoy the fruits of your well-timed investment, but realizing those gains could come at a cost. You could owe capital gains tax in addition to potential depreciation recapture on the profits from your rental sale.

One strategy for paying less tax is to move back into your rental and use the property as a primary residence before selling. Living in your rental full-time for at least two years prior to selling can help you take advantage of the gain exclusion of $500,000 ($250,000 if single), which can wipe out all or most of your gain on the property. Sounds easy, right?

Let’s take a look at some of the moving pieces for determining the taxes when you sell your rental. Factors like depreciation recapture, qualified vs. non-qualified use and adjusted cost basis could make you think twice before moving back into your rental to avoid taxes.

Depreciation Recapture

One of the benefits of having a rental is the ability to claim depreciation on the property, which allows you to offset rental income that would otherwise be taxed as ordinary income. The depreciation you take reduces your basis in the property, potentially resulting in more capital gains when you ultimately sell. If you sell the property for a gain, the amount up to the depreciation you took is taxed at the maximum recapture rate of 25%. Any remaining gains are taxed at the lower long-term capital gains rate. Moving back into your rental to claim the primary residence gain exclusion does not allow you to exclude your depreciation recapture, so you might still owe a hefty tax bill after moving back, depending on how much depreciation was deducted. (IRS, 2019).

When the Property Sells for a Loss

Keep in mind that if you sell your home for a loss, whether it’s currently a rental or is now your primary residence, you aren’t subject to depreciation recapture or other gains taxes. However, due to depreciation decreasing your cost basis in the property each year until it reaches zero, it’s more common that sales of former rental homes result in gains.

Note: You can’t claim a loss for tax purposes if the property sold is your primary residence. Read We Sold Our Home for a Loss – Now What? for more information.

Qualified Versus Non-Qualified Use

You might not be allowed to claim all your primary residence capital gains exemption, even after accounting for depreciation recapture. This gets tricky since we have to dig into recent changes with the tax code. Since 2009, the IRS has required your ownership period to be categorized between qualifying and non-qualifying use. Qualifying use is when the home serves as your primary residence and is eligible for the IRC Section 121 gain exclusion for the sale of principal residence. Non-qualifying use is the period where the property is rented out or serves as a secondary home to you, such as a vacation property.

This test applies to ownership periods starting in 2009, and it determines how much of your gain is eligible for the tax-free exclusion and how much is subject to capital gains taxes. Ownership periods prior to 2009 are always considered qualifying use for the purposes of this test.

You may have to prorate your capital gains exclusion based on your number of years of qualifying use of the property. That means if you move back in for two years after renting for seven years, your prorated exclusion limit will equal 2/9 of the gains. If 2/9 is less than the full $500k exemption ($250k for single filers), then you are limited to excluding the lower amount.

Prorating the exclusion only applies where the taxpayer used the residence for nonqualified purposes and then converts the property to a principal residence. The opposite is not true. If the residence was used as a principal residence first and then converted to nonqualified use, the taxpayer may potentially qualify for a full exclusion. The IRS doesn’t want people abusing the five-year rule with rentals that they move back into just before the sale. This creates two examples to consider.

  1. If you live in your home for two years and then rent it out for two years before selling it, you qualify for the full exclusion amount due to meeting the use test by having lived in the home for two out of the last five years before the sale and meeting the ownership test.
  2. If you rent out your property for two years and then move back in for two years before selling it, you must prorate your exclusion because the exception to periods of non-qualifying use only applies to portions of the five-year use test period that occur after the last date that the property is used as a principal residence [26 U.S.C. § 121(b)(5)(C)(ii)(I)].

Note: If there’s a gain (whether it’s eligible for the gain exclusion or not), depreciation recapture is recognized first, prior to determining how much is tax-free and how much is subject to capital gains taxes.

1031 Exchange of the Non-Qualifying Use Portion

If you’re facing a large tax bill because of the non-qualifying use portion of your property, you can defer paying taxes by completing a 1031 exchange into another investment property. This permits you to defer recognition of any taxable gain that would trigger depreciation recapture and capital gains taxes. More importantly, it allows you to separate out tax-free and taxable portions of the property sale.

Note: Property you convert to a primary residence that was part of a previous 1031 exchange must be held for a minimum of five years to be eligible to receive any of the gain exclusion.

Determining Your Adjusted Basis

Now that we have investigated potential capital gains tax exclusions and issues like depreciation recapture that is recognized first on your rental, we’ll break down how to determine your adjusted cost basis for calculating gains on the sale of your property.

Your adjusted basis is typically the original purchase price of the home, plus improvements made, plus selling costs incurred, minus depreciation on the property. An exception is if you converted your home into a rental when the market value of the property was below your adjusted basis per the formula. In that case, your basis decreases to the fair market value of the property at the time it became a rental. This eliminates people’s ability to beat the system by renting out their home for a short period just to be able to take the capital loss, since they can’t take a loss on the sale of a primary residence.

In the examples below, a family purchases a home for $300,000 and makes $75,000 worth of improvements through remodeling the kitchen and bathrooms. Their adjusted basis prior to converting the home into a rental is $375,000. This home is their primary residence for two years.

Scenario 1

The couple then rents out the home for four years prior to selling it for $525,000. During the four-year rental period, they take approximately $40,000 of depreciation. When they sell the property, its adjusted basis is $355,000 ($375,000 + $20,000 selling costs – $40,000 depreciation taken). The gain on the sale is $170,000.

Even though 33% of their ownership period was for qualifying use, they fail the gain exclusion test by one year because the home was not their primary residence for two of the last five years. Therefore, the entire gain is subject to tax.

The first $40,000 of the gain is subject to depreciation recapture at up to a 25% tax rate. The remaining $130,000 of gain is subject to long-term capital gains taxes (plus the 3.8% net investment income surtax if their AGI exceeds the applicable threshold).

Note: The couple could instead complete a 1031 exchange into another investment property to defer recognition of any taxable gains.

Scenario 2

This is the same as Scenario 1, except after the four-year rental period, the couple moves back in full-time for two years prior to selling the home. We’ll use the same dollar amounts as above.

Since the couple meets the requirements to use the tax-free gain exclusion, we need to break down the gain based on qualifying use and non-qualifying use:

  • Qualifying use– The home was their primary residence for four years out of the eight-year holding period, so 50% of the gain is eligible for the tax-free exclusion.
  • Non-qualifying use– The home was not their primary residence for four years out of the eight-year holding period, so 50% of the gain is subject to depreciation recapture and capital gains taxes.

Of the $170,000 gain, the first $40,000 is subject to depreciation recapture up to 25%. Since the non-qualifying use portion of the gain is greater than the depreciation recapture amount, the remaining $45,000 ($85,000 – $40,000) is subject to capital gains taxes. The $85,000 related to the qualifying use part of the gain is tax-free as part of the Section 121 gain exclusion.

Scenario 3

This is similar to Scenarios 1 and 2, except the couple rents out the home for 10 years before they move back in full-time. They sell the property two years later, with depreciation of $70,000 over the rental period.

As a result, the property’s adjusted basis is $325,000 ($375,000 + $20,000 selling costs – $70,000 depreciation taken). The gain on the sale is $200,000.

Since the couple meets the requirements to use the tax-free gain exclusion, we need to break down the gain based on qualifying use and non-qualifying use:

  • Qualifying use– The home was their primary residence for four years out of the 14-year holding period. Also, four years of the 10-year rental period are considered qualifying use because they occurred prior to 2009 where all ownership is considered qualifying use for the purpose of this test. Therefore, eight years, or 57% of the gain, is attributable to qualifying use and is eligible for the tax-free gain exclusion.
  • Non-qualifying use– Six years of the rental period is considered non-qualifying use, so 43% of the gain is be taxable.

Of the $200,000 gain, the first $70,000 is subject to depreciation recapture at up to 25%. Since the non-qualifying use portion of the gain is greater than the depreciation recapture amount, the remaining $16,000 ($200,000 × 43% – $70,000) is subject to capital gains taxes. $114,000 ($200,000 × 57%) qualifies for the home sale exclusion and is tax-free.

Scenario 4

This is similar to Scenario 2, except the home sells for $395,000 instead of $525,000. With an adjusted basis of $355,000, this means the property sold for a $40,000 gain.

The ownership period was 50% qualifying and 50% non-qualifying and the couple is eligible for the gain exclusion for the qualifying portion, but depreciation recapture is recognized first. Since the gain is $40,000 and the depreciation recapture of $40,000 x up to 25% is paid first, there is no gain left over that’s tax-free or taxable at capital gains rates. It’s important to realize that whether it’s qualifying or non-qualifying, depreciation recapture tax is paid first when there’s a gain.

Recordkeeping

It’s important to keep good records of all improvements you make to the home. Every dollar can help reduce taxes you may owe on the gain one day. For more information, read Why It’s Important to Keep Track of Improvements to Your House.

Moving back into your rental to qualify for the principal residence capital gains exclusion might not help reduce your tax bill much if you have substantially depreciated your property or owned the real estate for mostly non-qualifying use. Other options like deferring taxes with a 1031 exchange could also be more helpful for managing your tax payment than selling your rental outright. Understanding the best approach for your personal situation might not be simple, but we love digging into these questions here at Merriman. Contact the Merriman team if you would like help strategizing the sale of your rental and managing your wealth with an eye for the big picture.

References

Exclusion of gain from sale of principal residence, 26 U.S.C. § 121 (2017). Retrieved from https://www.govinfo.gov/content/pkg/USCODE-2017-title26/html/USCODE-2017-title26-subtitleA-chap1-subchapB-partIII-sec121.htm

Internal Revenue Service. (2019, March 8). Property (Basis, Sale of Home, etc.). Retrieved from https://www.irs.gov/faqs/capital-gains-losses-and-sale-of-home/property-basis-sale-of-home-etc/property-basis-sale-of-home-etc-5

S&P Dow Jones Indices. (2019, August 27). Phoenix Replaces Las Vegas as Top City in Annual Gains According to S&P CoreLogic Case-Shiller Index [PDF file]. Retrieved from https://my.spindices.com/documents/indexnews/announcements/20190827-981359/981359_cshomeprice-release-0827.pdf