People who retire early often can't wait to turn 65 so they can sign up for Medicare. But enrolling in Medicare at age 65 may not automatically be the right move for you. In some cases, delaying enrollment could make a world of financial sense.

How Medicare enrollment works

Medicare eligibility begins at age 65, but you can sign up for coverage a little bit ahead of your 65th birthday. Your initial seven-month enrollment window begins three months before the month you turn 65 and ends three months after that month.

A person at a laptop.

Image source: Getty Images.

It's a good idea to enroll in Medicare during that initial seven-month window if you don't have group health coverage at the time. Not only will that help ensure that you can get coverage as soon as you turn 65, but it could also help you avoid costly penalties that make Medicare more expensive for life.

For each 12-month period you fail to enroll in Medicare when you were initially eligible to do so, you'll face a 10% penalty or surcharge on your Part B premiums that remain in effect throughout retirement. That surcharge, however, is waived for people who don't sign up for Medicare at age 65 because they're covered by a qualifying group health plan at work, which generally means having 20 covered employees or more.

As such, if you're happy with your group health plan at work (or a health plan you have access to via your spouse's job), you may want to delay your Medicare enrollment for that reason alone. But there's an even bigger reason to consider delaying Medicare past 65 -- and it's if you're in the habit of funding a health savings account, or HSA.

The great thing about HSAs is that they're funded with pre-tax dollars, which gives you immediate savings. HSA funds can then be invested for added growth, and those gains are tax-free, along with withdrawals used to cover qualifying healthcare expenses.

But once you enroll in any part of Medicare, you can no longer fund an HSA. If you want the option to keep contributing to one of these accounts, then it pays to hold off on enrolling in Medicare if you're able to do so without incurring a penalty.

Consider your options carefully

Some people with qualifying group health coverage through their jobs opt to enroll just in Medicare Part A at age 65 since there's no cost to doing so (whereas Part B has a monthly premium). The upside of doing this is getting Part A to serve as secondary insurance for hospital care. To put it another way, if you're left with certain out-of-pocket costs for a hospital stay under your group health plan through work, Part A might cover some of those costs so you don't have to pay yourself or pay in full.

But remember, even if you're not paying for Medicare by only enrolling in Part A, you'd still be unable to contribute funds to an HSA. If that's a priority for you and you have a group health plan to fall back on, you may want to hold off on signing up for Medicare until you separate from your employer or your group health coverage goes away -- whichever happens first.

Incidentally, funds in an HSA can be used to cover a host of expenses you incur as a Medicare enrollee -- so don't worry that your money will go to waste once you're on Medicare. It's simply that you can't contribute to an HSA while enrolled in Medicare, which is why signing up at age 65 doesn't always make sense.