Atlas Shrugged by Ayn Rand [Book Review]
July 15, 2016
How Real Estate Rentals Reduce Your Taxes, Even If You’re a High Earner
September 13, 2016

December 20, 2023 | read

Using the Section 121 Exclusion in Your Investment Strategy and Eliminating Capital Gains

Brandon Hall

If you’re the type of investor who buys a property and lives in it while fixing it up, today’s article is going to be perfect for you. Even if you’re an accidental landlord or simply a person who moves on a regular basis, read on as this article will help with your overall investment strategy by explaining how to avoid capital gains on your property. 

In case you don’t already know, there is a small part of the massive tax code called the Section 121 exclusion. Basically, if you live in a property for two of the previous five years, when you sell the property you get to exclude $250k ($500k if married filing joint) of capital gains from taxes. If used effectively, you can build massive tax free wealth.

Grow Your Wealth Tax Free

Let me tell you a story about Bob. Bob grew up around Portland, OR and had an early passion for real estate. When he graduated college, he went into a construction job that paid him enough to acquire financing on a crappy home. Bob rehabbed his crappy home and then sold it – tax free.

Related: Why Investing in Real Estate Dominates Your Stock Portfolio

Coincidentally, Bob had lived in the property he was fixing up for over two years. When he sold it, after the long rehab was complete, he didn’t have to pay taxes. That’s the power of the Section 121 exclusion.

Bob started researching how this part of the tax code could play a role in his investment strategy. He realized that he can use the Section 121 exclusion once every two years. He then decided to focus on properties that needed substantial rehab, yet were livable and in an up and coming area.

Long story short, Bob did this for 15 years and sold six houses under the Section 121 exclusion. His total tax free gain amounted to one million (he hit a few home runs), all of which was tax free. Total tax savings were at least $150,000.

Two of the Last Five Years

The trick to the Section 121 exclusion is to understand what the “two of the last five” year provision means. If you owner occupy a property, and live in it for at least two years, you can hold it for an additional three years as a rental prior to selling. You’ll still be able to sell the property under the Section 121 exclusion because you lived in the property for “two of the last five” years.

A common trap investors fall into is moving out of the property they have lived in for one year and 11 months or some other time before the two year mark. In most cases, failing to live in the property for a full 24 months will obliterate any chance you have of utilizing the Section 121 exclusion to avoid capital gains. Don’t let the IRS laugh all the way to the bank – live in the property for two years!

Related: Episode #3 – House Hacking: The Tax Side to Living for Free

As with every rule the IRS makes, there are numerous exceptions that will allow you to leave the property prior to two years and still be eligible for the capital gains exclusion. Such exceptions range from job relocations, military deployment, and economic hardship. But make a mental note that it can be very hard to show the IRS that you meet the exception.

If you rent the property prior to ever occupying it, you’ll run into issues when calculating how much of your capital gain is excludable. In this case, you will need to pro-rate the gain based on the ratio of time it was first used as a rental compared to that of when you occupied it. The IRS doesn’t want you to move into a rental property that’s experienced massive appreciation and then be able to write it all off.

After living in your property for two years, you can move out and rent the property for three years prior to selling.

The best part about the two of three years rule is that you can move out (after living there for two years) and rent the property for three years prior to selling. As long as you have lived in the property for at least two years, you’ll meet the test.

For example, let’s say you live in your home for 10 years and decide it’s time to pack your bags and move to the beach. Fresher air, sunnier days, and better drinks – I’m on board. Instead of selling the home, you decide to rent it for two and a half years. During that time, the market skyrockets and you determine it’s time to sell. Because you are selling the home prior to three years after moving out, you get to exclude $250k ($500k if married filing joint) of capital gains from taxes.

Again, the lookback period is five years. Since you rented it for two and a half years, and previous to that you had lived in it for ten years, you meet the test!

How to Use the Section 121 Exclusion and Still Own Your Home

Back to my story about Bob. You see, Bob got married and had kids. That really put a damper on his investment strategy. His latest home is a whopper of a deal; probably his best yet. He’s sitting on roughly $350k of capital gains. To top it off, Bob is bullish on the neighborhood and feels his property will certainly increase in value over the next ten years.

Bob wants to stay in the property, but his wife wants to move to a larger house. Their family is expanding and she wants to be on the other side of Portland and closer to her family. Bob knew that by moving, they’d have three years to sell their property or face a heavy tax liability. He wanted to hold the property much longer than three years, hence his dilemma.

I’m still in my mid-20’s so I can’t relate to Bob’s family predicament. But I know real estate tax decently well and crafted a unique way to get Bob out of his latest home while keeping the Section 121 exclusion integrity intact.

To benefit from the Section 121 exclusion, you must have a qualified sale.

To benefit from the Section 121 exclusion, you must have a qualified sale. This left us with two options.

The first would be to sell it to a third party just like any regular transaction.  We didn’t want to do this because that meant that Bob would lose ownership of his property. Remember, he’s bullish on the next ten years and wants to keep it as a rental.

Which led us to option two – sell it to ourselves.

We created an S-Corporation (though a C-Corporation also works) and effectively sold it to the S-Corporation. The sale was qualified and Bob had to report the sale on his tax return. However he was able to exclude up to $500k of capital gains (he’s married now) which left him with $0 capital gains to report to the IRS.

Many of you may be thinking “why not just transfer-in or ‘contribute’ the property to the S-Corporation?”

That’s a great question, and one Bob asked himself. The answer, and what makes this strategy so beautiful, lies in the effect on the property’s basis.

Contributing Property Versus Selling Property

When you contribute property to an entity, the property maintains its tax basis. When you sell a property to an entity, the property receives a stepped up basis; the selling price.

If we contributed the property to the S-Corporation, the property would have maintained its original tax basis as well as built-in capital gains. This means at some point in the future, we would have to pay tax on the original $350k of capital gains that were transferred into the entity, plus any new amount of appreciation.

By selling the property to the S-Corporation, the S-Corporation will have a basis in the property equal to the fair market value; the purchase price. Bob, the seller, will report the $350k of capital gains on his own tax returns and pay taxes. But due to the section 121 exclusion, the capital gains disappear. So Bob didn’t have to pay taxes, the S-Corporation receives a stepped up basis in the property, and when the property is sold, the S-Corporation will only pay taxes on the capital gains incurred after Bob sold it to the S-Corporation.

The beautiful thing about this strategy is that Bob can hold it for 10, 20, or even 50 years. He doesn’t have to worry about the “two out of five years” rule because he’s already use the Section 121 exclusion on this property.

An Example Will Probably Help

Three examples will help illustrate. First, we’ll assume Bob flat out sells the property. Second, we’ll assume he transfers the property to an entity. Third, we’ll assume he sells the property to his S-Corporation.

For each of these examples, we’ll assume Bob originally bought the property for $200k and it’s now worth $550k. Additionally, we’ll assume the value in ten years will be $700k.

1. Bob sells the property outright – since he has lived in the property for the previous two years, the $350k of capital gains will be excluded from his tax returns. Bob is married and gets to exclude $500k of capital gains. Bob is bummed because, while he saved roughly $53,000 in taxes ($350k x .15), he no longer owns the property. Bob is happy for the new owners and knows they made a sweet investment.

2. Bob transfers the property into his own entity – when Bob transfers the property to his own entity, he maintains ownership which is what he wanted. But he also maintains his original basis. Bob’s entity will have the property on its books with a basis of $200k and gains of $350k. If the entity were to ever sell the property, the total gain will be the sales price minus $200k (the original basis). With a ten year future value of $700k, the entity would potentially pay taxes on $500k of capital gains. Yikes.

3. Bob sells the property to his S-Corporation – when this happens, the basis the S-Corporation records is the sales price, or $550k ($200k original basis plus $350k of Bob’s gains). When the S-Corporation sells the property in the future, it will calculate capital gains by using a basis of $550k rather than $200k. This will significantly reduce the S-Corporation’s future tax liability caused by the sale. At the same time, the $350k of capital gains has effectively disappeared because Bob used his Section 121 exclusion.

Total tax savings when using option 3? At least $53,000. That’s the power of tax planning.

Thanks for reading about how to avoid capital gains with the Section 121 exclusion. Please like us on Facebook and help spread our content to all investors!