Section 121 Exclusion: Tests, Limits, and Proration

The Section 121 exclusion lets you keep up to $250,000 of profit from the sale of your principal residence out of federal income tax, 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 main home for at least two of the five years ending on the sale date. You don’t have to reinvest the money, and you don’t have to buy another home. The gain simply disappears from your return, up to the cap.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

That’s the headline. The details decide whether you get the full exclusion, a smaller one, or none at all.

The Ownership and Use Tests

Two separate tests apply, and both are measured against the five-year window ending on the day you sell. The ownership test asks whether you owned the home for at least 24 months during that window. The use test asks whether you lived in it as your principal residence for at least 24 months during that window.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Neither block of time has to be continuous, and the two don’t have to overlap. You can own a home for five years, live in it during year one and year three, and rent it out the rest of the time, and you still pass both tests. Someone who rents a place for two years, buys it, and then lives in it for two more years before selling also qualifies.2eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence

For a married couple to claim the full $500,000, at least one spouse must meet the ownership test, both spouses must individually meet the use test, and neither spouse can have used the exclusion on a different sale within the prior two years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

If you own more than one home, only your principal residence qualifies. The IRS looks at where you actually spend your time, then at supporting facts like the address on your tax returns, voter registration, driver’s license, car registration, and mail, along with proximity to your workplace and family.3Internal Revenue Service. Topic No. 701, Sale of Your Home

Figuring Your Gain

Your gain is what you net from the sale minus your adjusted basis. If that number is below the cap and you qualify, you owe nothing. If it’s above, the overage is taxable. Getting basis right is where most sellers trip up, because it isn’t just what you paid.4Internal Revenue Service. Publication 523, Selling Your Home

Start with the original purchase price plus closing costs like title insurance and recording fees. Add every capital improvement you’ve made: a new roof, a kitchen remodel, an added bathroom, central air, a deck, a fence. Routine repairs like patching drywall or fixing a leaky faucet don’t count.

Then subtract items that reduce basis:

  • Any depreciation you claimed, or could have claimed, on business or rental use of the home after May 6, 1997.
  • Casualty loss deductions you took for fire, flood, or storm damage.
  • Insurance reimbursements received for casualty losses.
  • Certain residential energy credits or subsidies that reimbursed you for improvements already in basis.
  • Mortgage points the seller paid on your behalf when you bought the home, in most cases.

A quick worked example. You bought a home for $300,000, spent $50,000 on a kitchen remodel and new windows, and claimed $15,000 in depreciation while renting a room. Your adjusted basis is $335,000. If you sell for $600,000 and pay $35,000 in selling costs, your amount realized is $565,000 and your gain is $230,000. A single filer in that spot excludes the whole thing.

The Two-Year Frequency Limit

You can only use Section 121 once in any two-year period. If you excluded gain on a different home sale within the two years ending on the current sale date, the exclusion isn’t available this time around.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Sold a home in March 2024 and claimed the exclusion? You can’t claim it again on another sale until after March 2026, even if you meet the ownership and use tests on the new property. The one escape is a prorated exclusion when the second sale is driven by a qualifying reason, covered next.

When You Can Still Qualify Early

Sellers who haven’t hit the full two years of ownership and use can still take a reduced exclusion if the sale was driven by one of three reasons: a change in employment, a health-related need, or an unforeseen circumstance.5eCFR. 26 CFR 1.121-3 – Reduced Maximum Exclusion for Taxpayers Failing to Meet Certain Requirements

Each category has a safe harbor. An employment change qualifies automatically if the new workplace is at least 50 miles farther from the home than the old one was. A health-related sale qualifies if a physician recommends the move for medical reasons. Unforeseen-circumstance safe harbors include involuntary conversion of the home (such as condemnation), natural disasters or acts of war that damage the residence, death of a resident or co-owner, job loss that triggers unemployment compensation, financial hardship from a change in employment that makes housing and basic living costs unaffordable, divorce or legal separation, and multiple births from a single pregnancy.

The Proration Formula

Multiply your maximum exclusion ($250,000 or $500,000) by a fraction. The numerator is the shorter of the time you owned the home or the time you used it as your principal residence during the five-year window. The denominator is 24 months.5eCFR. 26 CFR 1.121-3 – Reduced Maximum Exclusion for Taxpayers Failing to Meet Certain Requirements

A single filer who lived in a home for nine months before being transferred 200 miles away gets 9/24 of $250,000, or $93,750. On a $120,000 gain, $93,750 is excluded and $26,250 is taxable.

The same formula also unlocks a partial exclusion when a qualifying reason forces a sale inside the two-year frequency window. The numerator becomes the time elapsed since the prior sale.

Rental Periods and Non-Qualified Use

Any time after 2008 that the home was used for something other than your principal residence (as a rental, a vacation home, or an investment) is “non-qualified use,” and the gain allocated to it can’t be excluded. This closed off a strategy where someone would hold investment property for years, move in briefly, and wipe out the appreciation with Section 121.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

The math: divide months of non-qualified use by total months of ownership, then multiply by total gain. That piece is taxable no matter how much room you have under the cap. Only the remainder is eligible for exclusion.

Three exceptions narrow what counts:

  • Time after you move out, inside the five-year window, is not treated as non-qualified use. You can move out, rent for up to three years, and sell while still passing the two-of-five use test, and the rental period doesn’t eat into your exclusion.4Internal Revenue Service. Publication 523, Selling Your Home
  • Up to 10 years of qualified official extended duty for military and government service doesn’t count.
  • Up to two years of temporary absence for employment, health, or unforeseen circumstances doesn’t count.

Example: Rental First, Then Residence

Bought on January 1, 2018. Rented for 48 months. Moved in January 1, 2022. Sold January 1, 2024 for a $350,000 gain. Total ownership: 72 months.

The 48-month rental period is non-qualified use. The ratio is 48/72, so about $233,333 of the gain is immediately taxable. The remaining $116,667 is under the $250,000 single-filer cap and is excluded. Final taxable gain: $233,333.

Example: Residence First, Then Rental

Bought on January 1, 2019. Lived there three years. Moved out January 1, 2022 and rented until selling on January 1, 2024. Gain: $200,000.

The two years of rental fall after the last day of principal-residence use and inside the five-year window, so none of it is non-qualified use. The two-of-five tests are met. The full $200,000 is excluded. This ordering, residence first and rental after, is one of the most useful planning features in the statute.

Depreciation Recapture

Section 121 does not cover gain equal to depreciation you claimed, or were entitled to claim, after May 6, 1997. That amount is taxable even when the rest of your gain is fully excluded.4Internal Revenue Service. Publication 523, Selling Your Home

Recaptured depreciation is taxed as unrecaptured Section 1250 gain, at a maximum rate of 25%, higher than the long-term capital gains rates that apply to the rest of a home-sale profit.6Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Rent out your home for five years, claim $40,000 in depreciation, move back in for two years, and sell with a $200,000 gain: the $40,000 is taxable up to 25%, and the remaining $160,000 qualifies for exclusion. Sellers who forget about recapture often expect zero tax and get a bill.

Homes Acquired in a 1031 Exchange

If you took the home as replacement property in a Section 1031 like-kind exchange, you must own it for at least five full years before any Section 121 exclusion is available, regardless of when you moved in.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

That five-year hold sits on top of the standard two-year use test. Complete the exchange in 2021, move in during 2022, hit two years of use in 2024, and you still can’t claim the exclusion until 2026. Any time the property was used as a rental or investment before you moved in also counts as non-qualified use, reducing the excludable portion.

Divorce, Death, and Military Service

Several life events bend the standard tests.

Divorce or Separation

If you received the home from a spouse or former spouse in a transfer under Section 1041, you tack on their ownership time. You’re also treated as using the home as a principal residence during any period a former spouse lives there under a divorce or separation agreement.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

The spouse who moves out can still qualify when the home eventually sells, as long as the other spouse remains in it under the agreement.

Death of a Spouse

A surviving spouse who sells within two years of the date of death can claim the full $500,000 exclusion, provided the couple would have met the joint-return requirements right before the death. The survivor also picks up the deceased spouse’s ownership and use periods for the tests.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

Miss that two-year window and the exclusion drops to $250,000. A stepped-up basis on the deceased spouse’s share often reduces the gain further, but the window still matters in an appreciated market.

Military and Foreign Service

Members of the uniformed services, the Foreign Service, and intelligence community employees can elect to suspend the five-year lookback while on qualified official extended duty: ordered to a station at least 50 miles from the home, or living in government quarters under orders, for more than 90 days.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence

The suspension can stretch the window by up to 10 years, giving a potential 15-year period in which to meet the two-year ownership and use tests. A service member who lived in a home for two years, deployed for a decade, and then sold can still qualify for the full exclusion.

Rates on the Portion You Can’t Exclude

Gain above your cap, or gain disqualified by non-qualified use or depreciation recapture, is taxed as a capital gain. Homes held more than a year get long-term rates: 0%, 15%, or 20% depending on income. For 2026, the 0% bracket runs up to $49,450 of taxable income for single filers and $98,900 for joint filers; the 20% rate kicks in above $545,500 single or $613,700 joint, with the 15% rate between.

Higher-income sellers may also owe the 3.8% Net Investment Income Tax. Depreciation recapture is taxed at up to 25% regardless of bracket. Different pieces of the same gain can hit different rates, so run the math in layers.

When You Have to Report the Sale

Not every home sale lands on your tax return. If you pass both tests, your gain is fully excluded, and you didn’t receive a Form 1099-S from the closing agent, you don’t have to report it.4Internal Revenue Service. Publication 523, Selling Your Home

You do have to report when:

  • You have taxable gain above the exclusion or outside its reach.
  • You received a Form 1099-S. Even a fully excluded sale must then go on Form 8949 and Schedule D so the IRS can match the form it received.
  • You choose to pay tax on this gain rather than exclude it, usually because a bigger gain is coming on another sale within two years.

At closing, the settlement agent will typically ask you to sign a certification that you qualify for the exclusion. Sign it, and no 1099-S has to be issued. Don’t sign it, or let the certification slip past January 31 of the following year, and the agent files the form with the IRS. If the IRS gets a 1099-S and your return is silent, expect a notice.