The section 121 exclusion is the provision of Internal Revenue Code section 121 under which gross income does not include gain from the sale of property that the taxpayer owned and used as a principal residence for periods aggregating two years or more during the five-year period ending on the date of sale. Section 121(b)(1) caps the excluded gain at $250,000. Section 121(b)(2)(A) substitutes $500,000 on a joint return where either spouse meets the ownership requirement, both spouses meet the use requirement, and neither is disqualified by a prior use of the exclusion. It is an exclusion rather than a deferral, so the excluded gain is never taxed and no replacement purchase is required. Anything above the limitation is capital gain taxed under the ordinary rules for the holding period.
Section 121 Exclusion
The section 121 exclusion keeps up to $250,000 of gain on the sale of a principal residence out of gross income, or $500,000 for a married couple filing jointly. It requires owning and using the home as a main residence for periods totaling two years within the five years before the sale, and it can be used repeatedly rather than once in a lifetime.
Quick Summary
- The two years of ownership and use do not have to be continuous. They are aggregate periods anywhere inside the five years ending on the sale date.
- The exclusion is available again and again, subject to one limit: not if you already used it on another sale within the previous two years.
- Failing the two-year test for a qualifying reason does not tax half your gain. It reduces the dollar limitation proportionally, which for most sales still covers the whole gain.
- Depreciation you were allowed or could have been allowed after May 6, 1997 is carved out of the exclusion whether or not you ever claimed it.
- The dollar amounts have never been indexed for inflation. They were set in 1997 and are unchanged.
Definition
Advanced Explanation
Ownership and use are two separate tests, and only one of them has to be met by each spouse. The five-year lookback ends on the sale date, and the two years inside it are aggregate, so a home lived in for eighteen months, rented out, and lived in again for six months qualifies. On a joint return section 121(b)(2)(A) needs only one spouse to have owned the home, but both to have used it. Where a couple cannot meet that combination, section 121(b)(2)(B) gives them the sum of the limitations each would have had separately, treating each spouse as owning the property for any period either of them owned it. So a couple where one spouse moved in recently is not pushed down to $250,000 automatically.
Repeatable, with one bar. Section 121(b)(3) makes the exclusion unavailable if, during the two-year period ending on the sale date, there was any other sale by the taxpayer to which the exclusion applied. Nothing limits the lifetime number of uses. Section 121(f) lets a taxpayer elect for the section not to apply to a particular sale, which is the mechanism for preserving eligibility when a larger gain is expected within the following two years.
The reduced exclusion pro-rates the limitation, not the gain, and this is the error that does real damage. Section 121(c) applies where the taxpayer fails the ownership and use tests, or is barred by the two-year rule, and the sale is by reason of a change in place of employment, health, or unforeseen circumstances as provided in regulations. In that case the ownership, use and two-year requirements do not apply, and instead "the dollar limitation under paragraph (1) or (2) of subsection (b), whichever is applicable, shall be equal to" the applicable limitation multiplied by the shorter of the qualifying period or the period since the last excluded sale, over two years. An owner who qualifies for half the period therefore has a $125,000 exclusion, not a liability on half their gain. On a gain smaller than $125,000 the result is no tax at all. The specific triggers in the regulations are safe harbors rather than the test, because a facts-and-circumstances primary-reason inquiry sits underneath them.
Depreciation is measured by what was allowable. Section 121(d)(6) provides that the exclusion does not apply to gain up to the amount of the depreciation adjustments, as defined in section 1250(b)(3), attributable to periods after May 6, 1997. Section 1250(b)(3) defines those adjustments as depreciation allowed or allowable, and Publication 523 puts the consequence in one sentence: "you can't exclude the portion of gain equal to any section 1250(b)(3) depreciation adjustments allowed or allowable after May 6, 1997." Someone who rented out a former home therefore has that slice of gain outside the exclusion even if they never claimed a deduction for it, and Publication 523 also directs that where no depreciation was deducted the basis is reduced "by the amount you could have deducted," so the gain is larger as well. That slice is taxed as unrecaptured section 1250 gain, which carries its own rate ceiling rather than the ordinary long-term rates.
One case that looks like it belongs here does not. A home office claimed under the simplified method generates no allowable depreciation at all: Revenue Procedure 2013-13 deems the depreciation deduction to be zero for a year the method is used, and the IRS states the result as "no depreciation deduction" and "no recapture of depreciation upon sale of home." The carve-out reaches a home office computed on actual expenses, which does require depreciation. Otherwise the measure really is what was allowable rather than what was claimed, subject to a records-based proviso letting a taxpayer prove a lower amount actually allowed, which is an escape hatch with a burden of proof rather than the default.
Nonqualified use is a separate carve-out with a helpful exception. Section 121(b)(5) allocates gain to periods of nonqualified use, which the statute measures from January 1, 2009 onward, during which the property was not the principal residence of the taxpayer or their spouse or former spouse, and excludes that allocated gain from the benefit. The exception most owners rely on without knowing it is in section 121(b)(5)(C)(ii)(I): any portion of the five-year period that falls after the last date the property was used as a principal residence is not nonqualified use. So moving out and renting the property before selling does not trigger the allocation, while renting first and moving in later does. Section 121(b)(5)(D) also sequences the two carve-outs, applying the depreciation rule first.
Three special rules worth knowing before they matter. A surviving spouse keeps the $500,000 limitation under section 121(b)(4) if the sale occurs no later than two years after the spouse's death and the joint-return conditions were met immediately before that date, which is a hard date rather than a taper. Section 121(d)(7) treats an owner who becomes physically or mentally incapable of self-care as using the home as a principal residence throughout any period they live in a licensed care facility, provided they met the use test for at least one year rather than two. And section 121(d)(10) bars the exclusion entirely for five years after acquiring the property in a like-kind exchange, so converting a former rental received in a 1031 exchange into a residence does not reach the exclusion quickly.
How to Remember
Two out of five, and the two do not have to be consecutive. Everything else is a carve-out: what you depreciated, what you rented before you moved in, and whether you already used it in the last two years.
Used in a Sentence
“Their gain came to $430,000, and because both had lived in the house for the last four years the section 121 exclusion covered all of it.”
How It Works
The calculation runs in a fixed order.
- Compute the gain: sale price less selling costs, less adjusted basis (purchase price plus capital improvements, less depreciation).
- Carve out depreciation allowed or allowable after May 6, 1997. That amount can never be excluded.
- Allocate any gain to periods of nonqualified use after 2008, ignoring any period after the last date the home was your principal residence.
- Determine the limitation: $250,000, or $500,000 on a qualifying joint return, reduced proportionally if section 121(c) applies.
- Exclude the remaining gain up to the limitation. Anything above it is capital gain.
A hypothetical example of the reduced exclusion, because this is where the common misstatement invents a tax bill. Priya bought a condominium, lived in it as her only home for twelve months, and then had to move for a new job. She sells with an $80,000 gain. She fails the two-year test, but the sale is by reason of a change in place of employment, so section 121(c) applies. Her qualifying period is twelve months out of twenty-four, so her dollar limitation is half of $250,000, which is $125,000. Her $80,000 gain is entirely below that, so none of it is taxable. The version people repeat, that half her gain becomes taxable, would have produced $40,000 of taxable gain and a bill she does not owe.
A second hypothetical showing the depreciation carve-out, which is the case where the exclusion stops being complete. Marcus is single. He lived in his house for four of the last five years, moved out, rented it for the final year, and sold it with a $180,000 gain. He never claimed depreciation for the rental year because he did not realize he could, and the amount allowable for that year was $9,000. Two things follow, and neither depends on what he claimed. Publication 523 instructs that if you did not deduct any depreciation you still "decrease your basis by the amount you could have deducted," which is already built into the $180,000. And section 121(d)(6) puts that same $9,000 outside the exclusion. The rental year is not nonqualified use, because it falls after the last date he used the home as his principal residence, so no further allocation applies. His remaining $171,000 of gain is well under his $250,000 limitation and is fully excluded, leaving exactly $9,000 of taxable gain, taxed as unrecaptured section 1250 gain. Had he assumed that claiming nothing meant losing nothing, he would have reported zero.
Pros and Cons
Pros
- One of the largest breaks available to an ordinary household, and it is an exclusion rather than a deferral, so the gain is never taxed at all.
- Reusable, with no lifetime cap and no requirement to buy a replacement home.
- The two years of use are aggregate rather than continuous, which accommodates a rental period in the middle.
- The reduced-exclusion rule is generous in practice, because pro-rating the limitation usually still covers the whole gain on a short-tenure sale.
Cons
- The dollar amounts were set in 1997 and have never been indexed, so long-tenured owners in expensive markets increasingly have taxable gain, and the problem worsens every year by design.
- Depreciation that was merely allowable reduces it, which catches the homeowner who rented out a former home and claimed nothing.
- A surviving spouse's $500,000 window closes exactly two years after the death, with no taper.
- Renting a property out before moving in creates a nonqualified-use allocation that no amount of later residence undoes.
- Records matter more than people expect. Improvements raise basis and reduce gain, and the receipts that decide it may be decades old.
People Also Asked
Answers to the most frequently asked questions.
How often can I use the home sale exclusion?
What happens if I lived in the home for less than two years?
I rented out my old house before selling. Does that cost me the exclusion?
Are the $250,000 and $500,000 amounts adjusted for inflation?
Do I have to report the sale if the whole gain is excluded?
Have a question a definition can't answer?
Advice-only advisors answer questions like this for a transparent flat fee — no products, no commissions, no asset management.
Find an Advisor