Retirement has a way of being a surprisingly expensive period of life. That's because many of the costs people encounter during their working years don't go away in retirement. And some expenses have the potential to increase.

Healthcare is one of them. Health issues tend to arise with age, and many seniors inevitably find that they're liable for many out-of-pocket costs under Medicare. That's why paying for healthcare tends to be such a big source of stress for older Americans.

In fact, a recent survey by HSA Bank found that 33% Americans aren't sure how they'll cover medical costs once retirement rolls around. If you're part of that statistic, then it could pay to start funding an account that's earmarked for medical bills specifically.

A person at a desk.

Image source: Getty Images.

Get that HSA funded

You could always pad your IRA or 401(k) plan so you have added funds available to cover your senior healthcare costs. But there may be an easier way to help ensure that you're able to pay for medical care in the future -- putting money into a health savings account (HSA).

HSAs allow you to set aside money in a tax-advantaged manner to cover near-term and long-term healthcare expenses. Unlike flexible spending accounts, HSAs do not require you to spend down your plan balance year after year.

In fact, HSAs encourage you to carry funds forward because you're able to invest your HSA balance and enjoy tax-free gains in your account. And HSA withdrawals are not subject to taxes as long as that money is used to cover qualified healthcare expenses -- things like copays for doctor visits and medication.

Now not every health plan is compatible with an HSA. You'll need to check your coverage to see if your deductible and out-of-pocket maximum render you eligible to contribute (and note that your plan may be compatible one year but not the next year). But if your health insurance plan allows you to participate in an HSA, it pays to start funding an account and reserve that money for retirement.

You should also know that while some employers do offer an HSA, you don't need to sign up for one through your job. If your health plan is compatible with an HSA, you can open one independently if it's not a benefit your employer provides.

Avoid a world of stress

Paying for healthcare in retirement can be a very stressful thing. This holds true whether you end up in good health, average health, or poor health (though if the latter applies to you, your stress levels might soar even more).

If you'd rather not have to worry about how you'll manage your medical bills during retirement, make an effort to fund an HSA each year you're eligible to do so. And if you're worried about having an excessive amount of money in your HSA come retirement, rest assured that once you turn 65, you can take penalty-free HSA withdrawals for non-medical spending.

In that situation, your withdrawals won't be tax-free. But you'll have the option to spend that saved money any way you want to.