Deductions & credits

Yes. You as an individual have no way of calculating the amount of excess earnings - only the HSA administrator (who is holding the money and investing it) can do that. So when the 1099-SA shows up next year with a distribution code of '2', just enter it into your tax return. You will see the amount of earnings added to Other Income (line 21 of the 1040), and that will be the end of it.