The short answer
Not as long as it is your home. Section 1031 needs property held for productive use in a trade or business or for investment, and the IRS has held since Rev. Rul. 59-229 that a residence is neither; the Ninth Circuit in Starker said use of property solely as a personal residence is antithetical to its being held for investment. What applies instead is section 121, which excludes up to $250,000 of gain, or $500,000 on a joint return, if you owned and used the home as your principal residence for at least two of the five years before the sale. Rent the place out genuinely and the picture changes: a former home can qualify for section 1031 on the investment side, and a second home qualifies only inside the safe harbour in Rev. Proc. 2008-16.
At a glance
| Section 121 exclusion | $250,000, or $500,000 on certain joint returns, once in any two-year period |
|---|---|
| Ownership and use test | Principal residence for at least two of the five years ending on the sale date |
| Order of operations | Rev. Proc. 2005-14: section 121 is applied to realised gain before section 1031 |
| Depreciation | Section 121(d)(6) denies the exclusion for depreciation taken after 6 May 1997 |
| Second-home safe harbour | 24 months owned; each 12 months rented at fair rental 14+ days |
| Personal-use cap | No more than the greater of 14 days or 10% of the days rented at fair rental |
| The trap on the far side | No section 121 on a 1031 replacement sold within 5 years of acquiring it |
A residence fails the holding test, and expecting it to appreciate does not save it
The IRS collected the authority itself in the background to Rev. Proc. 2008-16, starting with Rev. Rul. 59-229, which refuses deferral to anyone trading one personal residence for another on the ground that neither side qualifies as business or investment property.
Taxpayers have tried the appreciation argument and lost. The Tax Court answered it in Moore v. Commissioner, T.C. Memo. 2007-134, where two lakeside holiday houses that had never been let were exchanged, holding that a "mere hope or expectation that property may be sold at a gain cannot establish an investment intent if the taxpayer uses the property as a residence."
Starker v. United States, 602 F.2d 1341, 1350 (9th Cir. 1979) states the principle the IRS still quotes: "it has long been the rule that use of property solely as a personal residence is antithetical to its being held for investment."
Section 121 is the homeowner's tool, and it is generous but capped
Section 121(a) excludes gain on the sale of a home you owned and used as your principal residence for at least two of the five years ending on the date of sale. Section 121(b) caps the exclusion at $250,000, or $500,000 for certain joint returns, and section 121(b)(3) blocks a second use of the exclusion within two years of a sale that already used it.
Two limits catch owners of long-held rentals-turned-homes. Section 121(d)(6) denies the exclusion for gain matching depreciation adjustments claimed for periods after 6 May 1997, and section 121(b)(5) apportions gain away from the exclusion for periods of non-qualified use.
If your gain sits comfortably under the cap, there is nothing to plan: sell, exclude, and move on. The planning question only opens when the gain is bigger than the exclusion, which is where the next section starts.
Two of five years means you can move out and still do both
The two-year use test looks back five years, so a home can be rented for up to three years and still satisfy section 121 on the sale. By that point it is also being held for investment, which is what section 1031 needs.
Rev. Proc. 2005-14 confirms both halves in its own Example 1. A house bought for $210,000 is a principal residence from 2000 to 2004, rented from 2004 until 2006 with $20,000 of depreciation claimed, then exchanged in 2006 for $10,000 of cash and a $460,000 townhouse the taxpayer intends to rent. The IRS notes that section 121 does not require the property to be the principal residence on the date of the exchange.
The numbers come out as follows in the ruling: amount realised $470,000, adjusted basis $190,000, realised gain $280,000, of which $250,000 is excluded under section 121 and $30,000 is deferred under section 1031.
The order is fixed: section 121 first, and the excluded gain then lifts your new basis
Rev. Proc. 2005-14 section 4.02(1) is explicit that section 121 must be applied to gain realised before applying section 1031. Section 4.02(2) then allows section 1031 to shelter the piece section 121 cannot reach, including the gain attributable to post-1997 depreciation.
Boot is treated unusually kindly here. Under section 4.02(3), cash or other non-like-kind property is taken into account only to the extent it exceeds the gain excluded under section 121, which is why the $10,000 of cash in the IRS's own example is not recognised at all.
Section 4.03 completes the loop: the excluded gain is treated as gain recognised, so it increases the replacement property's basis. In Example 1 the replacement basis is $430,000, being the $190,000 old basis plus the $250,000 excluded, less the $10,000 of cash received.
A second home qualifies only if the Rev. Proc. 2008-16 rental test is met
The safe harbour applies to a dwelling unit, defined as real property improved with a house, apartment, condominium or similar improvement providing sleeping space, bathroom and cooking facilities. It is effective for exchanges of dwelling units occurring on or after 10 March 2008.
For the property you are selling, the IRS will not challenge its status if you have owned it for at least 24 months immediately before the exchange and, in each of the two 12-month periods before it, the conditions below are met. The mirror-image test applies for 24 months after the exchange on anything you buy.
Personal use is measured under section 280A(d)(2), taking section 280A(d)(3) into account but not section 280A(d)(4), so days a relative stays rent-free count against you. Fair rental is judged on all the facts and circumstances when the rental agreement is entered into.
- Owned for at least 24 months immediately before the exchange, the "qualifying use period"
- Rented to another person at a fair rental for 14 days or more in each 12-month period
- Personal use no greater than 14 days or 10 percent of the days rented at fair rental, whichever is larger
- The first 12-month period ends the day before the exchange; the second ends the day before that period begins
- On the replacement side, the same tests run for 24 months after the exchange, and a failure means filing an amended return
Part home, part rental or farm: allocate the way you allocated depreciation
Where the residential and business portions sit inside the same dwelling unit, Treas. Reg. 1.121-1(e) treats the whole property as the principal residence for the two-year use test. Where the business portion is a separate structure, the gain allocated to it is not excludable unless you also met the use requirement for that part.
Rev. Proc. 2005-14 Example 2 shows the split: a $210,000 property comprising a house and a guesthouse used as a business office, allocated two-thirds and one-third by square footage, produces $100,000 excluded under section 121 on the residential share and $80,000 deferred under section 1031 on the business share.
Treas. Reg. 1.121-1(e)(3) requires basis and amount realised to be allocated by the same method used to determine depreciation adjustments, and the revenue procedure endorses square footage, citing Poague v. United States. A farmhouse on acreage, a duplex you half occupy or a shop behind the house all run on this machinery, so settle the square-footage split with your CPA or attorney while the contract can still be changed.
The five-year rule waiting on the other side
Section 121(d), as amended by section 840 of the American Jobs Creation Act of 2004, denies the section 121 exclusion where the property was acquired in an exchange to which section 1031 applied and is sold within the five-year period beginning on the date of acquisition. The provision is effective for sales or exchanges after 22 October 2004.
So the sequence of home, rental, exchange, new rental, new home works, but the clock on the far end is five years from acquiring the replacement, not two. If I move into my 1031 replacement, can I later sell it tax-free? and How long do I have to rent a 1031 replacement before I can move in? work through the waiting periods.
Related questions
How long must I rent the house out before I can exchange it?
There is no statutory period for a former home, only the evidence that it is genuinely held for investment; the 24-month safe harbour in Rev. Proc. 2008-16 is the nearest thing to a bright line. See How long do I have to hold a rental before I can 1031 exchange it?.
Can my spouse and I each claim $250,000?
The $500,000 figure is a single joint-return limit under section 121(b)(2), available when both spouses meet the use requirement and either meets the ownership requirement, not two separate exclusions stacked.
Does section 121 cover the depreciation I claimed while it was rented?
No. Section 121(d)(6) carves out gain matching depreciation adjustments for periods after 6 May 1997, but Rev. Proc. 2005-14 lets section 1031 defer that same gain if the sale is structured as an exchange.
I live in one unit of a duplex and rent the other. What happens?
You allocate. The unit you occupy runs on section 121 and the rented unit can go into an exchange; 1031 exchange for a duplex, triplex or fourplex covers the property side.
My holiday home has never been rented. Is there anything I can do?
Only prospectively. Put it on the market as a genuine rental, meet the 14-day and 10 percent tests for two full years, and the safe harbour opens; until then Moore is directly against you.
Sources
Checked against these publications on September 19, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
- Rev. Proc. 2008-16 — safe harbour for dwelling units, sections 3, 4 and 5
- Rev. Proc. 2005-14 — applying sections 121 and 1031 to a single exchange, with worked examples
- 26 U.S. Code § 121 — exclusion of gain from sale of a principal residence
- 26 U.S. Code § 1031 — property held for productive use or investment
- IRS Fact Sheet FS-2008-18 — personal-use property does not qualify
- 26 CFR § 1.1031(a)-1 — property held for productive use or investment
