Current Year HSA Distribution for Medical Expenses for Past Several Years Together for California Return

I opened a HSA account in 2015. From 2016 to 2019, I had yearly SMALL medical expenses that I DID NOT use HSA distributions. I also DID NOT itemize these expenses and claim deductions in the Federal returns in those years. But cumulatively these added to a sizeable amount.

 

Finally in 2021, I used a HSA distribution of $20,000 to cover theses medical expenses incurred from 2016 to 2019. I entered this HSA distribution in TurboTax and answered that this was used completely to cover qualified medical expenses. The Federal return handles this correctly by including Form 8889 showing that this distribution was not taxable.

 

However, the California return considers this distribution as covering 2021 qualified medical expenses and enters the HSA amount greater than 7.5% of AGI in Form CA (540) Line 4c as an addition to the deduction. These were actually 2016 to 2019 qualified medical expenses and should not be claimed as a deduction for 2021.

 

How do I enter the 2021 HSA distribution covering qualified medical expenses from 2016 to 2019 in order for TurboTax to generate both the Federal return and the California return correctly?