A 1031 Exchange is a common tool used by property owners in their investment strategy to defer capital gains taxes by reinvesting proceeds from the sale of investment or business property into like-kind real estate. However, when an Exchanger later converts a Replacement Property into a primary residence, additional tax deferral tools can come into play, most notably Exchangers will try to utilize Section 121. Section 121 of the tax code allows property owners to exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from the sale of their primary residence when specific criteria is met.
Section 121 has its own rules and requirements that must be met to qualify, including “The 5-Year Rule” that applies when the property was previously held for investment purposes. While this rule is not exclusive to investment properties acquired through a 1031 Exchange it is common to see both Section 1031 and Section 121 utilized together. Because of this, we’ll break down what the 5-Year Rule means, how it applies when a 1031 Exchange property is used in combination with Section 121, and what you can do to stay compliant while maximizing your tax benefits.
What is “The 5-Year Rule”?
While this is not a rule specific to a 1031 Exchange, it is merely a requirement in regard to using Section 121 of the tax code and is commonly used with a property acquired through a 1031 Exchange. The term “The 5-Year Rule” applies when an investor acquires an investment property and later converts the property to personal use and then wants to utilize Section 121 to exclude gain when they sell what has become their primary residence. The 5-Year Rule states the investor must own the property for at least 2 of the 5 years preceding the sale before they can claim the § 121 exclusion and of those 5 years they must have lived in it as their primary residence for at least 2 years. This prevents such scenarios as someone acquiring an investment property through a 1031 Exchange then quickly flipping it into a residence and selling it using the personal residence exclusion. As with other tax deferral methods, Section 121 has certain regulations that must be met, these include:
- The investor must have owned the property and used it as their primary residence for at least 2 years during the 5-year period ending on the date of the sale before Section 121 can be applied.
- Under § 121 you can exclude up to $250k (Single Taxpayer) / $500k (Married Taxpayer).
- When a home has periods of “non-qualified use” such as when it is used as a rental or investment property before a primary residence, the portion of gain attributed to those periods is not eligible for exclusion under Section 121. The calculation for the gain attributed to non-qualified use is as follows:
- Taxable portion = total gain × (nonqualified use ÷ total ownership years)
- Qualified use = when you lived in it as your main residence.
- Nonqualified use = when it was rented or used for business before it became your residence.
It is important to note that the 5-Year Rule is not an official IRS regulation but is a common way to reference the 2-of 5-year ownership and use requirement under Section 1031.
Example Scenario of the 5 Year Rule
An investor completes a 1031 Exchange in January 2018 and acquires a residential property to be used as a rental home as their Replacement Property. After five years of renting the property out, they convert it to a primary residence in January 2023. In May 2025, they decide they want to sell the home and utilize the Section 121 exclusion. In this scenario the facts and circumstances are as follows:
- Have they owned the property for the last five preceding years? Yes, they have owned the property for 7 total years.
- Have they lived in the property as their primary residence for at least two of the last 5 years? Yes, they lived in the property for over two of the last five years.
- What portion of the gain can be excluded as qualified use? The property owner will need to work with their tax advisor to calculate the gain that was attributed to nonqualified use, the years the home was rented out, and that portion will not be included in the Section 121 exclusion.
- How is depreciation handled? Any depreciation claimed, or that could have been claimed, while the property was rented is not excludable under Section 121 and will generally be taxed as unrecaptured Section 1250 gain when the property is sold.
In the example above the property owner chose to rent the property for five years before converting it to a residence, however there is no requirement that they must wait that long, only that they must meet the 2-of-5-year test before selling.
For properties acquired through a 1031 Exchange, tax professionals often refer to IRS Rev. Proc. 2008-16, which provides a safe harbor and guidance including that renting the property at fair-market value for at least 24 months. This also helps establish that the property was initially acquired with the intent to be held for investment prior to being converted into a primary residence, supporting the validity of the 1031 Exchange.
As with all tax deferral strategies, careful planning and documentation are essential to ensure compliance and to optimize the timing of both conversion and disposition.
Planning Tips for Investors
When planning a real estate investment strategy, it’s important to consider how each property may be used over time. If there’s a possibility that a property acquired as an investment could eventually serve as a personal residence, it’s essential to plan accordingly and ensure all relevant rules are carefully followed. To protect your interests and maintain compliance the below considerations should be made:
- Keep detailed records of the property’s use, occupancy, and any periods of personal versus investment use.
- Collaborate with a Qualified Intermediary (QI) and a knowledgeable tax professional to structure transactions properly and ensure tax implications are clearly understood.
- Be aware of state-level variations, as regulations and interpretations of federal tax provisions can differ from one jurisdiction to another.
While both a 1031 Exchange and Section 121 are powerful tools for building wealth and structuring an estate plan, the nuances of these tax deferral strategies are often overlooked, and at times misunderstood. The rules governing these sections of the tax code can be complex, and careful adherence is necessary to avoid costly mistakes that may result in an unforeseen tax liability. A thoughtful approach, grounded in professional guidance and accurate recordkeeping, helps ensure that your investment strategy remains compliant, tax-efficient, and aligned with your long-term financial goals.
Understanding how the 5-Year Rule applies to Section 121, in many cases to properties acquired through a 1031 Exchange, is essential for investors looking to convert an exchange property into a primary residence while preserving the tax advantages of both provisions. The IRS has designed these rules to prevent abuse while still rewarding long-term, strategic investment behavior.