Married couples filing a joint return can exclude $500,000 of gain under the following conditions:
1)ownership - either one owns it for 2 out of 5 years before the sale
2) Use - both must use it as their primary residence for 2 out of 5 years before sale
3) frequency - during the two-year period ending on the date of sale, neither spouse excluded gain from the sale of another home
if both spouses do not meet the use and frequency tests, the allowable exclusion is limited to the sum of the amounts that each spouse would be qualified to excluded if they had not been married
if each spouse sells a home and each spouse meets the tests above for their home, each spouse can exclude up to $250,000 of gain.
for MFS the exclusion for each assuming all the tests are met is $250,000.