Mike9241
Level 15
Intuit Approved! This answer has been verified for accuracy by an Intuit expert employee

Deductions & credits

you misunderstand the rule is the house sold must be your principal residence for both the ownership and use test for 2 out of five years before sale which it was. this is different than primary residence of which you can only have one at a time.

 

from reg 1.121-1

Principal residence. In the case of a taxpayer using more than one property as a residence, whether property is used by the taxpayer as the taxpayer's principal residence depends upon all the facts and circumstances. If a taxpayer alternates between 2 properties, using each as a residence for successive periods of time, the property that the taxpayer uses a majority of the time during the year ordinarily will be considered the taxpayer's principal residence. 

 

the home you are selling does not have to be your principal residence at time of sale. all that is required is to meet both two-year tests at the time of sale.