Retirement can be a financially challenging period of life, especially since seniors' needs can change over time. But if there's one senior expense that seems to keep going nowhere but up, it's healthcare. In fact, the average 65-year-old couple retiring today is expected to spend $387,644 on medical care throughout retirement, according to HealthView Services, a cost-projection software provider.

The fact that healthcare is expensive is generally not a shock for retirees. But many still fear that they won't have the resources available to cover their medical spending as needed.

In fact, in a recent survey by the Employee Benefit Research Institute, only 28% of retirees say they're very confident they'll have enough money to take care of their medical needs throughout their senior years, and only 42% are somewhat confident in that ability. All told, that's 70% of retirees expressing some degree of confidence. But while that may seem encouraging, it also marks a 10-percentage-point drop from the 80% of retirees who had some level of confidence last year.

Older man and woman sitting at laptop holding documents

IMAGE SOURCE: GETTY IMAGES.

If you're worried about covering all of your health-related needs in retirement, you're clearly in good company. Here are a few steps you can take to avoid the stress of worrying about paying for medical bills.

1. Know your costs

Many people make the dangerous assumption that healthcare under Medicare is free. Not so. Medicare enrollees are on the hook for premium costs, deductibles, coinsurance, and co-pays that can really add up. Furthermore, there are some services Medicare just won't pay for, such as dental care, that are generally unavoidable. And Medicare also won't pay for long-term care, such as nursing homes or assisted living facilities.

If you're worried about paying for healthcare as a senior, read up on the costs Medicare enrollees face, and work to come up with a budget that allows you to cover them. And also, understand what long-term care looks like from a financial perspective, and consider applying for long-term care insurance to defray some of those potential costs.

2. Pad your retirement savings

The more money you have available in your 401(k) or IRA for retirement, the easier it'll be to cover your healthcare expenses. As a general rule, you should aim to set aside 15% to 20% of your income in a retirement plan, and that's at a minimum. If you can do better, you'll buy yourself even more peace of mind for the future. You may need to cut back on some living expenses to boost your retirement plan contribution rate, but having more money in that account gives you the flexibility to spend on any senior expense that comes in higher than anticipated, healthcare included.

3. Contribute to a health savings account

Not everyone is able to participate in a health savings account, or HSA. To be eligible, you must be enrolled in a high-deductible health insurance plan, the definition of which changes from year to year (for the current year, it's $1,400 for self-only coverage and $2,800 for family coverage). But if you qualify, you have a solid opportunity to sock away funds for healthcare that can be used at any time.

HSA funds never expire, and while you can withdraw from an HSA to pay for near-term medical expenses, the best way to take advantage of one of these accounts is to put in more money than you expect to use immediately. HSAs allow you to invest funds that aren't being used so your balance grows into an even larger sum. So you can set aside money today that you use in 10, 20, or 30 years when you're retired and need it even more.

Healthcare can be a worrisome expense for seniors, as evidenced by the fact that a smaller percentage of retirees are confident in their ability to pay for it. If you're concerned about affording medical care when you're older, read up on the costs you might face; boost your general retirement savings, if you can; and, if you're eligible, sock away money in a health savings account so you have a dedicated means of covering things like doctor visits, medications, and even your Medicare premiums. Some strategic planning on your part could make an otherwise daunting expense a lot more manageable.