Deductions & credits

Limited Mortgage Interest Deduction:

 

I've been struggling with this same issue since a 2020 cash-out refinance  loan that was refinanced prior to a 12-2017 refinance (also cash-out but under $1m).  (all balance was Home Acquisition Debt) The Mortgage Interest form to calculate this on TurboTax remains a mess and incapable of doing the calculations. It was so awful back in 2020, I abandoned the Deductible Mortgage Interest form, did the calculations myself using Pub 936 and typed it into Schedule A, Mortgage interest myself (I had to override the interest paid from 1098)
I took the pre-2017 loan payoff at refi in 2020 as the (deductible portion of interest on up to $1m deductibility). Use beginning of year and end of year (2023) balances to find Average balance.

2023 Beg + End balance / 2 = Average balance .   Divide your Qualified Loan Limit (100% Home AcquisitionDebt that was deductible up to $750kl / by Average Mtg balance = a three digit fraction   (0.xxx )

0.xxx  X 1098 Interest paid = your Deductible portion of Mtg Interest. 

Unfortunately, I just discovered that when I abandoned the home mtg interest form on TurboTax some very wrong numbers remained on the form to flow over to my 2021 State return which may have denied me a much higher interest deduction there, so I now have to amend that State return!!!  Thanks a lot TurboTax.
Make sure you don't deduct interest on any portion of Mortgage balance that is not 100% used to buy, build, improve your home.  

Read Pub 936 thoroughly and use the Table 1 worksheet to figure your Qualified Loan Limit.