guides

Tax Implications of Selling Your Home During Divorce: Capital Gains, the $500K Exclusion, and Timing

Selling the family home is often the single largest financial transaction in a divorce, and the tax treatment can swing the outcome by tens of thousands of dollars depending on one thing: timing. Sell a few weeks too late, and a married couple's $500,000 capital gains exclusion can shrink to a single person's $250,000 — potentially exposing $250,000 of gain to tax that would otherwise have been free. Move out at the wrong moment, and the spouse who left can lose the exclusion entirely.

This guide focuses specifically on the tax side of selling a home in divorce: how to calculate the gain, how the capital gains exclusion works and who qualifies, why the order of operations (sell vs. divorce vs. buyout) matters so much, and the traps — depreciation recapture, the net investment income tax, and carryover basis — that surprise people after the sale closes.

For the broader decision of whether to sell, buy out, or co-own, see Divorce and Real Estate. For how divorce affects the rest of your return, see Divorce and Taxes. This article zooms in on the home sale itself.

This article is for informational purposes only and does not constitute legal or tax advice. Tax rules are complex and fact-specific. Consult a CPA, Enrolled Agent, or Certified Divorce Financial Analyst (CDFA) for guidance on your situation.

First, Calculate the Gain — Not the Proceeds

A common mistake is to assume the "profit" on a home sale is the cash you walk away with. It isn't. The taxable gain is based on your adjusted basis, not your mortgage balance. You can owe little or no tax on a sale that nets you a huge check, or — rarely — owe tax even when the check is modest.

The formula has two parts:

Amount realized = sale price − selling expenses (real estate commissions, transfer taxes, title fees, attorney fees for the sale)

Adjusted basis = original purchase price + capital improvements − any depreciation previously claimed (for a home office or rental period) − prior casualty-loss deductions

Capital gain = amount realized − adjusted basis

The pieces people most often forget:

  • Capital improvements raise your basis and shrink your taxable gain. A new roof, an addition, a kitchen remodel, a finished basement, new HVAC, landscaping that adds value — all increase basis. Routine repairs and maintenance (painting, fixing a leak) do not. Over a long marriage, documented improvements can easily total $50,000–$150,000, which directly reduces taxable gain. This is one more reason to gather your home records — our document-gathering checklist covers what to pull together.
  • Selling costs reduce the amount realized. On a $600,000 sale, 8% in selling costs is $48,000 that never counts as gain.
  • The mortgage is irrelevant to the gain. Whether you owe $50,000 or $500,000 on the home has no effect on the taxable gain. It only affects the cash proceeds.

Worked example. A couple bought their home for $300,000, spent $80,000 on a documented addition and kitchen remodel, and sell for $760,000 with $60,000 in selling costs. Amount realized = $700,000. Adjusted basis = $380,000. Capital gain = $320,000 — far less than the $460,000 "profit" over the purchase price, and, as we'll see, potentially tax-free.

The Capital Gains Exclusion (IRC Section 121)

The reason most home sales generate no tax is the primary residence exclusion under Internal Revenue Code Section 121. It lets you exclude capital gain on the sale of your main home:

  • $250,000 of gain if you file Single
  • $500,000 of gain if you file Married Filing Jointly

To claim it, you generally must pass two tests during the five-year period ending on the date of sale:

  • Ownership test: you owned the home for at least 2 of the last 5 years
  • Use test: you used it as your principal residence for at least 2 of the last 5 years

The two-year periods don't have to be continuous, and you can't have used the exclusion on another home sale in the two years before this sale.

The catch for married couples claiming $500,000

To get the full $500,000 exclusion on a joint return:

  • Either spouse can satisfy the ownership test (only one needs to own), but
  • Both spouses must satisfy the use test (both must have lived there 2 of the last 5 years), and
  • Neither spouse used the exclusion in the prior two years.

If only one spouse meets the use test, the couple is generally limited to a $250,000 exclusion on the joint return. This matters when one spouse moved out years earlier.

Why Timing Is Everything: Sell Before or After the Divorce?

Your marital status on December 31 determines your filing status for the whole year (covered in depth in Divorce and Taxes). For a home sale, that single fact controls whether you get the $500,000 or the $250,000 exclusion.

Selling while still married (before the decree is final)

If you sell and can still file Married Filing Jointly for that tax year, you can claim the full $500,000 exclusion (assuming both spouses meet the use test). For a couple with a $320,000 gain like the example above, the entire gain is excluded — zero federal tax.

Selling after the divorce is final

Once divorced, each ex-spouse is a single filer with a $250,000 exclusion. If the home is sold and proceeds split, each former spouse reports their share of the gain and applies their own $250,000 exclusion — provided each independently meets the ownership and use tests.

In practice, two $250,000 exclusions ($500,000 combined) often produce the same result as one joint $500,000 exclusion — if both spouses still qualify. The problem arises when one spouse moved out long enough ago to fail the use test, or when the gain is lopsided. When the combined gain comfortably exceeds $500,000 (common in long-held homes in high-cost markets), the timing decision is worth real money, and you should model it with a tax professional before settling on a sale date.

The Out-Spouse Trap — and the Rule That Protects You

Here's the scenario that catches people: one spouse moves out while the divorce drags on, the home is sold two or three years later, and the spouse who left discovers they no longer "used the home as a principal residence for 2 of the last 5 years." Without relief, the departing (out-)spouse could lose their exclusion.

Two provisions prevent this:

The natural 3-year window

Because the test is 2 of the last 5 years, a spouse who moves out has roughly 3 years to sell and still satisfy the use test (5-year lookback − 2 years of required use = 3 years of allowed absence). This is where the often-misquoted "3-year rule" comes from — it's not a separate rule, just the math of the 2-of-5 test. Sell within about three years of moving out and the out-spouse typically still qualifies on their own.

The divorce special rule (Section 121(d)(3))

For deferred sales that run past three years, IRC Section 121(d)(3) provides specific divorce relief:

  • Ownership tacking: If the home is transferred to a spouse or ex-spouse under Section 1041 (a tax-free transfer incident to divorce), the recipient's ownership period includes the time the transferring spouse owned it. The receiving spouse doesn't restart the ownership clock.
  • Use by the ex-spouse counts: A taxpayer who still has an ownership interest is treated as using the home as a principal residence during any period their former spouse is granted use of it under a divorce or separation instrument. So if the decree says the custodial parent stays in the home until the youngest child graduates, the out-spouse who remains on title keeps satisfying the use test the whole time — even if they haven't set foot in the house for years.

The critical compliance point: this protection requires the occupancy to be specified in the divorce or separation instrument. An informal handshake arrangement may not qualify. If you're structuring a deferred sale, make sure the written agreement explicitly grants the occupying spouse use of the home — it's the difference between a protected exclusion and a surprise tax bill. The broader tradeoffs of leaving the home are covered in Moving Out During Divorce.

Buyout, Then Sell Later: The Carryover Basis Issue

When one spouse buys out the other and keeps the home, the buyout itself is tax-free under Section 1041 — no gain is triggered by the transfer. But it sets up a deferred tax problem for the spouse who keeps the house.

The retaining spouse takes the home with carryover basis — they inherit the original cost basis, not a stepped-up value. When they eventually sell as a single filer, they get only the $250,000 exclusion against the full accumulated gain.

Example. Home bought for $300,000, now worth $800,000. Spouse A buys out Spouse B and keeps the home with a $300,000 basis (plus any improvements). Years later, Spouse A sells for $820,000. Gain ≈ $520,000. As a single filer, Spouse A excludes $250,000 and owes capital gains tax on roughly $270,000. Had the couple sold together before the divorce, the full $500,000 joint exclusion would have wiped out most or all of that gain.

This is exactly why a dollar of home equity is not equal to a dollar of cash in a settlement. The spouse keeping the house is also keeping an embedded, deferred tax liability. Account for it when negotiating the buyout — our settlement negotiation guide and Divorce and Taxes explain why after-tax valuation is essential, and the settlement calculator guide shows how to model it.

The Partial Exclusion: When You Don't Meet the Full Two Years

What if you have to sell before living in the home for two full years? Normally you'd lose the exclusion — but divorce is one of the safe-harbor "unforeseen circumstances" the IRS recognizes (see IRS Publication 523 and Treas. Reg. 1.121-3). Divorce or legal separation lets you claim a prorated partial exclusion even if you fall short of the two-year tests.

The proration trips people up. The reduced exclusion is a fraction of the maximum exclusion amount ($250,000 / $500,000) — not a fraction of your gain. The fraction is the shorter of your ownership or use period (or time since your last exclusion) divided by two years (730 days).

Example. A single filer owned and used the home for 12 of the required 24 months before a divorce-driven sale. Their maximum exclusion is 12/24 × $250,000 = $125,000 — not 12/24 of the actual gain. If the gain is under $125,000, it's fully excluded anyway.

Three Traps That Survive the Exclusion

The Section 121 exclusion is generous, but it doesn't cover everything. Watch for these:

1. Depreciation recapture

If the home was ever used as a rental or had a depreciated home office, any depreciation claimed after May 6, 1997 cannot be excluded under Section 121. It's taxed as unrecaptured Section 1250 gain at a maximum federal rate of 25%, regardless of the exclusion. A spouse who ran a business from a home office and deducted depreciation will owe this even on an otherwise tax-free sale.

2. The 3.8% Net Investment Income Tax (NIIT)

Capital gain that exceeds your exclusion is investment income. If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), the taxable portion of your home gain can be hit with an additional 3.8% NIIT on top of regular capital gains rates. Excluded gain is not subject to NIIT — only the gain above your $250,000/$500,000 exclusion. For high-value homes in expensive markets, this surtax is easy to overlook.

3. State capital gains tax

Most states tax capital gains as ordinary income, and state rules don't always mirror the federal exclusion. A large taxable gain can carry a meaningful state tax bill even when the federal exclusion absorbs most of it. Check your state's rules and factor state tax into any timing decision.

Capital Gains Rates and Reporting (2026)

Long-term capital gains (on a home owned more than a year) are taxed at 0%, 15%, or 20% depending on taxable income. The $250,000/$500,000 exclusion amounts are not indexed to inflation and haven't changed since 1997 — which is why more long-held homes now generate taxable gain above the exclusion than in decades past.

Reporting the sale:

  • The closing agent typically issues Form 1099-S reporting the gross proceeds. The IRS gets a copy.
  • If your entire gain is excluded and you didn't receive a 1099-S, you generally don't have to report the sale.
  • If any gain is taxable, or you received a 1099-S, or you want to report an excluded sale for clarity, report it on Form 8949 and Schedule D.
  • If you sell while married and file jointly, the sale goes on the joint return. If sold after divorce, each ex-spouse reports their share.

Keep every record: the closing statements from both purchase and sale, receipts for capital improvements, and depreciation schedules. Basis documentation is what turns a "taxable" gain into a tax-free one, and the burden of proof is on you.

Checklist: Home-Sale Taxes in Divorce

  • Calculate adjusted basis: purchase price + documented improvements − depreciation taken
  • Gather receipts and records for every capital improvement (they reduce taxable gain)
  • Estimate the gain: amount realized (sale price − selling costs) − adjusted basis
  • Determine which exclusion applies: $500,000 (sell while MFJ) or $250,000 (sell after divorce)
  • Confirm both spouses meet the use test if claiming the $500,000 joint exclusion
  • Model selling before vs. after the decree if the combined gain may exceed $500,000
  • If one spouse moves out: plan to sell within ~3 years, or put the occupancy arrangement in the divorce decree to preserve the out-spouse's exclusion
  • For a buyout: account for carryover basis and the future $250,000 single-filer cap as deferred tax
  • Check for depreciation recapture (any past rental or home-office use)
  • Check whether the 3.8% NIIT applies to gain above the exclusion
  • Factor in state capital gains tax
  • Keep all 1099-S, closing, and improvement documents for your return

Browse all of our divorce guides and checklists for more resources.

Take the Next Step

The home sale is usually the biggest taxable event in a divorce — and the one where timing and after-tax math matter most. Divorce Navigator helps you model settlement scenarios with after-tax valuations, compare keeping vs. selling, organize the basis and improvement records that lower your taxable gain, and prepare for conversations with your CPA and attorney — all in one private, secure place.

Get started for free →

Take the Next Step

Divorce Navigator helps you organize documents, model settlement scenarios, and prepare for professional consultations — all in one private, secure space.

Get Started Free

This information is for educational purposes only and does not constitute legal advice. Laws change frequently. Consult a licensed attorney in your jurisdiction for guidance specific to your situation.