Determining the maximum allowable contribution for my HSA if I was on an HSA for part of the year

I'm over 55 and was on my company's HSA (family plan) from Jan-Jun 2020. I retired in June 2020, and moved to a PPO plan. Pre-tax  contributions to my HSA were made through monthly payroll deductions. By June 30, 2020 I had made $4750 in pre-tax contributions. Additionally, while still employed with my company, I made a one-time after-tax contribution of $3350 to bring my total contribution to $8100 ($7100 + $1000 catch-up). 

 

I later found out that I had exceeded the maximum allowed limit and was told that since I was on an HDHP for 6 months of the year, my contributions must match a 6-month period not 12-months. I've been told that the $1000 catch up is not pro-rated therefore, my max allowable contribution for 6 months is $7100 / 2 = $3550 + $1000 = $4550. Therefore, my excess contribution is $3550.

 

Of this $3550, $200 is pre-tax contributions through payroll deductions and $3350 is from after-tax money from my savings account. I am assuming the $200 is considered other income and is taxable in 2020, while the $3350 is not taxable since it is after-tax money and I don't have to report it in my 2020 return. I am also aware that the gains attributable to the excess ($3550) must also be withdrawn before May 17, 2021 to avoid excise taxes on them, although, once withdrawn I do believe I will need to report the gains as "other income" in my 2021 return since the withdrawal will occur in 2021.

 

Is my understanding correct? If not, I would appreciate guidance from those in the know.

 

BTW, TurboTax 2020 comes up with a maximum contribution limit of $4050, not the $4550 I calculated. How did TT  comes up with $4050?

 

Thanks.