8.1 Sale of Principal Residence (Section 121), Like-Kind Exchanges (Section 1031) & Installment Sales (Form 6252)

Key Takeaways

  • Under IRC §121, taxpayers may exclude up to $250,000 ($500,000 for Married Filing Jointly) of capital gain realized on the sale of a principal residence if they satisfy the ownership and use tests for at least 2 of the 5 years preceding the sale date.
  • For the $500,000 MFJ exclusion, either spouse may satisfy the 2-year ownership test, but both spouses must satisfy the 2-year use test, and neither spouse can have claimed the exclusion within the preceding 2 years; partial exclusions are available for employment relocations (>50 miles), health reasons, or unforeseen circumstances.
  • Under IRC §1031, like-kind exchanges are strictly limited to real property held for productive use in a trade or business or for investment, requiring strict adherence to the 45-day identification and 180-day acquisition statutory deadlines; boot received triggers recognized gain.
  • On installment sales under IRC §453 (Form 6252), gain is recognized proportionally as principal payments are collected based on the gross profit percentage, but all depreciation recapture under §§1245 and 1250 must be recognized immediately in full in the year of sale.
  • The Wash Sale Rule (IRC §1091) disallows losses on stock sold and repurchased within a 61-day window (adding the loss to the replacement stock's basis), while Related Party Rules (IRC §267) disallow losses between specified family members and controlled entities, allowing loss offset only upon a subsequent profitable sale to an unrelated party.
Last updated: September 2026

Section 121: Principal Residence Gain Exclusion

Under IRC §121, an individual taxpayer may exclude from gross income up to $250,000 of realized capital gain from the sale or exchange of property if the property was owned and used as the taxpayer's principal residence for periods aggregating at least 2 years out of the 5-year period ending on the date of the sale.

The Married Filing Jointly $500,000 Exclusion

A married couple filing a joint return may exclude up to $500,000 of capital gain, but they must meet three precise statutory requirements under IRC §121(b)(2):

  1. Ownership Test: Either spouse meets the 2-out-of-5-year ownership requirement;
  2. Use Test: Both spouses meet the 2-out-of-5-year use requirement; and
  3. Frequency Test: Neither spouse claimed the Section 121 exclusion on the sale of another home within the 2-year period ending on the date of the current sale.
  • Failure of Joint Tests: If both spouses do not satisfy the use test or frequency test, the exclusion is calculated separately for each spouse as if they were single, with a maximum exclusion of $250,000 available to the qualifying spouse.

Special Surviving Spouse Rule (IRC §121(b)(4))

A surviving spouse who sells a principal residence within two years after the date of death of the deceased spouse is entitled to the full $500,000 exclusion, provided that the ownership and use tests were met immediately before death and the surviving spouse has not remarried at the time of sale.

Prorated / Partial Exclusion under IRC §121(c)

If a taxpayer fails to meet the 2-year ownership and use tests or the 1-sale-in-2-years rule, they may still claim a prorated partial exclusion if the primary reason for the sale is one of three statutory safe harbors:

  1. Change in Place of Employment: The taxpayer's new job location must be at least 50 miles farther from the home sold than the old job location was from the home sold (distance test).
  2. Health Reasons: To obtain, provide, or facilitate the diagnosis, cure, mitigation, or treatment of disease, illness, or injury of a qualified individual (taxpayer, spouse, co-owner, or dependent), or upon the specific recommendation of a physician.
  3. Unforeseen Circumstances: Events the taxpayer could not reasonably anticipate, including divorce or legal separation, death of a spouse or co-owner, natural disasters, involuntary conversion, unemployment, or multiple births resulting from the same pregnancy.

Partial Exclusion Limit=Maximum Statutory Exclusion ($250k / $500k)×(Shorter of: Qualifying Use Months OR Months Since Last Sale24 Months (or 730 Days))\text{Partial Exclusion Limit} = \text{Maximum Statutory Exclusion (\$250k / \$500k)} \times \left( \frac{\text{Shorter of: Qualifying Use Months OR Months Since Last Sale}}{24 \text{ Months (or 730 Days)}} \right)

Nonqualified Use and Depreciation Recapture

  • Nonqualified Use (IRC §121(b)(5)): For tax years after 2008, gain allocated to periods of nonqualified use (such as renting out the home or using it as a vacation home prior to converting it into a principal residence) cannot be excluded. The gain is allocated proportionally based on time.
    • Post-Use Safe Harbor: Periods of rental or nonqualified use that occur after the last date the home was used as a principal residence do NOT count as nonqualified use.
  • Depreciation Recapture: Any depreciation claimed (or allowable) on the home for periods after May 6, 1997 (e.g., for a home office or rental period) cannot be excluded under Section 121. Gain attributable to post-May 6, 1997 depreciation is taxed as unrecaptured Section 1250 gain at a maximum rate of 25%.

Section 1031 Like-Kind Exchanges

Under IRC §1031, no gain or loss is recognized if real property held for productive use in a trade or business or for investment is exchanged solely for like-kind real property that is also held for business or investment.

TCJA Restrictions & Disqualified Property

The Tax Cuts and Jobs Act (TCJA) permanently restricted Section 1031 strictly to real property. Personal property (machinery, vehicles, equipment, artwork) no longer qualifies. Furthermore, IRC §1031 explicitly excludes:

  • Personal residences and personal-use vacation homes;
  • Real estate held primarily for sale (inventory, dealer property, house flipping);
  • Stocks, bonds, notes, and debt instruments;
  • Partnership interests (general or limited);
  • Foreign real property exchanged for domestic real property (IRC §1031(h)).

Broad Real Estate Like-Kind Definition: Almost all domestic real estate is like-kind to other domestic real estate. A commercial office building can be exchanged for vacant investment farmland, an industrial warehouse, or a residential rental apartment building.

Strict Statutory Deadlines (Deferred / Starker Exchanges)

Most exchanges involve a Qualified Intermediary (QI) and must meet two absolute deadlines:

  1. 45-Day Identification Period: The replacement property must be formally identified in a written document signed by the taxpayer and delivered to the QI within 45 calendar days after the date the relinquished property is transferred. No extensions are permitted, even if the 45th day falls on a weekend or legal holiday.
  2. 180-Day Exchange Period: The replacement property must be acquired and received by the taxpayer by the earlier of:
    • 180 calendar days after the transfer of the relinquished property; OR
    • The due date (including extensions) of the taxpayer's federal income tax return for the year in which the transfer occurred.

Boot and Gain Recognition

  • Boot: Any non-like-kind property received in an exchange, including cash, net debt relief (relinquished mortgage exceeds replacement mortgage), or non-like-kind personal property.
  • Gain Recognition Rule: Realized gain is recognized up to the fair market value of boot received: Recognized Gain=Lesser of: Realized Gain OR Total Boot Received\text{Recognized Gain} = \text{Lesser of: Realized Gain OR Total Boot Received}
  • Loss Rule: Realized losses are never recognized in a Section 1031 exchange, even if boot is received.

Replacement Property Basis Formula

Basis of Replacement Property=Adjusted Basis of Relinquished Property+Cash / Boot Paid+Gain Recognized−Boot Received\text{Basis of Replacement Property} = \text{Adjusted Basis of Relinquished Property} + \text{Cash / Boot Paid} + \text{Gain Recognized} - \text{Boot Received}

Installment Sales: IRC §453 and Form 6252

An installment sale is a disposition of property where at least one payment is received after the close of the tax year in which the sale occurs.

Ineligible Transactions:

  • Dealer dispositions of personal property or real property held for sale to customers;
  • Inventory sales in the ordinary course of business;
  • Sales of publicly traded stocks or securities;
  • Losses: Losses can never be reported on the installment method; realized losses must be deducted in full in the year of sale.

Core Calculations on Form 6252:

  1. Gross Profit: Selling Price minus Adjusted Basis and Selling Expenses.
  2. Contract Price: Selling Price minus qualifying mortgages assumed by the buyer (to the extent the mortgage does not exceed the seller's adjusted basis).
  3. Gross Profit Percentage (GP%): Gross Profit Percentage=Gross ProfitContract Price\text{Gross Profit Percentage} = \frac{\text{Gross Profit}}{\text{Contract Price}}
  4. Annual Recognized Gain: Principal payments collected during the year multiplied by GP%.

Mandatory Year-of-Sale Depreciation Recapture (IRC §453(i))

The Most Critical Installment Sale Exam Trap: Any depreciation recapture under IRC §1245 (tangible personal property) or IRC §1250 (accelerated depreciation on real estate) must be recognized as ordinary income IN FULL in the year of sale, regardless of whether any cash or principal payments are received in that year!

  • The recaptured ordinary income is added to the property's adjusted basis to calculate the gross profit and GP% for subsequent principal installments.

Installment Sales to Related Parties (IRC §453(e), (f), and (g))

The outline specifically tests related-party installment sales, because a family sale on credit followed by a quick cash resale would otherwise defer the family's tax while the cash is already in hand.

  • Second-Disposition Rule (§453(e)): If the seller sells on the installment method to a related person (spouse, children, grandchildren, parents, and controlled entities) and the related buyer resells the property within 2 years of the first sale (marketable securities: at any time before the installment note is paid), the original seller must treat the amount the related buyer realizes as a payment received, accelerating the seller's deferred gain. The 2-year clock is suspended while the buyer's risk of loss is substantially diminished. Exceptions include resales after the death of either party, involuntary conversions, and dispositions shown to have no tax-avoidance purpose.
  • Depreciable Property (§453(g)): A sale of depreciable property to a related person (including an entity the seller controls) cannot use the installment method. All payments are treated as received in the year of sale, and the gain is ordinary under §1239, unless the seller shows that tax avoidance was not a principal purpose.
  • Recordkeeping for Form 6252: The form asks for the original cost, the date acquired, whether the buyer is related, and whether the related buyer resold the property. The seller keeps filing Form 6252 for the related-party sale in each of the two years after the sale, even in years with no payments.

Example: In 2024, Lena sells investment land with a $100,000 basis to her son for $400,000, taking a 10-year note with no down payment (GP% = 75%). In 2025, the son resells the land to an unrelated buyer for $420,000 cash. Lena is treated as receiving a $400,000 payment in 2025 (the lesser of the son's amount realized or her remaining contract price), so she recognizes her entire remaining $300,000 gain in 2025. Later payments from her son are then tax-free recoveries.

The Wash Sale Rule: IRC §1091

Under IRC §1091, a taxpayer cannot deduct a loss realized on the sale of stock or securities if the taxpayer acquires substantially identical stock or securities (or acquires a contract or option to acquire them) within a 61-day window:

  • 30 days before the date of sale;
  • The date of sale; and
  • 30 days after the date of sale.

Mechanics of Disallowed Loss:

  • Basis Addition: The disallowed loss is added to the cost basis of the newly acquired replacement shares. The loss deduction is deferred, not destroyed.
  • Holding Period Tacking: Under IRC §1223(4), the holding period of the original shares sold at a loss is tacked onto the holding period of the replacement shares.
  • IRA Wash Sale Trap (Rev. Rul. 2008-5): If a taxpayer sells stock at a loss in a taxable account and repurchases substantially identical stock inside an IRA or Roth IRA within 30 days, the loss is disallowed, AND the disallowed loss cannot be added to the IRA basis. The loss deduction is permanently destroyed.

Related Party Transactions: IRC §267

Under IRC §267(a)(1), no deduction is allowed for any loss realized on the direct or indirect sale or exchange of property between related persons.

Who is a Related Person under IRC §267(b)?

  • Family Members: Ancestors (parents, grandparents), lineal descendants (children, grandchildren), spouse, and brothers and sisters (whole or half-blood).
  • Controlled Entities: An individual and a corporation or partnership where the individual owns more than 50% in value of the outstanding stock or capital/profits interest (directly or constructively).
  • Statutory Exceptions (Exam Traps): In-laws (mother-in-law, son-in-law), aunts, uncles, nieces, nephews, cousins, and step-relatives are not related persons. Losses on sales to them are fully deductible.

Subsequent Sale Rule (IRC §267(d))

If a related buyer later sells the property at a gain to an unrelated third party, the gain is recognized only to the extent it exceeds the previously disallowed loss.

  • Unilateral Rule: The disallowed loss can only shelter subsequent gain; it can never create or increase a loss upon subsequent disposition.
Loading diagram...
Property Dispositions & Gain Deferral Mechanics
Test Your Knowledge

A single taxpayer purchased a home on January 1, 2024, and lived in it as his principal residence. On July 1, 2025 (18 months later), his employer transferred him to a new branch office 250 miles away. He sold the home on July 1, 2025, realizing a capital gain of $210,000. He had never previously claimed a home sale exclusion. What amount of gain can he exclude from gross income under IRC §121, and what is his taxable gain?

A
B
C
D
Test Your Knowledge

An investor transferred an apartment building held for investment with an adjusted basis of $300,000 (fair market value of $550,000) in a qualifying Section 1031 like-kind exchange for another commercial building with an FMV of $480,000 and received $70,000 in cash. What is the investor's realized gain, recognized gain, and adjusted tax basis in the replacement commercial building?

A
B
C
D
Test Your Knowledge

A father sells 500 shares of stock to his adult daughter for $12,000. The father's adjusted cost basis in the shares was $18,000, resulting in a $6,000 realized loss. Two years later, the daughter sells all 500 shares to an unrelated third party for $21,000. What is the father's recognized loss in the year of the initial sale, and what is the daughter's recognized gain on the subsequent sale?

A
B
C
D