Sell the house before or after divorce?

Key numbers

  • You can exclude up to $250,000 of gain on the sale of a main home, or up to $500,000 on a joint return with your spouse (source: IRS Topic 701).
  • Both amounts depend on the same tests: you owned the home for at least 24 months out of the last 5 years, and lived in it as a residence for at least 24 months of that period (IRS Topic 701).
  • A spouse who has moved out may still count the home as a residence where the other spouse lives there under a divorce or separation instrument (IRS Publication 523).
  • Selling is not free. Agent commission commonly runs about 2.5% to 3% of the sale price per side and can double where the seller also pays the buyer’s agent (Bankrate). Commonly cited totals land around 6% to 8% including closing costs, and this site models 7%.

There is one number in the tax code that makes the order of events matter here, and most people meet it for the first time after the decision is already made. While you can still file a joint return, a couple can exclude up to $500,000 of gain on a main home. Filing alone, that figure is $250,000 (IRS Topic 701). On a house bought decades ago in a place where prices ran hard, that swing is real money.

It is also widely oversimplified. Halving the exclusion only bites in one specific situation, and the rest of this page is about telling that situation apart from the ones where the timing barely matters.

The exclusion, and the tests underneath it

The exclusion is not automatic and it is not about the sale price. It applies to the gain, which is roughly what you sold for, minus the costs of selling, minus what you paid plus the improvements you made along the way. To claim it you have to pass two tests: you owned the home for at least 24 months out of the 5 years before the sale, and you lived in it as your residence for at least 24 months of that same period. Gain above the exclusion has to be reported, and it can be taxed (IRS Topic 701).

Two rules in IRS Publication 523 exist because divorce breaks the ordinary pattern, and both are worth knowing before you plan around a date.

A worked example: a $700,000 house bought for $300,000

Assumptions, stated plainly: they paid $300,000 and would sell for $700,000. Selling costs at 7% come to $49,000, so the amount realized is $651,000 and the gain is $351,000. No improvements are counted, which is conservative, because money spent on a new kitchen or a new roof adds to basis and shrinks the gain. Long-term capital gain is figured at 15%, which the IRS describes as no higher than the rate most individuals pay (IRS Topic 409), and state tax is not included.

Same house, same gain of $351,000. Only the timing and the ownership at the moment of sale change.
When and how it is sold Exclusion available Taxable gain
Sold while still married, joint return $500,000 $0
Sold after the divorce, both still own it, both meet the tests $250,000 each, against $175,500 of gain each $0 each
Sold after the divorce by one person who took the whole house $250,000 $101,000, roughly $15,150 of tax at 15%

Read the middle row again, because it is the one that gets left out of the scary version of this story. Selling after the divorce does not automatically cost you the bigger exclusion. If you both still own the house when it sells and you both still meet the tests, you each exclude up to $250,000 against your own share of the gain, which on this example is $175,500 apiece and comfortably covered.

The bill in the bottom row is not really a timing problem either. It is an ownership problem. One person ended up owning a house with $351,000 of gain on it, and one person gets one exclusion. That is the outcome to look at before agreeing to take the whole house, and it belongs in front of a tax professional rather than a website, because the tests, the basis and the dates are all specific to you.

The other cost, which arrives whichever date you pick

On this house, 7% in selling costs is $49,000, gone before either of you sees a cent. Bankrate puts agent commission at roughly 2.5% to 3% of the sale price per side, and notes the amount can double where the seller also covers the buyer’s agent, with closing costs separate from that (Bankrate). Commonly cited totals for the whole exercise land around 6% to 8%, and repairs, staging and two sets of moving costs sit on top of that.

That cost is the reason selling twice is the expensive mistake. Keeping the house, discovering in three years that the payment does not work, and selling then means paying it once, moving twice, and losing whatever was traded away to keep the house in the first place.

When selling before the divorce tends to win

When selling after tends to win

Whichever way it goes, the exclusion rests on tests measured over the five years before the sale, so a long delay is worth checking rather than assuming. Get that checked by a tax professional against your actual dates.

Frequently asked questions

Is it better to sell the house before or after the divorce?

It depends on the gain and on who will own the house at the moment of sale. Selling while you can still file a joint return can shelter up to $500,000 of gain instead of $250,000, which matters on a long-held house that has grown a lot. Selling after the divorce is often just as good if you both still own it and both still meet the tests, because each of you can exclude up to $250,000 on your own share. The trap is one person owning the whole house alone and then selling.

How much gain can I exclude when I sell my home?

Up to $250,000, or up to $500,000 on a joint return with your spouse, provided you owned the home for at least 24 months out of the 5 years before the sale and lived in it as your residence for at least 24 months of that period. Gain above the exclusion has to be reported and can be taxed. The IRS sets both the amounts and the tests.

I moved out. Do I still meet the residence test?

Possibly. IRS Publication 523 allows you to treat the home as your residence if you are a sole or joint owner and your spouse or former spouse is allowed to live in it under a divorce or separation instrument and uses it as their main home. That rule exists precisely because one person usually leaves first. Whether it applies to your paperwork is a question for a tax professional.

What does it cost to sell?

Commonly cited totals run around 6% to 8% of the sale price once agent commission and closing costs are added together. Bankrate puts agent commission at roughly 2.5% to 3% of the sale price per side, and notes it can double if the seller pays the buyer agent’s fee too. This site models a sale at 7%, which sits in the middle of that. Repairs, staging and moving costs are on top.

If the house is transferred to me in the divorce, does my clock restart?

For ownership, no. IRS Publication 523 says that if your home was transferred to you by a spouse or ex-spouse, whether in connection with a divorce or not, you can count any time your spouse owned the home as time when you owned it. The residence test is separate and still has to be met on its own terms.

What tax rate applies to the gain above the exclusion?

Long-term capital gain rates are 0%, 15% or 20% depending on taxable income, and the IRS notes that the rate on most net capital gain is no higher than 15% for most individuals. Your own rate depends on your income in the year you sell, which is often the year everything else about your income changes too.

Sources: IRS Topic 701, sale of your home · IRS Publication 523, selling your home · IRS Topic 409, capital gains and losses · Bankrate, seller closing costs. All fetched and checked September 2026. Selling cost totals are commonly cited ranges, not quotes, and capital gain rate thresholds change by tax year. The worked example ignores improvements, depreciation from any business use, and state tax, all of which can change the answer. This page explains how the money works and is not legal or tax advice for your situation.

Next: what the buyout would cost if you keep it instead →