Reference, Part IX: Intersections with the wider code
Principal Residences and Section 121
Section 121 excludes gain permanently. Section 1031 defers it. That difference governs every planning decision in this chapter, and it means the two provisions are not alternatives of equal value. Where the exclusion is available it is worth more, because it eliminates tax rather than postponing it.
Reviewed by Nicholas A. Henault, Esq. on October 23, 2026. This reference is general information about section 1031, not tax or legal advice for your transaction. Talk to your own tax adviser or attorney before you rely on it.
Prepared by the BlueLion 1031 exchange team
The provisions nonetheless meet constantly, because a single property can satisfy both over time or in parts, and because a great deal of residential real estate in Maryland moves between personal and rental use over a long holding period.
43.1 The two regimes and why they meet
Gross income does not include gain from the sale or exchange of property if, during the five year period ending on the date of the sale or exchange, the property has been owned and used by the taxpayer as the taxpayer's principal residence for periods aggregating two years or more.1 The exclusion is capped at $250,000, or $500,000 on a joint return where either spouse meets the ownership requirement, both meet the use requirement, and neither is ineligible.2
The qualifying use requirements of the two provisions are opposites. Section 121 requires use as a principal residence. Section 1031 requires holding for productive use in a trade or business or for investment. A property cannot be both at the same moment in the same part.
They intersect in two ways, and both matter in practice.
Sequentially. A property that was a residence may become a rental, and the reverse. This is the more common case and it is the subject of 43.2 and 43.4.
Simultaneously in parts. A property may contain a residence and a separate business or rental portion, and the two portions are analyzed separately.
The fact that makes the sequential case work is easy to miss in the statutory text and is stated expressly in the governing revenue procedure: section 121 does not require the property to be the taxpayer's principal residence on the date of the sale or exchange.3 It requires two years of ownership and use as a principal residence within the five year period ending on that date.
A taxpayer who lived in a house for two years, then rented it for up to nearly three, may still exclude gain on a disposition of it. And because the property is investment property at the time of the exchange, section 1031 is available at the same moment.4
That window is the single most valuable planning opportunity in this chapter, and it closes on a date that can be calculated to the day.
43.2 Applying both to one property
The Service supplied ordering rules for a transaction that satisfies both provisions, and they are more favorable to taxpayers than practitioners generally expect.5
The procedure applies only to taxpayers who satisfy the section 1031(a)(1) holding requirement with respect to both the relinquished business property and the replacement business property.6 The section 121 side does not rescue a property that fails Chapter 12.
Three rules govern the computation.
Section 121 is applied first. The exclusion is applied to gain realized before section 1031 is applied.7
Depreciation gain that section 121 cannot exclude may be deferred by section 1031. The exclusion does not apply to gain attributable to depreciation deductions for periods after May 6, 1997 claimed with respect to the business or investment portion of a residence,8 but section 1031 may apply to that gain.9
Boot is sheltered by the exclusion. In applying section 1031, cash or other non-like-kind property received in exchange for the relinquished business property is taken into account only to the extent the boot exceeds the gain excluded under section 121.10
Basis follows. In determining the basis of the replacement business property, gain excluded under section 121 is treated as gain recognized, so under section 1031(d) the basis is increased by the excluded gain.11
The worked example is worth following because every one of those rules operates in it.12
A taxpayer bought a house for $210,000 and used it as a principal residence from 2000 to 2004. From 2004 until 2006 the taxpayer rented it, claiming $20,000 of depreciation. In 2006 the taxpayer exchanged it for $10,000 of cash and a townhouse worth $460,000 intended for rental.
| Amount realized | $470,000 |
| Less adjusted basis | (190,000) |
| Realized gain | 280,000 |
| Less gain excluded under section 121 | (250,000) |
| Gain deferred under section 1031 | 30,000 |
The $30,000 deferred includes the $20,000 attributable to depreciation, which section 121 could not exclude. The $10,000 of cash produced no recognized gain, because boot counts only to the extent it exceeds the excluded gain. The basis in the replacement property is $430,000: the $190,000 relinquished basis, increased by the $250,000 of excluded gain, reduced by the $10,000 of cash received.
Three results in that example are worth stating separately because clients and preparers get each of them wrong.
The taxpayer was not living in the house at the time of the exchange and excluded $250,000 anyway.
The depreciation recapture exposure, which the exclusion cannot reach, was deferred rather than paid.
The taxpayer took $10,000 of cash out of the transaction and recognized nothing.
43.3 The five-year bar on exchanged property
The reverse plan, exchanging into a rental and later converting it to a residence, runs into an express statutory bar.
If a taxpayer acquires property in an exchange with respect to which gain is not recognized in whole or in part under section 1031(a) or (b), the section 121 exclusion does not apply to the sale or exchange of that property by the taxpayer, or by any person whose basis in the property is determined in whole or in part by reference to the taxpayer's basis, during the five year period beginning with the date of the acquisition.13
Four features of that sentence define the constraint.
The period runs from acquisition, not from conversion. A taxpayer who acquires replacement property in year zero, rents it, and moves in during year two must still wait until year five has run before any exclusion is available.
It is a bar on the exclusion, not a disqualification of the property. After five years the exclusion becomes available, subject to everything in 43.4.
It reaches transferees with a carryover or substituted basis. A gift to a child does not restart the clock, because the child's basis is determined by reference to the taxpayer's.
It applies where gain was not recognized in whole or in part. A partially taxable exchange still triggers it.
The five year bar and the two year residence requirement of section 121(a) are separate conditions, and both must be satisfied. A taxpayer who acquires replacement property, converts it after three years, and lives in it for two, has satisfied the residence requirement at the five year mark and reaches the exclusion at the same moment. That is the tightest the plan can be run, and it is not the end of the analysis.
43.4 Nonqualified use and the conversion plan
A second limitation, enacted separately, does the greater damage and is the one most often omitted from client presentations.
The exclusion does not apply to so much of the gain as is allocated to periods of nonqualified use.14 Gain is allocated to those periods based on the ratio of the aggregate periods of nonqualified use during the taxpayer's ownership to the total period of ownership.15
A period of nonqualified use means any period, other than the portion of any period preceding January 1, 2009, during which the property is not used as the principal residence of the taxpayer or the taxpayer's spouse or former spouse.16
The critical exception makes the rule asymmetric, and the asymmetry runs against the exchange planner. The term does not include any portion of the five year period described in section 121(a) which is after the last date the property is used as the principal residence of the taxpayer or the taxpayer's spouse.17
Rental use after the residence period, within the five year lookback, is therefore not nonqualified use. Rental use before the conversion is. The provision protects the taxpayer who moves out and rents, and penalizes the taxpayer who rents and then moves in.
That is precisely backwards from what the exchange-then-convert plan requires.
Two further provisions complete it. Temporary absences of up to two years in the aggregate for a change of employment, health conditions, or other unforeseen circumstances are not nonqualified use.18 And the nonqualified use allocation is applied after the depreciation rule, and without regard to gain to which that rule applies,19 so depreciation gain comes out of the computation first and is not part of the fraction.
Worked. A taxpayer acquires replacement property in a fully deferred exchange at the start of year zero with a $200,000 basis. The property is rented for three years, generating $30,000 of depreciation. At the start of year three the taxpayer converts it to a principal residence and lives there through the end of year six, then sells for $700,000.
The two year residence requirement is satisfied, since three of the last five years were residence use. The five year bar of 43.3 has run, since the sale is in year six. Adjusted basis is $170,000 and realized gain is $530,000.
The $30,000 of depreciation gain is excluded from the exclusion and comes out first, leaving $500,000. Nonqualified use is the three years of rental before the conversion, out of six years of ownership, or one half. So $250,000 is allocated to nonqualified use and is not excludable, and $250,000 is potentially excludable, subject to the dollar cap.
A single taxpayer excludes $250,000 of a $530,000 gain and recognizes $280,000. A client told that moving into a former rental for two years produces a tax free sale has been told something that is not true.
The counsel. The plan is legitimate and it works, at a materially lower value than clients expect, and the value depends on the ratio of rental years to total ownership years. The longer the property is held as a residence after conversion, the better the fraction becomes. That arithmetic should be run before the client changes their living arrangements around it.
43.5 Vacation homes and the dwelling unit safe harbor
The hardest qualifying use question in residential practice is the second home that is rented some of the time and used by the owner the rest. Chapter 12 supplies the general standard, and the facts are usually unhelpful.
The Service provided a safe harbor.20 It will not challenge whether a dwelling unit qualifies under section 1031 as property held for productive use in a trade or business or for investment if the qualifying use standards are met.
A dwelling unit for this purpose is real property improved with a house, apartment, condominium, or similar improvement that provides basic living accommodations including sleeping space, bathroom, and cooking facilities.21
Relinquished property. The dwelling unit must be owned by the taxpayer for at least twenty four months immediately before the exchange, and within that period, in each of the two twelve month periods immediately preceding the exchange, the taxpayer must rent it to another person at a fair rental for fourteen days or more, and the taxpayer's personal use must not exceed the greater of fourteen days or ten percent of the number of days during that twelve month period that it is rented at a fair rental.22
Replacement property. The mirror image. Owned for at least twenty four months immediately after the exchange, with the same rental floor and personal use ceiling satisfied in each of the two twelve month periods after it.23
Three definitional points. Personal use occurs on any day the taxpayer is deemed to have used the unit for personal purposes under section 280A(d)(2), taking into account section 280A(d)(3) but not section 280A(d)(4).24 Whether a unit is rented at a fair rental is determined on all the facts and circumstances existing when the rental agreement is entered into, taking all rights and obligations of the parties into account.25 And the twelve month periods are measured backward from the day before the exchange, and forward from the day after it.26
Four practical observations.
The personal use ceiling is tighter than it reads. It is the greater of fourteen days or ten percent of rental days, so a property rented one hundred days permits fourteen days of personal use, not ten. The ten percent prong only exceeds fourteen days once the property is rented more than one hundred forty days in the year.
Both twelve month periods must independently satisfy both tests. A property rented heavily one summer and left idle the next fails, and the failure cannot be cured by averaging.
The replacement property side cannot be confirmed when the return is filed. The Service addressed that directly: a taxpayer who reports an exchange based on the expectation that the replacement dwelling will meet the standards, and later determines that it does not, should file an amended return and not report the transaction as an exchange.27 That is an unusual instruction and it should be disclosed to the client at the outset, because the obligation arises two years after the return was filed.
The safe harbor addresses one question only. It applies solely to whether a dwelling unit qualifies as property held for productive use in a trade or business or for investment, and every other requirement of section 1031 must be independently satisfied.28
Failing the safe harbor is not fatal. It returns the taxpayer to the general standard of Chapter 12 with the burden of proof and without the comfort of a published position. For a Maryland shore property that the family uses three weeks a summer and rents the rest of the season, the safe harbor is usually attainable with planning that begins two years before the sale, and that is the conversation to have when the client first mentions selling.
Plain-language guides that use this chapter
Ready to start an exchange?
Call (410) 863-1555 or open your exchange file online.
