If you're close to retirement age, you have no doubt started thinking a lot about what you'll need to do when the magic date arrives. One area that many people don't think about enough is the cost of healthcare during their retirement years.

If you're about to retire, don't underestimate how much healthcare might cost you. Here are several things to consider.

A retired couple holding hands in a restaurant.

Image source: Getty Images.

Medicare is just a start

A Fidelity study found that a 65-year-old couple retiring in 2016 would need around $260,000 to cover their healthcare costs in retirement. That figure will probably be higher for couples retiring this year and afterward. 

One key thing to note about the Fidelity study: It assumed the retiring couple was enrolled in traditional Medicare Parts A and B as well as Medicare Part D. Medicare Part A, which covers hospital care, is free for most people. However, Medicare Part B, which covers many types of physician services, outpatient therapy, and durable medical equipment, isn't free. Neither are Medicare Part D prescription-drug plans.

Around one-third of Fidelity's estimated retirement healthcare cost was for Medicare premiums. The remaining two-thirds was needed for deductibles, out-of-pocket payments, and services that Medicare doesn't cover. If you're near retirement, keep in mind that Medicare is just a start when it comes to meeting your healthcare needs. 

Healthcare needs that are easily overlooked

What types of healthcare services aren't covered by Medicare? One biggie is dental care. While Medicare Part A will pay for some dental services provided to patients when they're in a hospital, the program doesn't cover for most dental care, including cleanings, fillings, tooth extractions, and dentures. 

If you had vision insurance while employed, you probably were accustomed to getting annual eye exams at little to no cost. You perhaps also obtained eyeglasses and contact lenses at lower costs than if you had to pay the full price out of pocket. That won't happen with Medicare. Although Medicare Part B will help pay for annual eye exams for diabetic retinopathy (if you're diabetic) and for corrective lenses following cataract surgery that implants an intraocular lens, that's about it. 

Hearing aids aren't covered by Medicare at all. Neither are the exams required for fitting hearing aids. And, of course, Medicare won't pay a penny for cosmetic surgery or non-traditional healthcare services such as acupuncture. 

Prescription-drug costs can be a big component of healthcare spending during retirement. Know that not every Medicare Part D prescription drug plan is alike. A drug covered by one plan might not be covered by another. Even if the drug is covered, your deductibles and out-of-pocket costs could be quite different from plan to plan.

The high cost of long-term care

Perhaps the biggest healthcare cost not addressed by Medicare is long-term care. Medicare Part A will pay for all skilled-nursing costs during the first 20 days following a qualified hospital stay. The program will also cover part of the costs for the next 80 days after the initial 20-day period. After that, though, you're on your own.

According to a study conducted by Genworth, the median monthly cost in 2016 for home health was over $3,800. The median monthly cost for a semi-private room in a nursing home was more than $6,800 -- nearly $82,000 per year.

Those are the costs now. People retiring in 2017 might not need long-term care for another 20 years. Genworth created a calculator to estimate long-term care costs in 2036. Home health is projected to cost around $6,900 per month then, while a semi-private room in a nursing home is expected to cost $12,361 per month (over $148,000 annually).

What you can do

Medicare should be a cornerstone of your healthcare planning. Definitely enroll in Medicare Part B and Part D prescription-drug plans. Make sure you pay close attention to the drugs covered and their costs in the prescription-drug plans, especially if you have a chronic disease like diabetes or multiple sclerosis.

If you're still several years away from retirement, consider putting money into a health savings accounts (HSA). HSAs are a great way to save for medical expenses. Contributions are tax-free. Your money grows tax-free. Withdrawals used for medical care are also tax-free.

There are a couple of things to note with HSAs, however. They must be linked to a high-deductible health plan, which could mean you'll have to spend more out of pocket than you would with another insurance plan. Also, you can't contribute to an HSA if you're enrolled in Medicare.

Consider purchasing long-term care insurance if your income in retirement won't cover at least three years of long-term care. If you do buy long-term care insurance, make sure you have an inflation rider so that your benefits increase as costs increase. Another option is a hybrid life/long-term care insurance policy, which combines long-term care insurance with permanent (or whole) life insurance.

The most important thing that you can do before you retire is to be aware of potential healthcare costs and plan in advance to address them. The earlier you begin to plan, the better off you'll be.