For the exclusion for gain on the sale of a primary residence; if you file a joint return, both spouses must meet the ownership and residence tests but you file separate returns for the year of the sale, you would only look to the spouse which is claiming the exclusion. For the second sale, the exclusion can only be claimed once in a two year period to meet the lookback test and all other requirements must be met- so once again, you have to make sure you qualify and if filing separate might be helpful (you should definitely plan on spacing the sales so the timing is correct).
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"