You cannot do a 1031 exchange on a primary residence. Section 1031 is limited to real property held for business or investment use, and a home you live in is personal-use property in the eyes of the IRS. The good news is that homeowners have a separate and often better tool for the same problem: the Section 121 exclusion, which erases up to $250,000 of gain for single filers and $500,000 for married couples filing jointly. And if you convert your home into a genuine rental before selling, or if the property has always served both personal and investment purposes, the 1031 door can open for part or all of the transaction.
Why Your Home Is Excluded From Section 1031
Section 1031 of the Internal Revenue Code defers capital gains tax on an exchange of real property, but only when the property is held for productive use in a trade or business or for investment.1Office of the Law Revision Counsel. 26 USC 1031 Exchange of Real Property Held for Productive Use or Investment A house where you live doesn’t meet that test. IRS Publication 544 puts it plainly: “The rules for like-kind exchanges do not apply to exchanges of…real property used for personal purposes, such as your home.”2Internal Revenue Service. Publication 544 (2025), Sales and Other Dispositions of Assets
The line between personal use and investment use is the whole foundation of the 1031 framework. A vacation cabin you never rent, a home you inherited and moved into, a condo you bought to live in: each one sits on the personal-use side, and appreciation doesn’t change that. What matters to the IRS is how you actually used the property.
The Section 121 Exclusion Is the Tool for a Home Sale
Congress gave homeowners their own capital gains break under Section 121, and for most people selling a residence it beats what a 1031 exchange would offer even if one were available. Instead of deferring gain until a later sale, Section 121 permanently excludes it from income. Single filers can exclude up to $250,000 of profit. Married couples filing jointly can exclude up to $500,000.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence
To qualify, you must have owned and used the home as your principal residence for at least two of the five years before the sale. Both spouses must meet the use test for the full $500,000 joint exclusion, though only one has to meet the ownership test.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence The two years don’t have to be consecutive. You could live in the home for 14 months, rent it out for a year, move back for 10 months, and still qualify.
The reason this often works out better than a 1031 exchange is finality. An exchange only postpones the tax bill; Section 121 wipes it out entirely, up to the limit. For homeowners whose profit falls under $250,000 or $500,000, there is no tax to worry about at all.
Partial Exclusion When You Have to Sell Early
If you sell before hitting the two-year mark, a prorated exclusion may still be available when the sale is driven by a job relocation, a health issue, or an unforeseen circumstance such as divorce, job loss, or the home being destroyed by a natural disaster.4Internal Revenue Service. Publication 523 (2025), Selling Your Home A work-related move generally qualifies if your new job is at least 50 miles farther from the home than your previous workplace was.
The partial exclusion is calculated as the fraction of the two-year period you had actually met when the qualifying event forced the sale. Twelve months of ownership and use out of the required 24 cuts the exclusion in half: $125,000 for a single filer, $250,000 for a couple filing jointly.
Converting a Home Into a Rental to Qualify Later
This is where the 1031 door can open for a former residence. If you stop living in the home and begin renting it out as a genuine investment property, the character of the asset can change over time from personal to investment use. Once it qualifies as investment property, it becomes eligible for a 1031 exchange.
The IRS built a safe harbor for this scenario in Revenue Procedure 2008-16. Meeting the safe harbor doesn’t guarantee exchange treatment, but it means the IRS won’t challenge the property’s investment status. The requirements are specific:5Internal Revenue Service. Rev. Proc. 2008-16
- You must own the property for at least 24 months immediately before the exchange, and the property must be treated as an investment during that window.
- In each of the two 12-month periods within that window, you must rent the property to a tenant at a fair market rate for at least 14 days.
- Your own use of the property in each 12-month period cannot exceed 14 days, or 10% of the days it was actually rented, whichever number is greater.
The personal-use cap is where most conversions fall apart. A few weekends at the property during a slow rental month can push you past the limit for that block. Keep documentation: signed leases, rent deposits, listings, advertising. The IRS looks at the whole picture, and a property that was never seriously marketed to tenants won’t hold up regardless of how few nights you personally spent there. Failing the safe harbor doesn’t automatically kill the exchange, but you’ll then have to prove investment intent through other evidence, and losing that fight means full taxation of the deferred gain plus interest and penalties.
Mixed-Use Property: When Both Provisions Apply
Some properties pull double duty. A duplex where you live in one unit and rent the other, or a home with a dedicated office generating business income, qualifies as mixed-use property. You don’t have to pick one treatment for the whole building. The sale proceeds and cost basis get split between the personal portion and the business or rental portion.2Internal Revenue Service. Publication 544 (2025), Sales and Other Dispositions of Assets
The personal-use portion qualifies for the Section 121 exclusion if you meet the ownership and use tests. The business or rental portion can go into a 1031 exchange. Allocation is typically based on square footage, or for multi-unit buildings, the number of units. On a duplex you sell for $600,000 where each unit is the same size, roughly $300,000 of the sale price would sit on each side.
Order of Operations
When the same property qualifies for both provisions, the IRS requires you to apply Section 121 first and then apply Section 1031 to whatever taxable gain remains on the business portion. This ordering rule works in the taxpayer’s favor. Any cash or non-like-kind property you receive (called boot) is absorbed by the Section 121 exclusion before it triggers taxable gain under the exchange rules.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence
One limitation matters here. Section 121 does not cover gain caused by depreciation deductions you claimed on the business portion after May 6, 1997. That depreciation recapture has to be handled through the 1031 exchange or paid as tax at a rate of up to 25%. For dual-use owners who have been depreciating the rental side for years, the 1031 exchange is doing real work on top of the Section 121 exclusion.
Moving Into a Property You Acquired Through a 1031 Exchange
The reverse move also works, with a speed bump Congress added on purpose. If you acquire a property through a 1031 exchange and later move into it as your primary residence, you cannot claim the Section 121 exclusion on a subsequent sale until at least five years after you acquired the property.3Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence You still have to satisfy the standard two-out-of-five-year ownership and use test within that window.
Even after you clear the five-year mark, the exclusion gets prorated. Gain attributable to periods of non-qualified use (the time the property was held as an investment before you moved in) is not eligible for Section 121. Only the gain corresponding to the period you actually lived there as your primary residence qualifies. This proration applies to exchanges completed after January 1, 2009.
The practical result: buying a rental property through a 1031 exchange, holding it as a rental for three years, then living in it for two years gets you past both the five-year ownership threshold and the two-year use test. But only the gain allocable to those two years of personal use is excludable. The rest stays taxable or has to roll into another exchange.