Mechanism 1: The §121 Primary Residence Exclusion
IRC §121 allows you to exclude up to $250,000 of gain on the sale of your principal residence (up to $500,000 for married filing jointly) from capital gains tax. This is the most widely used tax break in real estate.
Requirements
- Ownership test: You must have owned the property for at least 2 of the 5 years before the sale date.
- Use test: You must have used the property as your principal residence for at least 2 of the 5 years before the sale date. The 2-year ownership and use periods do not have to be the same 2 years.
- Frequency limit: You cannot have excluded gain from another home sale within the 2 years prior to the current sale.
Limitations
- The exclusion amount is fixed ($250K / $500K MFJ) — it is not indexed for inflation.
- Depreciation recapture is not excluded. If the home was rented at any point, the unrecaptured §1250 gain (depreciation taken while rented) is taxed at up to 25% even if you qualify for the §121 exclusion.
- Under the Housing Assistance Tax Act of 2008, gain attributable to "nonqualified use" (rental use after January 1, 2009) is not eligible for the exclusion — you must allocate the gain between qualified and nonqualified use periods.
- Partial exclusion may apply if you fail to meet the full 2-year test due to a change in employment, health, or unforeseen circumstances (Treas. Reg. §1.121-3).
Example
You purchased a home in 2019 for $400,000 and sold it in 2026 for $750,000 after $20,000 in improvements and $12,000 in selling costs. You lived there the entire time. Gain: $750,000 − $12,000 − $408,000 (adjusted basis) = $330,000. You file jointly. The first $330,000 of gain is excluded under §121 (below the $500,000 MFJ limit). Federal capital gains tax: $0.
Mechanism 2: The §1031 Like-Kind Exchange
IRC §1031 allows you to defer — not eliminate — capital gains tax on investment or business real property by rolling the proceeds into a "like-kind" replacement property through a qualified intermediary (QI).
Requirements
- Both the relinquished property (what you sell) and the replacement property must be held for investment or productive use in a trade or business — not personal use.
- Properties must be "like-kind" — for US real estate after the 2017 TCJA, all US real property is like-kind to all other US real property (residential, commercial, raw land, etc.).
- 45-day identification rule: You must identify potential replacement properties in writing to your QI within 45 days of closing on the relinquished property.
- 180-day closing rule: You must close on the replacement property within 180 days of the relinquished property closing.
- A qualified intermediary (QI) must hold the proceeds — you cannot receive the funds at any point.
- To defer all tax: replacement purchase price ≥ net sale price AND replacement debt ≥ relinquished debt (or make up the difference with cash).
What is deferred
A successful §1031 exchange defers your entire gain — both the unrecaptured §1250 depreciation recapture and the §1231 long-term capital gain. The deferred gain "survives" in a reduced adjusted basis on the replacement property. It becomes taxable when you sell the replacement without doing another exchange.
Mechanism 3: Qualified Opportunity Zones (QOZ)
Created by the Tax Cuts and Jobs Act of 2017 (IRC §1400Z-1 and §1400Z-2), Qualified Opportunity Zones offer three potential tax benefits for investors who reinvest capital gains into Qualified Opportunity Funds (QOFs):
The three benefits
- Deferral: Capital gains from any sale (not just real estate) can be deferred by investing in a QOF within 180 days. The deferred gain is recognized when the QOF investment is sold or exchanged, or by December 31, 2026, whichever is earlier.
- Reduction: If you held the QOF interest for at least 5 years before December 31, 2026, your deferred gain is reduced by 10%. If held for 7 years, reduced by 15%. (Due to the current December 31, 2026 recognition deadline, the 7-year benefit requires the QOF investment to have been made by December 31, 2019 — this window has largely closed.)
- Exclusion of QOF appreciation: If you hold the QOF investment for at least 10 years, any appreciation in the QOF investment itself (gains earned within the QOF, separate from the original deferred gain) is permanently excluded from federal capital gains tax.
Limitations
- You invest the gain, not the full proceeds — unlike a §1031 exchange which requires reinvesting all proceeds.
- The original deferred gain is recognized by December 31, 2026 at the latest (under current law).
- QOF investments carry real estate and business risk — the tax benefit is not worth investing in a bad deal.
- QOF regulations are complex; engage a qualified tax professional.
Mechanism 4: Step-Up in Basis at Death (IRC §1014)
Under IRC §1014, the basis of property acquired from a decedent is generally equal to the fair market value of the property at the date of death (or the alternate valuation date under IRC §2032, if elected). This "step-up" (or step-down if the property declined in value) means that all unrealized appreciation during the decedent's lifetime is permanently excluded from capital gains tax.
Example
Your parent purchased a rental property in 1985 for $120,000. They took $180,000 in MACRS depreciation over the years, reducing adjusted basis to −$60,000 (negative basis — unusual but can occur with high-depreciation properties). At death in 2026, the property is worth $950,000. The beneficiary's basis is $950,000. If the beneficiary sells immediately for $950,000, the capital gain is $0. The entire accumulated gain — including the depreciation recapture potential — is permanently eliminated.
Limitations
- The property must be included in the decedent's gross estate for federal estate tax purposes under IRC §2033.
- Property owned jointly with a non-spouse may receive only a partial step-up depending on state law and the form of ownership.
- The step-up does not apply to assets held in certain trusts (grantor trusts excluded from the estate, IRAs, 401(k)s, etc.).
- Gifted property does not receive a step-up — the donee takes the donor's basis (carryover basis under IRC §1015). Holding property until death and leaving it to heirs is generally more tax-efficient than gifting appreciated property during lifetime.
Which mechanism is right for you?
| Situation | Best mechanism |
|---|---|
| Selling your primary home, gain ≤ $500K MFJ | §121 exclusion (most straightforward) |
| Selling investment/rental property, plan to reinvest in real estate | §1031 like-kind exchange (defer all gain) |
| Selling investment property, want to exit real estate, willing to invest gain in QOZ | Qualified Opportunity Zone (defer + exclude QOF appreciation) |
| Long-hold investor planning estate | Step-up in basis at death (permanent exclusion) |
| Primary home with rental history | §121 for residential portion + §1031 for business portion (complex — seek advice) |
Frequently asked questions
How much capital gains can I exclude when selling my home?
Under IRC §121, you can exclude up to $250,000 of gain (single filers) or $500,000 (married filing jointly) when you sell your primary residence, provided you owned it and used it as your main home for at least 2 of the 5 years before the sale. Depreciation taken while the home was rented is not excluded — it remains subject to unrecaptured §1250 gain rules.
Does a 1031 exchange completely eliminate capital gains tax?
No — a §1031 exchange defers (not eliminates) capital gains tax. The gain and depreciation recapture potential are carried forward in a lower adjusted basis on the replacement property. If you eventually sell the replacement without doing another exchange, the deferred gain plus any new gain is recognized at that time. The tax is eliminated only if you hold the replacement until death and your heirs receive a stepped-up basis.
Can I combine a 1031 exchange with the §121 exclusion?
Yes, in limited circumstances. If a property was used as both a rental and a primary residence at different times, and you meet the §121 ownership and use tests, you may be able to apply the §121 exclusion to the residential-use portion of the gain and a §1031 exchange to the business-use portion. This is a complex area; consult a qualified tax professional before attempting to combine the two.
What is the step-up in basis at death?
Under IRC §1014, the basis of property inherited by a beneficiary is 'stepped up' (or stepped down) to the fair market value at the date of the owner's death. This means all unrealized appreciation during the owner's lifetime is never taxed — it disappears at death. For example, if your parent paid $200,000 for a rental and it is worth $800,000 at death, your inherited basis is $800,000. If you sell immediately for $800,000, you recognize zero gain.
What is a Qualified Opportunity Zone investment?
A Qualified Opportunity Zone (QOZ) is a designated low-income community census tract created under the Tax Cuts and Jobs Act of 2017 (IRC §1400Z-2). By investing capital gains proceeds into a Qualified Opportunity Fund (QOF) within 180 days of sale, you can defer the original gain until you sell the QOF interest or December 31, 2026 (whichever is earlier). If you hold the QOF investment for at least 10 years, any appreciation in the QOF itself is permanently excluded from capital gains tax.
Educational information and estimates only. Not tax advice. Tax rules change and vary by situation; consult a qualified tax professional before acting.
