There's a lot to think about as you're preparing for retirement. Not only do you have to consider how much you should save by the time you retire, but you'll also need to plan for how you'll spend all your time, how much you'll be receiving in Social Security benefits, and more.

But there's one factor that many workers aren't accounting for as they're planning for their senior years, and it can potentially cost you tens or even hundreds of thousands of dollars.

Older man looking at a laptop and documents

Image source: Getty Images.

The retirement expense that can cost more than you think

Nearly half (48%) of workers say they haven't accounted for healthcare expenses in their retirement plan, a report from the Transamerica Center for Retirement Studies and the Aegon Center for Longevity and Retirement found. Of those who aren't planning for this expense, nearly 30% admitted it's because they simply never thought about it before, while 26% said they expect the public healthcare system to take care of their expenses.

If you're not preparing for healthcare costs in retirement, you could be in for a costly surprise. Even with Medicare coverage, you'll still be responsible for certain expenses, including premiums, deductibles, copays, and coinsurance. These costs can add up, too. In fact, the average retiree spends around $4,300 per year on out-of-pocket healthcare costs, according to a study from the Center for Retirement Research at Boston College.

This number also doesn't include costs associated with long-term care -- which can be one of the most significant expenses you'll face in retirement. Approximately 70% of today's retirees will need long-term care eventually, according to the U.S. Department of Health and Human Services, and those who do need this type of care require it for an average of three years.

If you do end up needing long-term care, you can expect to spend a good chunk of change. The average semi-private room in a nursing home costs more than $6,800 per month, and if you end up spending three years in a nursing home, that comes out to nearly $250,000 on long-term care alone. In addition, Medicare typically won't cover long-term care, so you'll be left to foot this massive bill out-of-pocket.

All of these expenses can take a huge bite out of your retirement fund, so the more you can prepare for them ahead of time, the better off you'll be.

How to prepare for healthcare in retirement

It can be challenging to prepare for medical expenses because nobody knows exactly how much care they'll need in retirement. You may never need long-term care and can get by spending only on Medicare premiums and other routine costs, in which case your healthcare expenditures will be minimal. Or you may develop costly health problems and may end up needing several years of long-term care, which could lead to hundreds of thousands of dollars in out-of-pocket costs.

Although you can't prepare for every expense you'll face, it's a good idea to plan for everything, just in case. First, think about how much you'll be paying for Medicare coverage. Original Medicare consists of Part A and Part B. Retirees typically won't pay a premium for Part A coverage, but you will face a deductible of $1,408 per benefit period. For Part B, the standard premium is around $144 per month and the deductible is $198 per year.

Keep in mind, however, that Original Medicare does not cover routine dental or vision care (which includes teeth cleanings, fillings, yearly eye exams, prescription glasses, etc.), nor does it cover prescription drugs. For this type of coverage, you'll need to enroll in a separate plan such as Medicare Part D or a Medicare Advantage plan -- which will be an additional cost.

To prepare for long-term care, you have a couple of options. First, you could sign up for long-term care insurance. This type of insurance could greatly reduce the amount you'll pay out-of-pocket if you end up needing long-term care, but it can be pricey -- especially the longer you wait to sign up. The average 55-year-old couple can expect to pay around $2,500 per year in premiums, according to the American Association for Long-Term Care Insurance, but the older you are when you sign up, the more you'll pay.

Another option to help pay for medical expenses is to start saving in a health savings account (HSA). A HSA is similar to a retirement account in that you can invest your money, let it grow for years, then withdraw it during retirement. However, there are extra tax benefits with an HSA: Not only are your contributions tax-deductible upfront, but your withdrawals are also tax-free as long as the money goes toward medical expenses.

Healthcare expenses certainly aren't the most exciting aspect of retirement, which makes them easy to overlook as you're planning. But if you don't account for these costs, it could come back to hurt you later. By preparing the best you can now, you'll ensure healthcare expenses won't catch you off guard.