Reduced Exclusion
Even if you don’t meet one or both of the above two tests, you can still claim an exclusion if you sold or exchanged the home because of a change in place of employment, health, or certain unforeseen circumstances. In this case, the maximum amount of gain you can exclude is reduced. For more information, see Pub. 523.
Sale of home by surviving spouse.
If your spouse died before the sale or exchange, you can still exclude up to $500,000 of gain if:
The sale or exchange is no later than 2 years after your spouse’s death;
Just before your spouse’s death, both spouses met the use requirement of Test 1 , at least one spouse met the ownership requirement of Test 1 , and both spouses met Test 2 ; and
You didn’t remarry before the sale or exchange.