Section 121 Home Sale Exclusion: Tests, Limits, and Recapture

The Section 121 home sale exclusion lets you keep up to $250,000 of profit from the sale of your main home tax-free, or up to $500,000 if you’re married and file jointly. To qualify, you must have owned the home and lived in it as your principal residence for at least two of the five years before the sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The rule is straightforward on its face, but joint returns, rental periods, depreciation, and early sales all change how much of your gain actually escapes tax.

The Ownership and Use Tests

Two separate requirements have to be met, and both look at the five-year window ending on the sale date.

The ownership test asks whether you held legal title to the property for at least 730 days during that five-year window. The 24 months do not have to run consecutively. Ownership begins on the date shown on your deed or closing documents, not the day you moved in.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

The use test asks whether you lived in the home as your principal residence for at least two of those same five years. Short absences for vacation or seasonal travel do not break your use period. If you own more than one home, the IRS treats the one where you spend most of your time as your principal residence, and looks at practical indicators: your work location, voter registration, driver’s license address, and the address on your federal returns.2Internal Revenue Service. Publication 523 (2025), Selling Your Home Consistency across records matters more than any single document.

The two tests are independent. You can meet the ownership test without meeting the use test, or vice versa, and failing either one takes the full exclusion off the table.

How Joint Filers Reach the $500,000 Exclusion

Married couples filing jointly qualify for the higher $500,000 exclusion only when three conditions are all satisfied: at least one spouse meets the ownership test, both spouses individually meet the use test, and neither spouse has used the exclusion on another home sale within the prior two years.3Internal Revenue Service. Topic No. 701, Sale of Your Home Miss any one of the three and the $500,000 figure is gone.

Failing to hit $500,000 does not mean the couple gets nothing. Each spouse is then evaluated separately, and the exclusion on the joint return equals the sum of what each spouse would receive filing as unmarried.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence So a couple where only one spouse qualifies can still exclude $250,000.

Partial Exclusion When You Sell Before Two Years

You can still claim a prorated exclusion if you sell early because of a qualifying life event. The IRS recognizes three categories:

  • A job change where the new workplace is at least 50 miles farther from the home than your old workplace was.
  • Health reasons, when a physician recommends the move to treat, mitigate, or diagnose an illness or condition affecting you or a family member.
  • Unforeseen circumstances, including divorce or legal separation, death of a household member, eligibility for unemployment compensation, a change in employment that makes basic living expenses unaffordable, damage from a disaster or act of terrorism, or multiple births from a single pregnancy.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

The math is a simple ratio. Take the shorter of your ownership period or your use period, divide by 24 months (or 730 days), and multiply by $250,000 (or $500,000 on a qualifying joint return).2Internal Revenue Service. Publication 523 (2025), Selling Your Home Twelve months of use, for example, gets you half: $125,000 as a single filer or $250,000 on a joint return. Keep documentation of the qualifying event, because the IRS can ask for proof.

The Once-Every-Two-Years Limit

You cannot use the Section 121 exclusion more than once in any two-year period. If you excluded gain on any home sale during the two years ending on the date of your current sale, the exclusion is unavailable, and even a partial exclusion on a prior sale counts.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The clock runs sale-date to sale-date, not tax year to tax year. A December sale followed by a January sale violates the rule even though they fall in different filing years.

The one way around the limit is the partial exclusion for job, health, or unforeseen circumstances. Those qualifying events can override the two-year waiting period.3Internal Revenue Service. Topic No. 701, Sale of Your Home

If the Home Was Ever a Rental or Business Property

Time you spent using the home for something other than your principal residence can carve away part of your exclusion, and any depreciation you claimed (or could have claimed) is separately taxable.

Nonqualified Use

Under rules that took effect in 2009, gain is allocated to “periods of nonqualified use.” Divide the total time the home was not your principal residence by your total ownership period, then multiply by the gain. That portion cannot be excluded.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Several exceptions soften the rule:

  • Any period after you stop living in the home but before you sell it (within the five-year window) is not treated as nonqualified use.
  • Up to ten years of qualified official extended duty as a service member are excluded from the calculation.
  • Up to two total years of absence for job change, health reasons, or other unforeseen circumstances do not count as nonqualified use.
  • Any period before January 1, 2009, is excluded from the calculation regardless of how the home was used.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

The order of use matters. Converting a rental into your primary home and then living in it for two years still leaves the rental years as nonqualified use. But if you lived in the home first and then rented it out, the vacancy exception generally protects that later period as long as you sell within five years of moving out.

Depreciation Recapture

Even when your gain qualifies for the exclusion, you cannot exclude the portion equal to depreciation deductions you claimed, or were entitled to claim, after May 6, 1997. This applies whether the depreciation came from renting out the whole house, renting a room, or taking a home office deduction.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

Recaptured depreciation is taxed as unrecaptured Section 1250 gain at a maximum rate of 25%.4eCFR. 26 CFR 1.453-12 – Allocation of Unrecaptured Section 1250 Gain Reported on the Installment Method The phrase “allowed or allowable” is where people get caught: you owe the recapture tax on depreciation you could have taken, even if you never actually claimed it. Skipping the deduction on your rental returns does not spare you at sale time.

Special Situations

Several rules extend or modify the basic tests for particular circumstances.

Military and Foreign Service. Members of the uniformed services, Foreign Service, intelligence community, and Peace Corps can elect to suspend the five-year look-back period for up to ten years while on qualified official extended duty, stretching the effective window to 15 years. You must be stationed at least 50 miles from your home or living in government quarters under orders.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

Disability. If you become physically or mentally unable to care for yourself, any time you spend in a state-licensed care facility counts toward the two-year use requirement, as long as you owned and lived in the home for at least one year during the five years before the sale.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

Surviving spouses. When a spouse dies, the survivor can count the deceased spouse’s ownership and use periods toward the two-year tests, and may still qualify for the full $500,000 exclusion if the home is sold within two years of death. The surviving spouse must not have remarried before the sale date, and neither spouse can have claimed the exclusion on a different home within the prior two years.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

Divorce. If you receive the home from a spouse or former spouse in a divorce or separation transfer, your ownership period includes their prior ownership. And when a divorce decree grants your former spouse exclusive use of the home, that time counts toward your use requirement even though you were not physically living there.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Inherited property. If you inherited the home, your ownership period includes the time the deceased owner held it.2Internal Revenue Service. Publication 523 (2025), Selling Your Home

Figuring Your Gain and Reporting the Sale

Your taxable gain is not the sale price minus what you paid. Start with the purchase price, add qualifying settlement costs at purchase and the cost of capital improvements over the years, then subtract selling expenses like real estate commissions and legal fees.5Internal Revenue Service. Basis of Assets (Publication 551)2Internal Revenue Service. Publication 523 (2025), Selling Your Home Capital improvements are permanent additions and upgrades that add value or extend the home’s life, like a new roof, an added room, or replacement plumbing. Routine repairs and maintenance don’t count.

If your gain is fully covered by the exclusion and you did not receive a Form 1099-S from the settlement agent, you generally do not need to report the sale. Reporting is required in two situations: when your gain exceeds the exclusion, or when you receive a Form 1099-S regardless of whether the gain is taxable.6Internal Revenue Service. About Form 1099-S You report the sale on Form 8949 and carry the result to Schedule D of Form 1040.

Two Boundaries Worth Knowing

A loss on the sale of your primary residence is not deductible. The IRS treats your home as personal-use property, so unlike investment real estate the loss cannot offset other income or feed the annual capital loss deduction.7Internal Revenue Service. What if I Sell My Home for a Loss?

Section 121 is a federal rule. Many states conform to the federal exclusion amounts, but some tax capital gains at their own rates, and state rates on this kind of income range from 0% in states with no income tax to roughly 9% or higher in high-tax states. A gain that is fully excluded federally can still generate a state tax bill, so check your state’s rules before you count the profit as untaxed.