Deductions & credits

Hi!

 

I have a related question. Suppose I closed on the sale of our primary residence on November 30 2022.  This means that the 5 year period prior to the sale begins on November 30 2017.

 

On September 1, 2019, I started a new job well over 1000 miles away from this residence and worked there for a year until my wife joined me on August 1 2020. The house was subsequently rented out until we sold it.

 

Between September 1, 2019 and August 1 2020, I returned to live in the house for at least 28 days.  11 days in March, 2020, 12 days in May 2020 and 5 days in October 2019. 

 

My question is, how is my use of the house on these 3 occasions within the 5 year period before the sale of the  house taken into account? Could it count as 3 months?  As 2?

 

Thanks

Kevin