Property tax and mortgage interests for two primary residence

Hi,

 

  I bought a new house (AKA house A) in June, 2021.  After I bought house A, I have home improvement done and moved to house A in August 2021.

I lived house B for more than 20 years. I put house B on market on September, 2021 and was sold in November 2021.

 

   Here are my questions:

 

  1. House B is my primary residence in last 20+ years.

For 2021 tax return, which is my primary residence?

Should we treat house B as primary residence for January through July 2021 since I moved to house A in Aug?

This mean we treat house A as primary residence starting from August 2021.

 

2. Property tax and mortgage interests.

   

I paid property tax and mortgage interest for house B to cover all way to October (house B was sold in November). I also paid two installments for house A.

I paid mortgage interest for house A staring from June 2021.

 

    For 2021 tax return, how do I calculate mortgage interest and property tax for my primary residence?

 

     Assume the following:

House B as primary residence for January through July 2021.

House A as primary residence starting from August 2021.

 

Here is my formula:

For mortgage interest, first 7 months from house B + remaining 5 months from house A.

For property tax,  paid on house B + 2 installments for house A.

 

Is that right?

 

Thanks,

Bob