IRAs and 401(k)s are great plans in which to save for retirement, thanks to the tax breaks involved. With a traditional IRA or 401(k), your contributions go into your account tax-free. With a Roth IRA or 401(k), contributions are made after they're taxed but you won't pay taxes on investment gains or withdrawals.

HSAs, or health savings accounts, give you all of those benefits combined. HSA contributions are tax-free, investment gains are tax-free, and withdrawals are tax-free with a caveat -- they must be used to cover qualified healthcare expenses.

As of the end of 2023, the average HSA balance was $4,380, according to data from Bank of America. But that same data reveals that most HSA savers may not be making the most of their accounts.

A person at a laptop.

Image source: Getty Images.

Aim to keep your balance untapped

Bank of America reports that last year, 76% of HSA participants spent their contributions on healthcare expenses. Only 24% actually saved the money they put in.

Of course, HSAs are designed to let you tap your balance at any time. There's no penalty for taking withdrawals prior to retirement age the way there is with an IRA or 401(k) because HSAs aren't retirement plans.

But the way to get the most benefit from an HSA is to contribute to one of these accounts, invest your balance, and let it grow tax-free for as many years as possible. If you take HSA withdrawals year after year, you risk ending up with little to no money by the time retirement rolls around.

Meanwhile, retirement is when you'll likely need a robust HSA balance the most. Many seniors find that their healthcare costs are higher in retirement due to issues brought about by aging. Plus, many retirees feel that money is tighter, in general, due to the lack of a regular paycheck. While you may be tempted to tap your HSA for near-term medical bills, and understandably so, the best thing you can do with your HSA is to leave it alone as long as possible.

Once you turn 65, you can take an HSA withdrawal for any purpose without incurring a penalty. Generally, penalties apply to HSA withdrawals taken for non-medical purposes. But that penalty is waived once you're 65, which means that from that point onward, your HSA can truly double as a regular retirement savings account.

That being said, HSA withdrawals taken at age 65 or later for non-medical purposes are subject to taxes. But that's no different than withdrawals from a traditional IRA or 401(k) plan.

Put your HSA to good use

Your HSA might come in handy during your working years. But you're likely to appreciate that money much more once you're retired.

If you can afford to pay your medical bills out of your pocket during your working years, do that. The more money you can bring with you into retirement in HSA form, the more financially secure you're apt to feel once your senior healthcare bills start to roll in.