Skip to content

General education, not advice for your situation.

Carry Forward Learning Search the site

Selling Your Home

Selling Your Home: divorce, death, military and other cases

Same facts. Pro adds the full authority stack under each answer.

How does divorce affect the tests?

Time counts in your favor. If your spouse or ex-spouse lives in the home as a main home under your divorce or separation paperwork, that counts as your use while you still own a piece of it. And if the home came to you from your spouse, the time they owned it counts toward your ownership.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Code I.R.C. § 1041
  3. Regulation Treas. Reg. § 1.121-4
  4. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(d)(3) and Reg. 1.121-4(b). The 'divorce or separation instrument' is defined in 121(d)(3)(C). Even for a transferred home you must meet the use test yourself.

My spouse died. Can I still claim the larger exclusion?

Yes, if you sell within 2 years of the date of death, haven't remarried, and the couple would have qualified for the joint amount just before the death. After that you get the single amount. You can also add your late spouse's time owning and living in the home to yours.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-4
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(b)(4) and (d)(2). Reg. 1.121-2(a)(4) Examples 5 and 6 show a sale in the year of death (joint return with the executor) versus the following year (single cap).

I'm in the military or Foreign Service. How does that change things?

You can choose to pause the 5-year clock while you or your spouse are on qualified extended duty, for up to 10 years. That lets you count time before you left. Qualifying duty is at a station at least 50 miles from home (or in government quarters) under orders of more than 90 days or indefinite. The same choice is open to intelligence community employees and Peace Corps workers.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-5
  3. Publication IRS Publication 523 (2025), Selling Your Home
  4. Form instructions Instructions for Schedule D (Form 1040) (2025), Sale of Your Home
Section 121(d)(9) and (d)(12); Reg. 1.121-5 (uniformed services and Foreign Service). The election covers one property at a time and is made by filing a return that does not include the gain (Reg. 1.121-5(b)). It can be revoked at any time (121(d)(9)(D)(ii)).

My home was destroyed or condemned. How does that work?

It's treated like a sale. You can exclude gain as usual, and you may be able to postpone any extra gain if you reinvest in a new home. The time you owned and lived in the old home can count toward the new one.
Sources

Authority, strongest first

  1. Code I.R.C. § 121
  2. Regulation Treas. Reg. § 1.121-4
  3. Publication IRS Publication 523 (2025), Selling Your Home
Section 121(d)(5) and Reg. 1.121-4(d): section 121 applies first, then section 1033 on the amount realized reduced by the excluded gain. See Pub. 547 for destroyed homes and Pub. 544 for condemnations.

I'm financing the buyer's purchase. What changes?

You may be able to spread the taxable gain over the payment years using the installment method. Pub. 523 warns that any depreciation recapture income is reported in the year of sale; for a home depreciated on a straight-line basis there is usually little or none, and the depreciation slice is generally counted first as payments come in. If the buyer defaults and you take the house back, special rules apply and a one-year resale window can matter.
Sources

Authority, strongest first

  1. Case DeBough v. Commissioner, 799 F.3d 1210 (8th Cir. 2015)
  2. Publication IRS Publication 523 (2025), Selling Your Home
Pub. 523 sends installment sellers to Form 6252 and Pub. 537, and says recapturable depreciation gain must be reported in the year of sale. Under section 453(i) that is ordinary-income recapture under sections 1245 and 1250; for real property depreciated straight line, section 1250 recapture is generally zero, and unrecaptured section 1250 gain is taken into account first as payments are received (Reg. 1.453-12). Our reading; we did not read Pub. 537 for this pass. In DeBough v. Commissioner, 799 F.3d 1210 (8th Cir. 2015), a seller who did not resell within one year after reacquiring could not carry the earlier exclusion into the section 1038 computation; section 1038(e) preserves it on a resale within one year.

What about a short sale, foreclosure or forgiven mortgage debt?

A foreclosure or short sale can produce gain, loss or income, so the same exclusion questions come up. Debt a lender forgives is usually income. The special exclusion for forgiven home-mortgage debt reached only debt forgiven before 2026 or under a written agreement made before 2026, and we found no extension in the Code. So debt forgiven in 2026 under a new arrangement may be taxable income, even if the home sale gain is excluded. Pub. 4681 walks through the other exceptions, such as insolvency.
Sources

Authority, strongest first

  1. Code I.R.C. § 108(a)(1)(E)
  2. Publication IRS Publication 523 (2025), Selling Your Home
Section 108(a)(1)(E) as it reads in the Code through P.L. 119-121 (October 9, 2026): qualified principal residence indebtedness discharged before January 1, 2026, or subject to an arrangement entered into and evidenced in writing before January 1, 2026. P.L. 119-21 did not extend it. Pub. 523 and Pub. 4681 describe the rule as of the 2025 editions. We did not read section 108(h) or the Form 982 rules for ourselves.

I had a government-subsidized mortgage. Does the sale cost me extra?

It might. If your loan came from a tax-exempt mortgage bond or a mortgage credit (MCC) program, you may have to pay back part of the subsidy when you sell within 9 years, even if the whole gain is excluded. Form 8828 figures it.
Sources

Authority, strongest first

  1. Code I.R.C. § 143(m)
  2. Publication IRS Publication 523 (2025), Selling Your Home
Section 143(m). The recapture is the lesser of the recapture amount or half the gain, and does not apply to a disposition by reason of death. Pub. 523 says to file Form 8828 whenever you received federal mortgage subsidies, even for a loss.

More questions

Where the numbers come from

Checked

Every figure above comes from the source listed here, with the date we checked it and the date it is due for a re-check.

  • Home sale: extended duty minimum distance miles
    IRC 121(d)(9)(C)(i) checked 2026-10-19, review by 2027-01-19
  • Home sale: extended duty over days
    IRC 121(d)(9)(C)(v) checked 2026-10-19, review by 2027-01-19
  • Home sale: extended duty suspension maximum years
    IRC 121(d)(9)(B) checked 2026-10-19, review by 2027-01-19
  • Home sale: mortgage subsidy recapture years
    IRC 143(m)(2)(B) checked 2026-10-19, review by 2027-01-19
  • Home sale: ownership use test years
    IRC 121(a) checked 2026-10-19, review by 2027-01-19
  • Home sale: surviving spouse sale window years
    IRC 121(b)(4) checked 2026-10-19, review by 2027-01-19