Short answer: a spouse who moved out years ago can often still use the federal home-sale exclusion, up to $250,000 of gain, if they still own the home. Tax code section 121 treats the time a spouse or former spouse is allowed to live there under a divorce or separation instrument as the owner's own use. What counts as that instrument, the filing status on December 31, and how the house was used after the move are what a CPA or enrolled agent usually checks. California generally follows the same federal rule.
This guide goes deeper than Prop 19 and capital gains pointers, which gives the overview. It is general information, not tax or legal advice.
Why is moving out a tax question at all?
To exclude gain on a main home, a seller generally has to pass two tests in the 5 years before the sale:
| Test | What it asks | On a joint return |
|---|---|---|
| Ownership | Owned the home at least 24 months | One spouse is enough |
| Use | Lived there as a main home at least 24 months (730 days), not necessarily in a row | Each spouse, for the $500,000 limit |
| Look-back | No exclusion taken on another home sold in the prior 2 years | Applies to each |
A spouse who moved out but stayed on title usually still passes ownership. The use test is the problem. Someone who left more than 3 years before the sale has fewer than 24 months of use in the window. That is where the divorce rule comes in. For the decision to move out in the first place, see who stays in the house.
What does the divorce use rule say?
The statute, IRC section 121(d)(3)(B), says a person is treated as using the home as a main home "during any period of ownership while such individual's spouse or former spouse is granted use of the property under a divorce or separation instrument." IRS Publication 523 adds that the spouse living there has to use it as their main home.
Publication 523 lists three kinds of instrument:
- A decree of divorce or separate maintenance, or a written instrument incident to that decree
- A written separation agreement
- Another decree that requires a spouse to pay support
The gap before the paperwork. The rule follows the instrument, not the move. Time between moving out and the first written agreement or order may not count on its face. Whether a temporary order for exclusive use, or a stipulation signed before judgment, is a qualifying instrument is a question for the attorney and the CPA together. Guide 22 covers the same rule at the end of a deferred sale of home order.
What if the spouse who stayed got the house in the divorce?
A transfer between spouses, or to a former spouse because of the divorce, is generally not taxed (IRC 1041). IRS Publication 504 says the person receiving the home keeps the transferring spouse's tax basis, meaning the original cost plus improvements.
- The buyout itself is usually not a sale for exclusion purposes. Publication 523 says a spouse who transfers the home in a divorce settlement has no gain or loss to report.
- Later, when the keeping spouse sells, section 121(d)(3)(A) lets them count the time the other spouse owned it. They still have to meet the use test themselves.
For how a buyout is priced and financed, see keeping the house and qualifying alone.
$250,000 each or $500,000 together: why timing matters
Publication 504 says filing status depends on marital status on the last day of the tax year. A couple without a final decree by December 31 is still married for that year. An interlocutory decree is not a final one.
| Status in the sale year | General limit |
|---|---|
| Married filing jointly, both meet use, one meets ownership | $500,000 |
| Married filing jointly, only one spouse meets use | Sum of what each could exclude as a single person |
| Married filing separately, single or head of household | $250,000 each, on each person's share of the gain |
Each co-owner's share of the gain follows state property law. In California, community property is usually split equally, but a judgment can divide it differently. Whether deemed use under the divorce rule counts toward the $500,000 joint test is a point to confirm with a CPA.
What can shrink the exclusion?
- Nonqualified use. Gain tied to periods after 2008 when the home was not the main home of the owner, a spouse or a former spouse is generally not excluded. The statute counts a former spouse's use, so a spouse living there usually keeps those years qualified. A rental or empty stretch can count against the seller, but the statute does not count time in the 5-year window after the last date the owner or their spouse lived there as a main home. That later time still does not add to the use test.
- Depreciation. Gain equal to depreciation after May 6, 1997, on a rental or home office is not excluded (see guide 06).
- The 2-year look-back. An out-spouse who bought a new home and sold it with an exclusion in the 2 years before may not get a second one.
Is there a partial exclusion if the tests are missed?
Sometimes. Section 121(c) allows a reduced exclusion when the sale happens because of a job change, health, or unforeseen circumstances. Treasury Regulation 1.121-3(e) lists "divorce or legal separation under a decree of divorce or separate maintenance" as one of those events. The event generally has to happen while the seller owned and lived in the home. Publication 523 figures the reduced amount as the qualifying months divided by 24, times $250,000. Whether the safe harbor fits someone who moved out long before the decree is a CPA question.
Does California follow these rules?
Generally yes. Revenue and Taxation Code 17152 adopts IRC 121 with a few changes, for example for Peace Corps service and joint returns. None of the listed changes is about divorce. A CPA confirms how the state return treats the sale.
A worked example (illustrative only)
Round numbers, not a real case:
- 1Bought 2012 for $400,000
- 2$50,000 of improvements
- 3Spouse B moves out 2019
- 42020 judgment lets spouse A live there until sale
- 5Sold 2026 for $1,150,000
- Sale price $1,150,000, minus $70,000 selling costs: $1,080,000.
- Minus basis of $450,000 (price plus improvements): $630,000 of gain.
- Split equally: $315,000 each. Both are single in 2026.
- Spouse A owned and lived there. Up to $250,000 may be excluded, leaving about $65,000.
- Spouse B still owns half. A's use under the judgment may count as B's use, so B may also exclude up to $250,000, leaving about $65,000.
- Without the divorce rule, B had no use in the 5-year window and generally no full exclusion.
It ignores depreciation, earlier exclusions, rates and state tax. The net-proceeds estimator shows rough sale numbers before tax.
Common mistakes
- Assuming the spouse who moved out has lost the exclusion.
- Moving out with no written agreement or order behind it.
- Choosing a closing date without checking the December 31 filing status.
- Treating the buyout as a sale that uses the exclusion.
- Losing the purchase statement and improvement receipts.
- Renting the house after both spouses leave without checking the use test and depreciation with a CPA.
Records many CPAs ask for
The divorce home sale checklist has the full list.
What a real estate agent can and can't do here
A real estate agent can give a current value estimate, estimate selling costs and net proceeds, and work with escrow on the closing date the parties choose. An agent cannot say whether the exclusion applies, read an order for tax purposes, or say what anyone will owe.
Ask a professional
- CPA or enrolled agent: the ownership and use tests, filing status, basis, nonqualified use and any partial exclusion.
- Family-law attorney: which documents grant use of the home, how the judgment divides the sale, and how tax timing is written into the agreement to sell.
Terms like basis and exclusion are in the glossary.