People with health savings accounts (HSAs) are generally advised to do their best to keep that money invested during their working years and reserve the bulk of it for retirement. Doing so allows them to capitalize on tax-free growth.

Also, many people find that their healthcare costs end up rising a lot in retirement. So having money in an HSA can ease that burden at a time when seniors tend to shift over to a fixed income.

A person at a laptop in a kitchen setting.

Image source: Getty Images.

If you're carrying an HSA balance into retirement, you should know that you may be in a great position to cover some of your healthcare costs with relative ease. But there are certain health-related expenses that don't count as qualified ones for HSA purposes. So it's important to know the rules before you start removing money from your account.

Two big things you can use your HSA to cover

Medicare premiums are a big expense for a lot of seniors. Though most enrollees don't pay a premium for Part A, which covers hospital care, there is a monthly premium for Part B, which covers outpatient services. Part D, which covers prescription drugs, also charges a monthly premium.

If you have money available in an HSA, you can use it to pay your Medicare premiums. That's helpful, because having a higher income for a period of time could mean you end up having to pay more than the standard monthly premium for Medicare Parts B and D.

You should also know that if you opt to put a long-term care insurance policy in place, you can use your HSA to cover the cost of your premiums. There are certain limits you'll need to stick to in that case, but the option does exist. Having long-term care insurance could spare you from catastrophic costs in the event that you end up needing to reside in an assisted living facility or nursing home for an extended period of time.

One big expense you can't use your HSA for

Many enrollees in original Medicare opt to buy supplemental insurance, otherwise known as Medigap. A Medigap policy could come in handy if, for instance, you end up facing an extended hospital stay and reach the point of having to pay a daily coinsurance rate.

To be clear, though, Medigap won't pay for services that aren't already covered by Medicare. So if you stick to original Medicare and end up needing dental treatment that isn't covered, don't expect your Medigap plan to pick up the tab.

Unfortunately, though, you can't use HSA funds to cover the cost of your Medigap premiums. Keep that distinction in mind, because while you'll avoid a penalty for non-qualified HSA withdrawals once you turn 65, you'll face taxes on withdrawals that fall into that category.

Bringing HSA funds into retirement could result in a world of financial relief. But be sure you know what you can and can't use your HSA for so you're able to make the most of the money you've saved.