No retirement plan is complete without allowing for healthcare. We all hope to remain healthy in our old age, but you can't be sure. And a single unplanned medical expense could cost thousands of dollars, forcing you to drain your retirement savings faster than anticipated.

Medicare is an integral part of most retirees' healthcare plans, but many rely upon it too much. According to TD Ameritrade, 44% of people believe it will cover the bulk of their medical expenses in retirement, but this may be overly optimistic. Medicare, like all health insurance, charges premiums and deductibles, and there are some services it doesn't cover at all. If you don't have the savings to cover these out-of-pocket costs, you could be in trouble. Below, I explain Medicare's costs and benefits and the role it should play in your retirement healthcare plan.

Doctor talking to older man about healthcare

Image source: Getty Images.

How Medicare works

You're eligible for Medicare as soon as you turn 65. It's broken down into four parts: A, B, C, and D. Part A is hospital coverage, which covers hospital stays, nursing care, and some home health services. You likely won't have to pay a premium for this coverage as long as you or your spouse paid Medicare taxes for 40 quarters (10 years) while working. However, there is a $1,364 deductible, and you may have to pay for some coinsurance if you're in the hospital for more than 60 days.

Medicare Part B covers doctor visits, lab tests, X-rays, outpatient procedures, and more. Most people pay the standard $135.50 monthly Medicare Part B premium, though yours could be higher depending on your income. You'll also have a $185 deductible for Part B each year, and you must pay 20% of all costs on your own.

Medicare Part C plans are offered by private health insurers. By law, they must cover at least the same services as Medicare Parts A and B, but they may cover other things as well. It's also up to the insurer to determine premiums, deductibles, and copays. If you choose a Part C plan, also known as a Medicare Advantage plan, you pay for this coverage instead of Parts A and B.

A Medicare Part D plan is also offered by private insurers and covers prescription drugs. It's optional, but it could save you money, especially if you regularly take prescriptions. You'll pay a premium and possibly a deductible and copayments, but the exact cost depends on which Part D plan you choose.

What Medicare doesn't cover

Medicare will cover a lot of your medical expenses in retirement, but as I explained above, it covers few expenses in full. There are also some expenses it doesn't cover at all, including long-term care, dental work, hearing aids, eye exams, and dentures.

If you require these services, you must pay the full cost on your own, unless you have a supplemental health insurance policy. Medigap plans are available through private insurers and cover many of the services that Medicare Parts A and B don't cover. Some even cover the Medicare deductibles and coinsurance you'd otherwise pay on your own. However, the Medigap policy will have its own premiums, deductibles, and coinsurance you must pay instead.

Medicare's role in your retirement healthcare plan

Medicare is a key piece in most retirees' healthcare plans, but it shouldn't be all you've got. You can purchase a supplemental health insurance policy to help cover what Medicare doesn't, or you can budget for your out-of-pocket costs on your own. The average 65-year-old couple retiring today will need $280,000 to cover their medical expenses in retirement, according to Fidelity. Use this as your starting point. You may want to add to this if you anticipate high medical costs or if you're far off from retirement to account for inflation. Medical costs have increased by an average of 3.3% per year since 2013, but they rose by an average of 5.7% per year over the decade before that, so it's best to figure high.

You can save this money in your 401(k) or IRA. Or if you have a high-deductible health insurance plan -- one with a deductible of $1,300 or more for an individual or $2,700 or more for a family -- you can save with a health savings account (HSA). Contributions to an HSA reduce your taxable income that year, and if you use the money for a qualified medical expense, you won't pay any taxes on it. If you use it for a nonmedical expense, though, you must pay income tax, plus a 10% penalty if you're under 65. In 2019, individuals can contribute up to $3,500 to an HSA, and families can contribute up to $7,000. You can contribute an extra $1,000 if you're 55 or older but not yet enrolled in Medicare.

You can never predict how much money you'll need for retirement healthcare expenses, but you don't want to gamble and fall short. If your existing retirement plan doesn't include healthcare costs, reevaluate it. It's a lot easier to adjust your savings now than it will be to find extra cash in retirement.