← All articles
🏑

Selling the Family Home After Divorce: Who Gets the Exclusion?

πŸ”§ Maintenance & Repairs August 13, 2026 Β· 6 min read home sale exclusion divorce and home sale section 121 exclusion capital gains tax selling after divorce primary residence sale real estate tax rules
TL;DR: A single filer can exclude up to $250,000 of capital gain on a home sale; married filing jointly can exclude $500,000 β€” but only if both spouses meet the IRS's 2-out-of-5-year ownership and use test. Selling the house before the divorce is final, while still filing jointly, usually protects the full $500,000; selling after, each ex-spouse can typically claim $250,000 on their own share if they still meet the test.

_Last reviewed: August 2026 Β· 7 min read_

Nobody wants to think about capital gains tax while they're also splitting up a household, but the timing of the sale can cost or save you tens of thousands of dollars. The IRS doesn't care about your custody schedule β€” it cares about whose name is on the deed and who lived in the house, and when.

Okoniq Property Hub keeps a running record of ownership dates, occupancy, and repairs for a property, which is exactly the kind of documentation a CPA or attorney will ask for when sorting out who qualifies for the exclusion.

How much of the gain can actually be excluded?

Under Section 121 of the tax code, a single homeowner can exclude up to $250,000 of gain from the sale of a primary residence, and a married couple filing jointly can exclude up to $500,000. The catch is the ownership-and-use test: you must have owned and lived in the home as your main residence for at least 2 of the 5 years before the sale.

For a divorcing couple, this test gets complicated fast. If one spouse moved out three years ago and the divorce just finalized this year, that spouse may no longer meet the "use" requirement on their own β€” unless a special divorce rule applies (more on that below). This is also the moment to think honestly about the property's condition. A home that's sat with one owner managing it alone often has deferred items β€” check for foundation cracks that are serious or signs the roof is aging faster than it should before you list, since buyers' inspectors will find them anyway.

Does it matter if you sell before or after the divorce is final?

Yes, and it's often the single biggest factor. If the sale closes while you're still legally married and file a joint return for that year, you can claim the full $500,000 exclusion as long as at least one spouse meets the ownership test and both meet the use test. That's a $250,000 bigger shield than filing separately.

If the sale happens after the divorce is finalized, each ex-spouse files individually and can only claim up to $250,000 against their own share of the gain β€” assuming they meet the 2-of-5-year test themselves. Many couples time the closing deliberately, selling a few weeks before the decree is signed specifically to lock in the joint exclusion. This is a conversation for your attorney and CPA together, not something to decide unilaterally.

What happens if one spouse moved out years before the sale?

There's a specific carve-out for this exact situation. Under IRC Section 121(d)(3)(B), if a divorce or separation agreement gives one spouse the right to live in the home, the other spouse β€” the one who moved out β€” can count the occupying spouse's use toward their own use test. In plain terms: if your ex stayed in the house under the settlement and you moved out, you can still qualify for your $250,000 exclusion when the home eventually sells, even though you haven't lived there in years.

This only works if the divorce or separation instrument explicitly addresses occupancy. A verbal agreement or an informal arrangement won't hold up if the IRS asks. Get it in writing in the decree.

| Scenario | Who can claim what | |---|---| | Sale closes before divorce is final, joint return filed | Up to $500,000 combined | | Sale closes after divorce, each spouse meets 2-of-5-year test independently | Up to $250,000 each | | One spouse moved out, decree grants other spouse occupancy | Departed spouse can still count toward $250,000 exclusion | | One spouse keeps the house in the settlement, sells years later alone | Only that spouse's $250,000 applies; no gain shifts to the ex |

What if one spouse buys out the other instead of selling?

Then the exclusion question is moot for now, but it resurfaces later. A buyout isn't a taxable sale between spouses β€” transfers of property incident to divorce are generally tax-free under Section 1041. The spouse who keeps the house inherits the original cost basis, which matters enormously when they eventually sell.

If you're the one keeping the house, start tracking capital improvements immediately, since they raise your basis and shrink your future taxable gain. This is also a good time to get the property genuinely current β€” old electrical panels, missing GFCI protection, or knob-and-tube wiring are the kind of things that show up on a future buyer's inspection report and are cheaper to address now. Worth a look at whether you have 100 or 200 amp service if you're planning renovations, and whether outdated 2-prong outlets need upgrading before a future sale.

Should you make any repairs or upgrades before listing?

It depends on what the home actually needs, but a few categories consistently affect both sale price and negotiating leverage. Buyers and their inspectors focus heavily on structural and safety items, so it's worth doing a walk-through with an eye toward what an appraiser will flag.

If you're now living alone in the house post-divorce, this is also a practical moment to reassess basic home security, since security upgrades under $100 can matter for both safety and buyer appeal if you're staying a while before listing.

FAQ

Can both ex-spouses claim the $250,000 exclusion on the same house?

Yes, if the home is jointly owned and sold after the divorce, and each ex-spouse independently meets the 2-out-of-5-year ownership and use test, each can exclude up to $250,000 of their own share of the gain β€” up to $500,000 combined even though you're now filing separately.

What if the divorce decree doesn't mention who gets to live in the house?

Without a written occupancy provision, the spouse who moved out risks failing the "use" test if it's been more than 3 years since they lived there, since the 2-of-5-year clock keeps running. Get occupancy terms written into the decree explicitly if a future sale is expected.

Does refinancing the mortgage into one spouse's name affect the exclusion?

No, refinancing alone doesn't change exclusion eligibility. What matters for Section 121 is ownership on the deed and time spent living in the home, not whose name is on the loan.

Is there a deadline for selling after divorce to still qualify?

There's no hard deadline tied to the divorce itself, but the 2-of-5-year use test is always measured backward from the closing date. A spouse who moved out needs either continued qualifying use under the divorce-decree carve-out or a sale within roughly 3 years of moving out to still meet the test on their own.

Do capital improvements made during the marriage still count toward basis after divorce?

Yes. Whoever ends up owning the home keeps the full adjusted basis, including improvements made while married, regardless of who paid for them or whose name was on the receipts. Keep the records β€” a CPA will need them at sale time.


This is educational information, not tax or legal advice. Consult a CPA about your specific capital gains exposure and a divorce attorney about how your decree should address home occupancy and sale timing.

Get seasonal maintenance tips by email

Gutter-cleaning, filter-changing, before-it's-a-$3,000-problem guides. No schedule, no spam β€” unsubscribe anytime.

Prefer to dive in? Get started free β†’