7 min read ยท Last updated October 30, 2026
- Up to $250,000 of profit per owner, or $500,000 on a joint return, is excluded from capital gains tax under the Internal Revenue Code (IRC) Section 121, if you meet a two-year ownership-and-use test.
- A spouse who moved out can still pass the use test if the divorce or separation agreement states the other spouse has use of the home, under IRC Section 121(d)(3)(B).
- A home transferred to one spouse “incident to divorce” carries no immediate tax under IRC Section 1041, but the receiving spouse inherits the original purchase price as their basis, not a reset value.
- Sale proceeds in a divorce typically sit in a neutral escrow account, held by the closing attorney or title company, until the decree or a separate court order specifies how the $170,000 (or any) gain is divided.
In this article
- Who has to agree to sell the house
- How capital gains tax works when you’re selling the house in a divorce
- The two-year use test, and the rule that can save it
- What a transfer “incident to divorce” does to your tax basis
- Where the sale proceeds go until the decree is final
- Frequently asked questions
Selling the house during a divorce can trigger capital gains tax, but most sellers never actually owe it. The Internal Revenue Service (IRS) excludes up to $250,000 of profit per owner, or $500,000 on a joint return, if you pass a two-year ownership-and-use test.
Who Has to Agree to Sell the House
If both spouses are named on the deed, both signatures are required to transfer clear title. A buyer’s title company will not close a sale missing either owner’s signature, no matter what the divorce case itself says about who “gets” the house.
A judge can override this with a court order authorizing one spouse to sign alone, usually when the other is unreachable, has already agreed to the sale in writing but is stalling, or is found to be acting in bad faith. Absent that order, one spouse cannot force the sale by signing alone. If the case is still open and neither of you has moved toward selling yet, who actually pays the mortgage while the house sits unsold is usually the more urgent question.
How Capital Gains Tax Works When You’re Selling the House in a Divorce
Say Soraya and her husband bought their house in 2016 for $240,000. Soraya moved out in 2023 when they separated, and the house finally sells in 2026 for $410,000. That’s a $170,000 gain, the sale price minus the original purchase price.
Soraya’s separation agreement, signed in 2023, included one line giving her husband “continued use of the home” while the divorce was pending. That single clause matters more than the sale price does.
The Two-Year Use Test, and the Rule That Can Save It
To claim the exclusion, 26 U.S. Code Section 121 requires the seller to have owned and used the home as a main residence for at least two of the five years before the sale. On its own, a spouse who moved out in 2023 and sells in 2026 has been gone three years, long enough to fail that use test individually.
But the same statute has an exception built for exactly this situation. Under IRC Section 121(d)(3)(B), a spouse is treated as using the home as a principal residence during any period their spouse or former spouse is granted use of it under a divorce or separation instrument. IRS Publication 523 confirms the same rule in plain terms for separated or divorced taxpayers who are a sole or joint owner and whose spouse lives in the home under that kind of agreement.
Because Soraya’s separation agreement granted her husband use of the house, the years she was gone still count toward her own two-year clock. If the gain splits evenly between them, each owns $85,000 of the $170,000 total, well under either spouse’s own $250,000 cap. Both portions are excluded, and neither owes capital gains tax on the sale.
Had the agreement said nothing about who got to use the house, Soraya’s personal use clock would have stopped the day she left in 2023. By the 2026 sale, three years would have passed with no credited use. She would fail her own test, and her $85,000 share of the gain would get no exclusion at all, taxed at her capital gains rate, even though her husband’s $85,000 share still qualifies.
Filing a joint return instead of separately would not have changed that outcome here. The $500,000 joint-filer ceiling only helps when the gain itself is large. At $170,000 total, the real risk in this case was always the use test, not the dollar cap.
What a Transfer “Incident to Divorce” Does to Your Tax Basis
A different rule applies when one spouse simply signs the house over to the other instead of selling it to a third party. Under 26 U.S. Code Section 1041, no gain or loss is recognized on a transfer of property between spouses, or to a former spouse, as long as the transfer happens within one year of the divorce or is otherwise related to it.
That rule sounds like a tax-free reset. It isn’t. The statute treats the transfer as a gift, and the spouse who receives the house keeps the original owner’s purchase price as their own tax basis going forward.
If Soraya had transferred her half of the house to her husband instead of selling, his basis in that half would still trace back to the couple’s original $240,000 purchase price, not to the home’s value on the day of the transfer. Whatever gain has built up since 2016 is still sitting there, waiting for whoever eventually sells.

Where the Sale Proceeds Go Until the Decree Is Final
Most courts require net proceeds from a marital-home sale to sit in a neutral escrow account, usually held by the closing attorney or the title company, rather than being released to either spouse directly. The money stays there until the decree, or a separate court order, specifies how it gets divided. The exact mechanics vary by state and by case, so check what your own settlement agreement or judge’s order actually says before the closing date arrives.
Frequently asked questions
Does my ex and I both have to agree to sell the house?
If you’re both named on the deed, yes. Title companies won’t close a sale missing either owner’s signature. A judge can let one spouse sign alone with a court order, usually when the other is unreachable or already agreed in writing but is stalling.
What if I moved out years before the sale?
Moving out doesn’t automatically disqualify you from the capital gains exclusion. Under IRC Section 121(d)(3)(B), you’re still treated as using the home if your divorce or separation agreement grants your spouse use of it. Without that language, your personal two-year use clock keeps running from the day you left.
Do we get $500,000 or $250,000 if we’re still married when we sell?
$500,000 applies only on a joint tax return, and only if both spouses meet the ownership and use tests. Once you file separately, or the divorce is final, each of you is capped at $250,000 of your own share of the gain, not $250,000 on top of the other’s.
Does transferring the house to my ex avoid taxes?
Transferring a home “incident to divorce” under IRC Section 1041 creates no immediate tax. But it isn’t a reset. The spouse who keeps the house also keeps the original purchase price as their tax basis, which determines their own gain the day they eventually sell.
Where does the money go until the divorce is final?
Most courts require sale proceeds to sit in a neutral escrow account, usually held by the closing attorney or title company, until the decree specifies how they’re divided. Check your own settlement agreement or judge’s order, since the exact mechanics vary by state and by case.
Related reading: What happens to the mortgage in the 90 days after filing, how joint debt survives the decree, and how the first alimony payment gets taxed cover the other money questions that come up around the same time as a home sale.





Leave a Reply