Backdoor roth, SEP-IRA to 401K conversion, pro-rata rule

I have a question about what happens to my IRA basis for a back door roth if I convert part of my IRAs to a 401k.  Currently I have a traditional IRA (which has received some non-deductible contributions over the years), a roth IRA, and a SEP-IRA at work.  This year all new contributions at work are moving to a 401K, so that's out of the basis picture.  Fine.

 

The broker says we can roll our SEP-IRA into the 401K which I would like to do but have not done yet; the funds are fine and I like the simplification.  However for a few years I have been contributing the limit to the traditional IRA and rolling it to the ROTH-IRA outside of work.  There is still a non-deductible contribution  basis, and turbotax has been tracking the basis over the total of the SEP-IRA and my traditional IRA and writing off the correct percentage of the non-deductible contributions using the pro-rata rule.

 

So, if I roll the SEP-IRA to the new 401K this year, how do I calculate the basis for the backdoor roth rollover this year?  On Dec 31 2021 the new traditional IRA basis for the calculation will be the traditional IRA only, but would I be correct to assume that if the 401K lowers my total traditional ira by 60%, the IRS will assume  for the calculation that 60% of my non-deductible contributions went to the 401K, so my deduction is lowered?  That would be my assumption by reading about mixing, anyone know for sure?