Deductions & credits

When filing jointly, you would claim either $250,000 if one spouse qualifies, or $500,000 if both spouses qualify.   The spouse who moves out qualifies for their $250,000 even if they did not live in the home 2 of the past 5 years  as long as part of the separation agreement allowed the other spouse to remain in the home.   This is on page 3 of publication 523, special rules for divorce and separation.