Most of us know to save for retirement, since Social Security won't provide enough income by itself to make for a comfortable lifestyle. But when we think about the expenses we'll face in retirement, it's easy to assume that they'll largely go down or stay the same. Specifically, housing might cost less if your home is paid off by the time you retire, and your utility and grocery bills might be similar to what they look like while you're still working.

But if there's one expense that tends to go up in retirement, not down, it's healthcare. And that's why it pays to take advantage of a health savings account (HSA) during your working years.

Smiling older man sitting in driver's seat of car

IMAGE SOURCE: GETTY IMAGES.

You need money for future healthcare costs

Many seniors are caught completely off-guard when they realize just how costly medical care is. Why the disconnect? Part of it boils down to misconceptions about Medicare. Many people assume that it's free, when in reality, it costs money just to maintain coverage. And any time you receive treatment under Medicare, you pay out of pocket as well, similar to the copays you're responsible for with private health insurance.

Furthermore, there are services Medicare generally won't cover, like dental care, vision exams, and hearing aids. These are all common among seniors, but under Medicare, you're on your own to pay for them.

All told, the average healthy 65-year-old couple today is expected to spend $387,644 on medical care throughout retirement, not including long-term care. And if you're not so healthy, your total could come in higher. That's why it's crucial to have a dedicated source of healthcare funds for your senior years -- and an HSA can be just that.

How HSAs work

An HSA is a hybrid savings and investment account. The money you put into an HSA can be withdrawn immediately to cover near-term medical expenses, but any funds you don't need right away can be invested so that they grow into an even larger sum. HSA funds also don't expire, so you can carry unused money from one year to another, all the way into retirement. In fact, the whole point of an HSA is to contribute more money than you expect to use in the near term. That way, you can invest the rest and have a pile of cash to access when you retire and your healthcare expenses start mounting.

To qualify for an HSA, you must be enrolled in a high-deductible health insurance plan, and to be clear, that's an impediment for some people. But if you're currently looking at a deductible of $1,400 or more as an individual, or $2,800 or more for family coverage, then your health plan may be considered HSA-eligible. If that's the case, you can contribute up to $3,550 this year on your own behalf, or up to $7,100 on behalf of your family. And if you're 55 or older, you get to put in an extra $1,000.

Any money that's contributed to an HSA goes in tax-free, and investment gains in an HSA are tax-free as well. HSA withdrawals are also tax-free, provided they're used for qualified healthcare expenses. And once you reach retirement, you're apt to have many of those, from Medicare premiums to deductibles to copays.

It pays to save in an HSA

The money you save in an IRA or 401(k) can be used for any purpose, and that includes medical bills. But if you want to buy yourself extra financial security in retirement, then it pays to have an HSA as well. That way, you'll have an account earmarked specifically for healthcare, and you'll also have the flexibility to tap that account along the way should medical emergencies arise.