Deductions & credits

married couples 

filing a joint return can exclude up to $500K of gain under the following circumstances

ownership; either or both must have owned it for 2 out of 5 years before sale

use: both spouses must have used it as their principal residence for 2 out of 5 years before sale

frequency: during the two year period ending on the dte of sale, neither spouse excluded gain from the sale of another home

use and frequency tests nit met by both spouses. for a married couple to qualify for the full $500K either spouse may meet the ownership test but both must meet the use and frequency test. if both spouses don't meet the use (you don't) and frequency  test, the allowable exclusion is limited to the sum of the amounts that each spouse would be qualified to exclude if they had not   been married

 

since you meet the ownership and use test for your home, you can exclude $250,000.  there is nothing in the law that says it must be your principal residence when sold.  as a matter of fact some taxpayers convert their home to rental and then within the 5 year period sell it. they are entitled to the exclusion but must recapture depreciation.

 

IRS article to this 

https://www.irs.gov/faqs/capital-gains-losses-and-sale-of-home/property-basis-sale-of-home-etc/prope...