The Section 121 Home Sale Exclusion: What Agents Should Know, and Where Opportunity Zones Fit
The Section 121 home sale exclusion for agents: the $250,000 and $500,000 limits, the 2-of-5-year tests, partial exclusions, and what to do with gain above it.
Most homeowners never owe tax when they sell, and the reason is Section 121. Knowing its rules lets you answer the most common seller question at the listing appointment, and spot the sellers who will owe tax before they’re surprised at closing. This guide covers the exclusion and what a seller can do with gain above it, including an Opportunity Zone fund.
It’s part of our series for agents. The hub is OZ talking points for your next listing appointment.
The rule in one paragraph
A seller can exclude up to $250,000 of gain on the sale of their main home, or $500,000 for most married couples filing jointly, if they owned the home and used it as their main home for at least two of the five years before the sale (IRC §121; IRS Publication 523). The two years don’t have to be continuous, and the ownership and use years don’t have to be the same years.
The tests, as a checklist
| Test | What the seller needs |
|---|---|
| Ownership | Owned the home at least 2 of the last 5 years |
| Use | Lived in it as a main home at least 2 of the last 5 years |
| Look-back | Didn’t exclude gain on another home sold in the last 2 years (§121(b)(3)) |
| $500,000 for a married couple | Either spouse meets ownership, both meet use, and neither used the exclusion in the last 2 years (§121(b)(2)) |
Special cases the CPA will check:
- Partial exclusion for a sale forced by a job change, health, or certain unforeseen circumstances (§121(c); Treas. Reg. §1.121-3).
- Surviving spouse: the $500,000 limit generally applies to a sale within two years after the spouse’s death (§121(b)(4)).
- Military and some government service: the five-year look-back can be suspended for up to 10 years (§121(d)(9)).
Where sellers lose part of the exclusion
- Depreciation. Gain equal to depreciation taken after May 6, 1997, such as for a home office or a rental period, isn’t excluded (§121(d)(6)).
- Rental before move-in. Periods after 2008 when the home wasn’t the main home, such as renting it out before moving in, can reduce the excluded share (§121(b)(5)). Periods after the seller moves out generally don’t count against them.
- A second home or land. The exclusion only covers the main home. See capital gains tax on a second home.
When the gain is bigger than the exclusion
Long-time owners in expensive markets often have gain above $250,000 or $500,000. The excess is long-term capital gain if the home was owned more than a year, and the 3.8% net investment income tax can apply for higher-income sellers (IRC §1411). The options:
- Pay the tax. Often the simplest answer for a modest excess.
- An Opportunity Zone fund. The seller can invest an amount equal to the eligible excess gain in a qualified opportunity fund within 180 days of closing and defer it (IRC §1400Z-2). For investments on or after January 1, 2027, the deferred gain is included after five years, less a 10% basis step-up (30% for a qualified rural fund), and the fund’s appreciation can be excluded after 10 years. See the Opportunity Zone tax benefits guide and the 180-day deadline calculator.
- A 1031 for a mixed-use home. A home that was also a rental or business property can sometimes combine §121 and §1031 (Rev. Proc. 2005-14). This needs a CPA and a qualified intermediary before closing.
An Opportunity Zone fund is a long-term, illiquid investment, and only the gain is invested, so the seller keeps their basis for the next home. Funds that say they’re open are in the Opportunity Zone funds directory.
What to ask at the listing appointment
- “How long have you owned the home, and how long have you lived here?”
- “Did you ever rent it out or claim a home office?”
- “Have you sold another home in the last two years?”
- “Do you know roughly what you paid, plus major improvements?” Basis records matter, especially for older purchases.
If the answers point to a large gain or a partial exclusion, suggest a CPA call before pricing. For the broader menu of options, see how to avoid capital gains tax on real estate.
Related reading
- Capital gains tax on investment property
- Capital gains on inherited property
- Buying a home in an Opportunity Zone
- OZ talking points for agents (series hub)
Sources: IRC §121; Treas. Reg. §1.121-3; IRS Publication 523; Rev. Proc. 2005-14; IRC §1411; IRC §1400Z-2.
Not tax advice.
Frequently asked questions
What is the Section 121 exclusion?
How often can a seller use the home sale exclusion?
Can a seller get a partial exclusion if they didn't live there two years?
What can a seller do with gain above the exclusion?
Does a surviving spouse keep the $500,000 exclusion?
Get the OZ 2.0 Investor Guide
One email when major OZ 2.0 events happen — Treasury guidance, state filings, rule changes. Unsubscribe anytime.
Tools: 180-day rule calculator · Opportunity Zone tax calculator · 1031 vs DST vs Opportunity Zone calculator · all Opportunity Zone tools