1031 Exchange 5-Year Rule and 2-Year Rules, Explained

1031 Exchange 5-Year Rule and 2-Year Rules, Explained
1031 Exchange 5-Year Rule and 2-Year Rules, Explained
Nov 26, 2026

Short answer: There is no general rule that you must hold a 1031 exchange property for five years, or for two. People use those numbers for three specific rules:

  1. The 5-year rule (primary residence). If you move into a property you got in a 1031 exchange, you must own it for at least 5 years from the exchange before you can use the home-sale exclusion of up to $250,000 ($500,000 for married couples). This is Section 121(d)(10).
  2. The 2-year related-party rule. If you exchange property with a family member or a company you control, both of you generally have to keep the properties for 2 years, or the deferred gain becomes taxable. This is Section 1031(f).
  3. The 2-year vacation home safe harbor. For a vacation or second home, the IRS won't question that it was held for investment if you owned it for 24 months before (or after) the exchange, rented it at a fair rent for at least 14 days a year, and limited your own use. This is Rev. Proc. 2008-16.

Outside those rules, the test is your intent: you must hold both the old and the new property for investment or for use in a business.

Is there a minimum holding period for a 1031 exchange?

No. Section 1031 doesn't set a minimum number of months. What it requires is that both properties are held for productive use in a trade or business or for investment. Property you buy to flip, or plan to move into right away, doesn't qualify.

Because the law is about intent, the holding period is evidence. The longer you hold and rent a property, the easier it is to show it was an investment. Many tax advisers suggest holding replacement property for at least a year, and across two tax returns, before selling it or changing its use, and longer if you might move in. That's a rule of thumb, not a law.

The holding period matters most in the situations below, where the tax code does set specific numbers.

The 1031 exchange 5-year rule: moving into a replacement property

Investors sometimes plan to exchange into a rental house, rent it out for a while, then move in and later sell it using the home-sale exclusion. That can work, but the tax code adds a waiting period.

The rule: if you acquired a home in a 1031 exchange, you can't use the Section 121 home-sale exclusion if you sell it within 5 years of the date you acquired it in the exchange. The same applies if you got the home from someone who acquired it in an exchange and kept their tax basis (for example, as a gift).

Congress added this rule in 2004 to stop a quick two-step: exchange into a house, move in, and then sell it with the exclusion, wiping out the gain you deferred in the exchange.

The 5-year rule is on top of the normal home-sale tests, not instead of them. To use the exclusion, you also have to:

  • Own and live in the home as your main home for at least 2 of the 5 years before the sale (the "2-out-of-5-year" rule, which people also call a 5-year rule), and
  • Not have used the exclusion on another home in the 2 years before the sale.

Two more limits when a rental becomes your home

  • Nonqualified use. If the home was a rental before it became your main home (after 2008), part of the gain can't be excluded. Roughly, the share of the gain that matches the share of time it wasn't your main home stays taxable.
  • Depreciation. Any depreciation you claimed while it was a rental (after May 6, 1997) is taxable when you sell, at up to 25%. The exclusion doesn't cover it.

Example

Maria sells a rental condo with a $400,000 gain and exchanges into a $900,000 house in January 2027. She rents the house at a fair rent for two years, then moves in in January 2029 and lives there as her main home.

  • If she sells in 2031 (4 years after the exchange), she can't use the exclusion at all. Her whole gain, including the $400,000 she deferred, is taxable.
  • If she sells in February 2032 (just over 5 years after the exchange, and after living there 3 years), she can use the exclusion, but only on part of the gain. About two-fifths of her ownership was rental use, so roughly that share of the gain stays taxable, plus the depreciation she claimed while renting it. The rest of the gain can be excluded, up to $250,000, or $500,000 if she's married filing jointly and both spouses meet the use test.

The numbers depend on the details, so run the plan past a tax adviser before you move in.

Can you do a 1031 exchange on a primary residence?

Not on its own. A home you live in is personal-use property, not investment property, so it can't be the property you sell or buy in a 1031 exchange. When you sell your main home, the tool is the Section 121 exclusion instead.

There are two ways the rules overlap:

  • A home that's also a rental or business property. If part of the property is used for business or rental (a duplex where you live in one unit, or a house that became a rental), the IRS lets you combine the two: the home-sale exclusion for the residence part and a 1031 exchange for the investment part. The IRS explained how in Rev. Proc. 2005-14.
  • A former home that you converted to a rental. If you moved out and rented your old home, it can become investment property. With careful timing you may be able to use both the exclusion and a 1031 exchange on the same sale. Get advice before you list it.

And in the other direction, a property you got in an exchange can become your home later, subject to the 5-year rule above.

The 2-year related-party rule

You can do a 1031 exchange with a relative or with a company you control, but there's a catch: if either of you sells or disposes of the property you received within 2 years of the exchange, the gain you deferred becomes taxable. It's taxed in the year of that sale.

The rule exists to stop related parties from swapping properties so that one of them can sell a low-basis property without tax.

Who counts as related: your spouse, children, grandchildren, parents, grandparents, brothers and sisters (including half-siblings), companies and partnerships in which you own more than 50%, and certain trusts and estates. In-laws, aunts, uncles, nieces, nephews and cousins generally aren't related parties under these rules.

Exceptions. The 2-year rule doesn't apply if the later sale happens because of the death of either party, an involuntary conversion (such as a casualty, or a condemnation that wasn't already threatened when you made the exchange), or if you can show that neither the exchange nor the later sale had tax avoidance as one of its main purposes.

Reporting. You report a related-party exchange in Part II of Form 8824 for the year of the exchange and for each of the next 2 years.

Buying your replacement property from a relative

This is where most related-party exchanges go wrong. If you sell your property to an outside buyer and use the money to buy replacement property from a relative, the IRS generally treats it as a way around the rules, because your relative ends up with cash from the sale of their property. Those exchanges usually fail, unless your relative also reinvests in their own exchange and doesn't cash out.

Selling your old property to a relative, while buying your replacement from an unrelated seller, is a different situation and can work. Either way, plan a related-party exchange with your qualified intermediary and tax adviser before you sign anything.

The 2-year rule for vacation and second homes

Can a vacation home be exchanged? Yes, if it's held for investment rather than personal enjoyment. Because that line is blurry, the IRS created a safe harbor in Rev. Proc. 2008-16. If you meet it, the IRS won't challenge whether the home qualifies.

For the property you sell, you must:

  • Own it for at least 24 months right before the exchange, and
  • In each of the two 12-month periods before the exchange:
    • Rent it to someone else at a fair rent for 14 days or more, and
    • Limit your personal use to 14 days or 10% of the days it was rented at a fair rent, whichever is greater.

For the property you buy, the same tests apply to the 24 months after the exchange.

Personal use includes use by you, your family, and anyone paying less than a fair rent. Days spent mainly on repairs and maintenance generally don't count as personal use.

Missing the safe harbor doesn't automatically disqualify an exchange, but it removes the protection, so expect more scrutiny. A beach house you visit every summer and rarely rent is unlikely to qualify.

How the rules fit together

RuleWhen it appliesThe numberWhere it comes from
Holding for investmentEvery 1031 exchangeNo set minimum; intent countsSection 1031(a)
Exchange deadlinesEvery deferred exchange45 days to identify, 180 days to closeSection 1031(a)(3)
5-year ruleYou move into a property you got in an exchangeOwn it 5 years before using the home-sale exclusionSection 121(d)(10)
2-out-of-5-year ruleSelling a home you live inLived in it 2 of the last 5 yearsSection 121(a)
Related-party ruleExchanges with family or companies you controlBoth keep the properties 2 yearsSection 1031(f)
Vacation home safe harborSecond homes and vacation rentals24 months, 14 days rented a year, limited personal useRev. Proc. 2008-16

For the deadlines, see our 1031 exchange timeline, and use the 1031 exchange calculator to find your dates.

Checklist before you exchange

  • Both properties are held for investment or business use, and your records show it (leases, rent received, depreciation claimed)
  • A qualified intermediary is engaged before you close the sale
  • 45-day and 180-day dates in your calendar
  • Related party involved? Both sides can keep the properties for 2 years; no buying replacement property from a relative who cashes out; Form 8824 Part II filed for 3 years
  • Vacation home? Rented at a fair rent at least 14 days a year and personal use within the limit, for 24 months before and after
  • Might move in later? Plan to own the replacement property for at least 5 years from the exchange, and expect part of the gain and the depreciation to stay taxable

FAQ

What is the 5-year rule for a 1031 exchange?

If you move into a property you acquired in a 1031 exchange, you must own it for at least 5 years from the exchange before you can use the home-sale exclusion. It comes from Section 121(d)(10). There's no general 5-year holding requirement for other 1031 exchanges.

What is the 2-year rule for a 1031 exchange?

There are two. In an exchange with a related party, both parties generally must keep the properties for 2 years or the deferred gain becomes taxable. And for vacation homes, the IRS safe harbor asks for 24 months of ownership with rental and limited personal use, before and after the exchange.

How long do I have to hold a 1031 exchange property?

The law doesn't set a minimum. You have to hold it for investment or business use. Many advisers suggest at least a year and two tax returns as a rule of thumb, longer if you might sell soon or move in, and 2 years for related-party exchanges and vacation homes.

Can I do a 1031 exchange on my primary residence?

Not on its own, because a home you live in isn't investment property. Use the home-sale exclusion instead. If part of the property is rented or used for business, you may be able to combine the exclusion with a 1031 exchange on that part.

Can I move into my 1031 exchange property?

Yes, eventually. Rent it out first so it's clearly an investment, and if you want the home-sale exclusion later, own it at least 5 years from the exchange and live in it at least 2 of the 5 years before you sell. Part of the gain and the depreciation will still be taxable.

Can I do a 1031 exchange with a family member?

Yes, but both of you generally have to keep the properties for 2 years, and buying your replacement property from a relative who takes the cash usually fails. Plan it with a qualified intermediary and tax adviser first.

Can I 1031 exchange a vacation home?

Yes, if it's held for investment. The IRS safe harbor applies if you owned it 24 months, rented it at a fair rent for at least 14 days in each year, and kept personal use to 14 days or 10% of the rented days.

Next steps

New to exchanges? Read what a 1031 exchange is and how it defers tax. Planning one? Start with the 1031 exchange rules guide and the timeline. If you want replacement property you don't have to manage, read about Delaware statutory trusts (DSTs) and the 721 exchange into a REIT. California property owners should also read our California 1031 guide. You can compare options on our 1031 exchange page or contact our team.

This article is for general information only and is not tax, legal or investment advice. The rules described are simplified and the outcome depends on your facts. Work with a qualified intermediary and a tax adviser before you exchange, move into or sell a property. Private real estate investments carry risk, may be illiquid, and some are available only to accredited investors.