Residence converted to rental and bought a new primary residence in 2024. Need help figuring out if I calculated my mortgage interest correctly using the IRS 936 Worksheet

We stayed in out first home from Jan-June 2024 and moved into a second primary home in June and rented the first home from July-Dec'24. Here is how i calculated mortgage interest, please let me know if this is correct. 

 

First home ($ numbers for illustration purposes only)

Total Interest paid on 1098: $1000

% rental days: 50%

Mortgage interest expensed on Sch E for rental : $500

Mortgage Balance beginning of year: 220k

Mortgage Balance end of year: 180k

Average Balance on first home: 200k

 

Second Home

Mortgage interest paid total in 2024=10,000

Mortgage balance beginning of year: 800k

Mortgage balance end of year: 700k

Avg mortgage balance on second home: 750k

 

 

Total mortgage balance average=200k+750k=950k

Max mortgage for houses after Dec 2017= 750k

Ratio=750k/950k=0.78

Mortgage interest I can deduct= 0.78 *(personal use interest from first home*mortgage interest from second home)=0.78*($500+$10,000)=$8289.4 --->this is the deductible mortgage interest on Sch A