Dividing the Marital Home: Capital Gains Exclusion in Divorce

What Happens to the $250,000/$500,000 Home-Sale Exclusion When a Marriage Ends — and the Rule Most People Don't Know Exists

Part of Nauma's complete guide to Divorce & Financial Planning.

Selling a home at a gain can trigger capital gains tax — but IRC §121 lets most homeowners exclude a substantial amount of that gain from federal tax entirely: up to $250,000 for a single filer, $500,000 for a married couple filing jointly, provided the ownership and use tests are met. Divorce changes both the amount of exclusion available and, critically, who qualifies for it — and there's a specific, often-missed provision that protects a spouse who moved out during the process. (This page covers the federal tax exclusion itself; whether the home is characterized as marital property to begin with, and in what share, depends on whether the state follows community property or equitable distribution.)

The Two Tests, Briefly

To claim the exclusion, a seller generally must have owned the home for at least two of the five years before the sale (the ownership test) and used it as their principal residence for at least two of the five years before the sale (the use test). Meeting both tests as an individual qualifies for the $250,000 exclusion; meeting them jointly as a married couple filing a joint return qualifies for $500,000.

Selling While Still Married vs. Selling After the Divorce

If the home is sold before the divorce is finalized, and the couple still files jointly, the full $500,000 exclusion generally remains available, assuming both spouses meet the ownership and use tests.

If the home is sold after the divorce, the couple can no longer file jointly, and the $500,000 joint exclusion is gone. Each ex-spouse can potentially claim their own individual $250,000 exclusion against their share of the gain — but each must independently satisfy the ownership and use tests on their own. This is where the timing of a sale relative to the divorce becomes financially significant: waiting to sell can mean the difference between $500,000 and $250,000 of excluded gain, depending on how the ownership and use tests are met after the split.

The Rule That Protects a Departing Spouse

Here is the provision most people don't know about, and the one most likely to save real money if the divorce decree is drafted correctly: under IRC §121(d)(3)(B), if a divorce or separation instrument grants a spouse the right to continue living in the home, the spouse who moved out is still treated as using the property as their residence for as long as the other spouse continues to live there under that agreement — even though they haven't personally set foot in the house since they left.

In practical terms: if the divorce decree specifies that one spouse may remain in the home until it's sold, the departing spouse can "tack on" that continued occupancy to satisfy their own use test when the home is eventually sold — potentially years later. Without this provision explicitly stated in the decree, the departing spouse risks failing the use test on their own share of any future sale, since they may not have personally lived in the home for two of the preceding five years by the time it's sold.

A Worked Example

Consider a couple who owned their home jointly for over a decade. The divorce is finalized in 2024; the decree grants one spouse the right to remain in the home, and the couple agrees to sell the home and split proceeds once market conditions improve. The home is eventually sold in 2027 — three years after the divorce — at a $400,000 gain.

If the decree includes the §121(d)(3)(B) language, the departing spouse can count the other spouse's continued residence toward their own use test, and each spouse can potentially exclude $250,000 of their respective share of the gain — the full $400,000 gain, split evenly, falls entirely within the combined $500,000 of individual exclusions available. Without that language, the departing spouse — who hasn't lived in the home in three years — risks failing the use test entirely on their share, potentially owing capital gains tax on their full $200,000 portion of the gain. These figures are illustrative only.

The Buyout Scenario

If one spouse is awarded the home outright and buys out the other's interest, the transfer between spouses is generally tax-free under IRC §1041 (transfers incident to divorce). The receiving spouse inherits the original cost basis in the home — not a "stepped-up" basis reflecting current value — meaning all appreciation that occurred during the marriage remains embedded as unrealized gain that becomes taxable whenever the keeping spouse eventually sells. When that later sale happens, only the keeping spouse's own $250,000 individual exclusion applies (assuming they meet the ownership and use tests going forward), not the $500,000 that would have applied to a joint sale while married. See Cost Basis for how basis carryover works in more detail, and Capital Gains Taxes for how the taxable gain above the exclusion is actually taxed.

Partial Exclusion for a Forced Sale

If a sale happens before either spouse meets the full two-year ownership and use tests — for example, a divorce forces a faster sale than planned — a partial exclusion may still be available. Divorce is one of the IRS-recognized "unforeseen circumstances" that can qualify a seller for a prorated exclusion: the standard $250,000/$500,000 caps are reduced proportionally based on the fraction of the two-year period actually satisfied (months of qualifying ownership/use divided by 24).

California Note

California's high real estate values, particularly in the Bay Area and other major metros, mean the marital home is disproportionately likely to carry gains that meaningfully exceed the $250,000 individual exclusion, especially for homes purchased years or decades earlier. Because California taxes long-term capital gains as ordinary income at rates up to 13.3% (with no separate preferential capital gains rate at the state level), any gain above the applicable federal exclusion is taxed more heavily in California than in most other states — making the §121(d)(3)(B) continued-use provision, correct decree drafting, and careful timing of any home sale a higher-stakes decision for California divorcing couples than for those in states with lower or no capital gains tax. See Capital Gains Taxes for California's specific treatment of investment and property gains.


This article is for educational purposes only and does not constitute legal, tax, or financial advice. The tax treatment of a home sale in divorce depends on the specific language of the divorce decree and each spouse's individual facts. Always consult a qualified tax advisor before finalizing a divorce decree involving real estate, and ensure any agreement about continued occupancy is drafted with the §121(d)(3)(B) exclusion rule specifically in mind.

Frequently Asked Questions

It's far better to address this at the time of the decree, since retroactively modifying a finalized decree to add this language can be more difficult and costly than including it the first time. If a decree is silent and a sale is still years away, consult an attorney promptly about whether an amendment or clarifying order is possible before a use-test problem actually arises.
The exclusion generally turns on ownership (typically evidenced by title) and use, not on who is named on the mortgage. A spouse who is on title but not on the mortgage (or vice versa) should confirm their specific situation with a tax advisor, since mortgage responsibility and ownership for tax purposes are not the same thing.
Potentially, if you still file a joint tax return for that year and both meet the ownership and use tests. Filing status for the tax year of sale — not the couple's living arrangement — is generally what determines eligibility for the joint exclusion.
Yes — each spouse's eligibility for a partial exclusion under the "unforeseen circumstances" (divorce) provision is evaluated individually, based on how much of the two-year ownership and use period each spouse can independently establish, including any continued-use credit under §121(d)(3)(B) if applicable.

See How Nauma Models Your Post-Divorce Financial Plan

Nauma helps you see how selling or keeping the marital home fits into your full post-divorce financial picture, alongside your other accounts and goals.

Get Started for Free