in California HSA contribution cannot be deducted as they are consider as any other type of investment.
if this is true, is it fair to say that if I withdraw money not for eligible medical expenses I will pay the same amount of taxes and the “only” difference is the 20% penalty?
Withdrawals from your HSA not used for medical expenses are taxed federally at your usual tax rate and you will have a 20% penalty. California does not tax the withdrawal but will tax any interest or capital gain from your HSA account.
Understood but California will tax interests and capital gain even if I leave the money on my HSA. My point is… ate the end at December 31st I have my money in the HSA or I withdraw it I will be paying the same amount of tax on that money, the only difference is the 20% penalty
if you leave the money in there will be no Federal tax or penalty unless there is a contribution excess not withdrawn - see below. you will still pay California taxes on any income earned in the HSA. if you take it out for nonmedical expenses you will pay a Federal income tax and penalty. Your California tax liability will not change except that a withdrawal would likely reduce the income you earned for the year.
Now if you are removing an excess 2021 (you have until 10/15/20222) /2022 contribution in 2022 that you made personally (not through payroll) there is no Federal tax or penalty on the excess withdrawn. There is a federal tax on income that must be included in the withdrawal. don't try to do this without going through the plan administrator. if the excess contrbutions were done through payroll deductions box 1 on your w-2 was likely reduced for your portion of the contributions. in this case, the withdrawal, including any portion that is an employer matching contribution, is subject to Federal income taxes