Health savings accounts are one of the few retirement tools that hand out three separate tax breaks, yet the door closes the moment Medicare begins. Federal tax rules drop an account holder’s allowed contribution to zero for every month covered by any part of Medicare, including premium-free Part A. For the growing number of Americans who keep working past 65 and stay on a high-deductible health plan through an employer, that overlap is an easy and costly error. Money added after Medicare starts is treated as an excess contribution, and the penalty compounds quietly until it is caught and corrected.
Why Medicare and an HSA cannot run side by side
An HSA is available only to someone enrolled in a qualifying high-deductible health plan who has no other disqualifying coverage. Medicare counts as that other coverage. The instant a person is entitled to and enrolled in Medicare, the eligibility test fails, and no further pretax or deductible dollars may flow into the account. This is not a soft guideline that a plan administrator might overlook. It is a bright statutory line that turns on the calendar month enrollment takes effect, regardless of whether the person still holds an employer plan alongside it.
The account itself does not disappear. Existing balances stay invested and can still be spent tax-free on qualified medical costs, including Medicare premiums for Part B, Part D and Medicare Advantage, along with deductibles and dental or vision bills. The restriction is narrow but firm: the balance can be used, but it can no longer be fed. IRS Publication 969 spells out that the contribution limit becomes zero starting the first month of Medicare coverage, a rule that catches many people who assumed the two programs could coexist.
Free retirement updates: Enrollment and claim windows come and go, and missing one can cost real money. The free Retirement Shield newsletter keeps readers ahead of the deadlines that matter. Sign up free.
The 6% penalty and the retroactive Part A trap
Contributions made after Medicare begins become excess contributions, and the Internal Revenue Service applies a 6% excise tax on the excess for each year it remains in the account. The charge is reported on Form 5329 and repeats annually until the excess, plus any earnings tied to it, is withdrawn. Removing the money before the tax-filing deadline avoids the levy for that year, but the longer a mistaken contribution sits undetected, the more the 6% stacks up.
The sharper danger is retroactive coverage. Anyone who signs up for Social Security after age 65 is automatically granted Medicare Part A, and that entitlement is backdated up to six months, though never before the month a person turned 65. A worker who kept contributing to an HSA during those months suddenly finds those deposits reclassified as excess after the fact. The paperwork looked correct at the time, but the retroactive start date rewrites the record, which is why timing the transition matters so much.
Premium-free Part A is the quiet culprit because it costs nothing and often feels harmless to accept. Many people enroll in it at 65 out of habit or on a benefits counselor’s suggestion, not realizing it ends HSA eligibility just as thoroughly as paying a Part B premium would. Once that entitlement is on the record, contributions have to stop, even if the person is still fully covered and paying for an employer high-deductible plan.
How people working past 65 can plan around it
The cleanest approach for someone staying on an employer high-deductible plan is to delay all Medicare enrollment, including Part A, while active-employee coverage continues, which preserves HSA eligibility. This works only when the employer group health plan is the primary payer, generally at firms with 20 or more employees, and it requires resisting automatic Part A sign-up. Confirming primary-payer status with the plan and Social Security before choosing to delay is the step that prevents an accidental gap.
For those who do plan to claim Social Security, the six-month backdating rule argues for stopping HSA contributions roughly half a year before filing, so no deposit lands inside the retroactive window. Contributions can also be prorated for the portion of the year before Medicare begins, letting a person capture part of the annual limit rather than none. The Medicare sign-up rules govern exactly when coverage takes effect, and that date, not the day paperwork is filed, sets the cutoff.
Employer contributions count toward the same limit, so a company match deposited after Medicare begins is just as much an excess contribution as a personal one. A spouse who is not yet on Medicare and holds a qualifying plan may keep funding a separate HSA in their own name, one route couples use to keep saving. The through-line is that eligibility is tested month by month, and the account holder, not the employer or the bank, carries the responsibility for stopping in time.
What makes this trap durable is that nothing in the system flags it. Neither Medicare nor a payroll department reliably warns a worker to shut off HSA deposits, and the excise tax surfaces only when a return is examined or an account holder does the math. The practical safeguard is to treat the Medicare start date as a hard stop on new contributions and to reconcile any deposits made in the months surrounding a Social Security claim, because the cost of missing it grows every year the excess goes unaddressed.
This article was researched and drafted with the assistance of AI and reviewed by The Money Overview editorial team.
More Financial Reading