
Short answer
No, a home you live in cannot be part of a 1031 exchange, because both properties must be held for investment or business use. But homeowners and investors still combine the two in four common ways: converting a former home to a rental before selling, using the home-sale exclusion and a 1031 exchange on the same sale, exchanging into a rental you later move into, and splitting a property that is partly home and partly rental. Each has its own timing rules, set out below.
| Home-sale exclusion (IRC §121) | 1031 exchange | |
|---|---|---|
| Property | Your main home | Investment or business real estate |
| Benefit | Gain excluded for good: up to $250,000, or $500,000 for married couples filing jointly | All gain deferred, no dollar limit |
| Main test | Owned and lived in it 2 of the last 5 years | Held for investment; reinvest within 45/180 days |
| Depreciation | Not excluded | Deferred |
| Must buy another property? | No | Yes |
On this page
Why your home does not qualify
Section 1031 covers real property "held for productive use in a trade or business or for investment" (IRC §1031(a)). A home you live in is held for personal use. Buying a new home does not defer the gain either: the old rule that let homeowners roll gain into a more expensive home was replaced by the exclusion in IRC §121 in 1997. That exclusion, sometimes called the "poor man's 1031", is covered in IRS Publication 523.
Scenario 1: you moved out and rented your home
Once you move out and rent the house at market rent, it becomes investment property, and a later sale can be part of a 1031 exchange. The question is how long to rent it first. The law sets no fixed period. Many advisers aim for one to two years of genuine rental, and the IRS safe harbor for dwelling units looks at 24 months (Rev. Proc. 2008-16). A house listed for sale the week you move out looks like a home sale, not an investment.
Scenario 2: use both the exclusion and a 1031 on one sale
If you lived in the home for at least two of the five years before the sale and then rented it, you may qualify for both. Rev. Proc. 2005-14 says to apply the home-sale exclusion first and Section 1031 to the rest. Because the 2-of-5 test looks back five years, you generally have up to three years after moving out to sell and still use the exclusion.
Example. A married couple bought a house in 2016 for $400,000 and lived in it until January 2024. They rented it from February 2024 and claimed $30,000 of depreciation. In October 2026 they sell it for $1,000,000.
| Step | Amount |
|---|---|
| Adjusted basis ($400,000 less $30,000 depreciation) | $370,000 |
| Total gain | $630,000 |
| Excluded under §121 (they lived there 2 of the last 5 years) | $500,000 |
| Remaining gain, including the $30,000 of depreciation | $130,000 |
Under Rev. Proc. 2005-14, they can take up to $500,000 of the proceeds in cash, covered by the exclusion, and reinvest the other $500,000 in a rental through a 1031 exchange to defer the remaining $130,000. Without the exchange, that $130,000 would be taxable, including the depreciation, which the exclusion never covers.
Scenario 3: exchange into a rental, then move in later
You can exchange into a property, rent it, and later make it your home. Two rules control this:
- Hold it as a rental first. Under Rev. Proc. 2008-16, the IRS will not challenge the exchange if, for each of the two 12-month periods after it, you rent the property at fair rent for at least 14 days and your personal use is no more than 14 days or 10% of the rented days, whichever is greater.
- Own it 5 years before using the exclusion. Property acquired in a 1031 exchange must be owned for at least five years before you can claim the home-sale exclusion on it (§121(d)(10)).
Even after five years, the exclusion is reduced for the years the property was a rental before you moved in, and depreciation is still taxed. Example: you exchange into a house in 2026, rent it for two years, live in it for three, and sell in 2031. Roughly two-fifths of the gain falls in the rental years and is not excluded, and the depreciation you claimed is taxable. See using a 1031 exchange to buy a second home.
Scenario 4: part home, part rental
If you live in one unit of a fourplex and rent the other three, the rented part is investment property. Allocate the sale price and basis between the parts: the home portion can qualify for the exclusion and the rental portion for a 1031 exchange. The same split works for a home with a separate rental cottage or a farm with a house. Rev. Proc. 2005-14 includes examples. A home office that is part of the house itself is usually treated as part of the home.
Mistakes to avoid
- Moving into the replacement property within months of the exchange.
- Renting to a relative below market rent and calling it a rental.
- Waiting more than three years after moving out and losing the exclusion.
- Forgetting that depreciation is taxed under the exclusion; the 1031 is what defers it.
- Selling an exchanged property as your home before the five years are up.
For the general rules, see 1031 exchange rules and how long you must hold a property. Run your own figures with the capital gains vs 1031 comparison.
Frequently asked questions
Can you avoid capital gains tax by buying another primary residence?
No. That rollover rule ended in 1997. Today a home sale uses the exclusion of up to $250,000, or $500,000 for married couples, and gain above that is taxable even if you buy a more expensive home.
What is a poor man's 1031 exchange?
It is a nickname for the home-sale exclusion in IRC §121. It excludes gain rather than deferring it, but only on a main home you owned and lived in for two of the last five years.
Can I turn an investment property into my primary residence?
Yes. If it was acquired in a 1031 exchange, rent it first (the IRS safe harbor looks at 24 months) and own it at least five years before you sell it with the home-sale exclusion. The rental years and depreciation reduce what you can exclude.
When can you move into a 1031 exchange property?
There is no fixed date in the law, but moving in soon after the exchange suggests it was not held for investment. The IRS safe harbor covers properties rented under its rules for 24 months after the exchange.
Sources
- 26 U.S.C. §121 (home-sale exclusion and the 5-year rule)
- Rev. Proc. 2005-14 (using §121 and §1031 on one sale)
- Rev. Proc. 2008-16 (rental-use safe harbor for dwelling units)
- IRS Publication 523 (Selling your home)
- 26 U.S.C. §1031 (held for investment requirement)
This article is general information, not tax or legal advice. Talk to your CPA or tax attorney about your situation.







.jpg)




.jpg)
