First, we mistakenly contributed to the HSA in 2016 and 2017 to the tune of $8981. This was used to pay medical bills and the balance at the end of 2017 was $1614.
For the 2017 taxes, with Turbo Tax, form 5329 asked for the smaller of the overpayment or the balance; obviously, this was the $1614 balance, so we paid tax on that.
Then we closed the account, so for 2018 we received a 1099-SA (code 1) for $1614.
Now TurboTax is asking for: the amount from the 2017 return, form 5329, line 48, which is the $8981; then, TT asks if we want to withdraw that from the HSA (we can't, because it doesn't exist any more, but if we say No, TT thinks it's still in the account).
We're willing to pay tax on this, since we realized it as income. But I don't know what numbers to enter, where, and how to keep from being penalized in the future. Help, please!
First, when you closed the HSA, not only did you have to pay income tax on the 1099-SA amount of $1,614, but if you did not use the $1,614 for qualified medical expenses, then you will pay a 20% penalty on top of that. But maybe you already knew this.
The good news is that if you did make this distribution for non-qualified medical expenses, then you reduced the carryover of excess contributions by $1,614.
As to your main issue, it depends on whether or not you are still under HDHP coverage.
If you are still under HDHP coverage, you get rid of the excess HSA carryover from last year by "charging off" the carryover as a "personal" contribution in the current year. This means that instead of making contributions in the current year, you allow the carryover to be the contribution. Yes, I recognize that you might need two years or three years to achieve this since the amount charged off has to fit in the current annual HSA contribution limit. Once the carryover has been "charged off", the penalties will stop.
If you are not under HDHP coverage and if you really closed the HSA, then the penalty is zero for the reason that you noted above (the penalty is the lesser of 6% of the excess or the value of your HSA on the last day of the year). This penalty process will persist, though, until you reach Medicare and will be unable to ever contribute to your HSA again.
That is, if you ever have HDHP coverage again, then you will have to do what I outlined in the paragraph that assumes you have HDHP coverage - charge off your carryover, paying the penalty so long as you have carryovers.
The only other way to eliminate the carryover of excess contributions is to make a distribution from the HSA for unqualified medical expenses (thus incurring the income tax and the 20% penalty), but since you have no money in the HSA, this is not possible.
So, you enter that you overfunded your HSA last year, you enter the amount of the carryover, you enter the value of your HSA (zero), and TurboTax completes the 8889 (and maybe the 5329) with a zero penalty.
So far as we know, this goes on until you hit Medicare. We have not seen anything from the IRS about otherwise shutting off the reporting.
Again, thank you for your quick and detailed answer. Blessings!