Why HSAs and Medicare Don't Mix
A Health Savings Account is one of the best tax deals in American personal finance — contributions go in pre-tax, grow tax-free, and come out tax-free for medical expenses. But the law only allows contributions while you're covered by a qualifying high-deductible health plan and no other health coverage. Medicare counts as other coverage. The moment you're enrolled in any part of Medicare — even premium-free Part A — you're no longer allowed to contribute.
You can keep the account forever, keep investing it, and keep spending it tax-free on qualified medical costs, including Medicare premiums, deductibles, and copays. Only new contributions stop. For most people that's a minor adjustment. The trap is in the timing.
The Six-Month Lookback, Explained
When you enroll in Part A after age 65 — which typically happens automatically the moment you file for Social Security benefits — your Part A effective date is backdated up to six months (but never earlier than your 65th-birthday month). The government does this so late filers don't have gaps in hospital coverage. The side effect: any HSA contributions made during those backdated months become retroactively improper.
Picture a 67-year-old who works through June, contributes to her HSA through May, files for Social Security in July. Her Part A enrollment is backdated six months to January — and suddenly her January-through-May contributions happened while she 'had Medicare.' Excess contributions that aren't withdrawn in time face a 6% excise tax per year they remain in the account.
How to Time It Cleanly
The fix is simply planning the stop date: count six months back from when your Part A will take effect, and stop HSA contributions before that window opens. If you know you'll file for Social Security or enroll in Medicare in July, your last clean contribution month is likely December of the prior year — and your final-year contribution limit gets prorated by the months you were eligible.
If you've already over-contributed, it's fixable: ask your HSA custodian for an 'excess contribution withdrawal' of the extra amount plus its earnings before your tax-filing deadline, and the excise tax never applies. Your tax preparer handles the paperwork; the important part is catching it in the same tax year rather than years later.
- Working past 65 with employer HDHP coverage and want to keep contributing? Delay ALL of Medicare — including Part A — which usually means delaying Social Security too
- Six months before you plan to enroll or file, stop contributions
- Prorate your final year's contribution limit by eligible months
- Already enrolled? Stop contributions now, but keep spending the account tax-free — including on Medicare premiums
Where This Fits in the Bigger Working-Past-65 Decision
The HSA rule is one piece of the larger question of whether to enroll in Medicare while still working — which also involves employer-size rules, Part B timing, and penalty avoidance. We covered that decision in Working Past 65: Do You Actually Need to Enroll?, and the two articles together cover most of what a working 65-plus household needs.
If your situation has moving parts — a working spouse on your HDHP, uneven retirement dates, Social Security timing — this is a fifteen-minute conversation with a licensed advisor that can prevent a genuinely annoying tax cleanup. No cost, no pressure, and we do this exact math regularly.
Free Consultation
Have Questions About Your Situation?
Every Medicare situation is different. Our Wyoming and Utah advisors provide free, personalized guidance — no pressure, no obligation.