Section 121 of the tax code is the reason most people who sell their house never think twice about capital gains tax. It lets an eligible seller exclude up to $250,000 of gain, or up to $500,000 for a married couple filing jointly, without the gain ever showing up as taxable income. The mechanics behind that exclusion, though, have more moving parts than the headline number suggests.
The Ownership and Use Tests
To qualify, a seller generally needs to have owned the home for at least two years and used it as their primary residence for at least two of the five years immediately before the sale. These two-year periods do not need to run concurrently or be continuous, so time spent living in the home in separate stretches can still add up to satisfy the test, as long as the total reaches two years within the five-year lookback window.
Why Married Couples Get Double the Exclusion
- Both spouses must meet the ownership test on the property
- At least one spouse must meet the use test
- Both spouses must not have used the exclusion on another home sale within the prior two years
- Filing jointly is generally required to claim the full $500,000 amount
A newly married couple where only one spouse owned the home before the marriage can still often qualify for the full amount, since ownership only needs to belong to one spouse while use requirements have some flexibility built in for the couple.
The Once-Every-Two-Years Limit
The exclusion generally cannot be claimed on more than one home sale within a two-year period, which matters for owners who sell one qualifying home and then quickly buy and sell another. There is no cap on how many times someone can use the exclusion across a lifetime, only on how frequently, which differs from some other tax provisions that cap total lifetime use.
Partial Exclusions for Sales That Do Not Meet the Full Test
A seller who has to move before hitting the two-year mark because of a job change, a health condition, or another qualifying unforeseen circumstance may still claim a reduced exclusion, calculated proportionally based on how much of the two-year period was actually met. This is not an automatic exception and generally requires the move to be genuinely connected to one of the recognized qualifying reasons, not simply a preference to relocate sooner.
What Falls Outside This Exclusion Entirely
Section 121 applies only to a primary residence, not to investment property, a second home used mainly for personal enjoyment, or business real estate. Depreciation claimed during any period the home was rented out is recaptured separately and is not covered by the exclusion. Owners looking to defer gain on property that does not qualify as a primary residence are generally looking at a Section 1031 exchange instead, a different mechanism entirely, built for investment and business property rather than a personal home.
The two provisions are not interchangeable and cannot be layered on the same square footage of a property for the same period of time, though a home with a documented history split between personal use and rental use can sometimes involve both, with the exclusion applying to the primary-residence years and an exchange evaluated separately for a converted rental period. Sorting that split correctly is detailed enough work that it belongs with a CPA well before a listing goes live, not as an afterthought at closing.
Common Questions
Do both spouses need to have lived in the home to claim the full $500,000?
No, only one spouse needs to meet the use test, though both generally need to meet the ownership test and neither can have used the exclusion on a different sale within the prior two years.
What counts as a qualifying unforeseen circumstance for a partial exclusion?
IRS guidance lists examples like a job relocation meeting distance requirements, a health condition requiring a move, divorce, multiple births from a single pregnancy, and certain natural disasters, among other specific situations, generally requiring documentation connecting the sale to the circumstance.
Can I claim the exclusion on a home I owned but never lived in?
No, the use test requires actual residence in the home as a primary residence for at least two of the five years before the sale. Ownership alone, without qualifying use, does not satisfy the requirement.
Does the exclusion apply to a mobile home or houseboat used as a primary residence?
It can, as long as the property genuinely functioned as the taxpayer's primary residence and meets the ownership and use tests, since Section 121 is not limited to traditional single-family homes.




