So long as one of the spouses is the owner and both spouses occupied the home for two of the five years prior to the sale then the full $500K exclusion is available when married filing joint for the year of sale.
Overall dollar limitation. The maximum gain
exclusion for an individual taxpayer is $250,000. Taxpayers who jointly own a
principal residence, but file separate returns, may each exclude up to $250,000
of the gain attributable to their interest in the home. A husband and wife who
file a joint return may exclude up to $500,000 of the gain if
Either spouse meets the two-year ownership requirement.
Both spouses meet the two-year use requirement.
Neither spouse excluded gain from a prior sale or exchange of
a principal residence within the last two years.
If the taxpayers do not meet any one of these requirements, the maximum
exclusion amount a married couple can claim on a joint return is the sum of each spouse's exclusion amount, determined as though
(1) the spouses were not married and
(2) each spouse owned the home during the period that either spouse owned
Although one spouse's ownership is attributed to the other for purposes of determining a separately calculated exclusion, both spouses must actually use the house as a principal residence to qualify for their own $250,000 exclusion. "
Please ask if you need more discussion or clarification.