Medicare Ends HSA Contributions, Sometimes Retroactively
An HSA is the most tax-favoured account in the American system, and the instinct to keep funding it as long as possible is a sound one. But eligibility ends the month Medicare begins, and Medicare can begin before you signed up for it β Part A is commonly backdated up to six months. Contributions made in those retroactive months were never allowed, and the error surfaces long after it is made.
- The answer:: Medicare enrolment in any part ends HSA contribution eligibility from that month. It does not affect the existing balance, which remains yours and remains spendable tax-free.
- The backdating:: Enrol after 65 and Part A is generally made effective retroactively, up to six months earlier. Those months become ineligible after the fact.
- What goes wrong:: Contributions made during the retroactive months are excess contributions β not deductible, and subject to a 6% excise for every year they stay in the account.
- The fix, and the prevention:: Withdraw the excess and its earnings before the filing deadline. To avoid it entirely, stop contributing six months before the month you intend to claim Social Security or enrol.
Where the AI summary above gets this wrong
"You can keep contributing to your HSA as long as you are still working and covered by a high-deductible health plan."
That's surface-true. Here's what it misses:
- Medicare enrolment overrides the plan you have β Being covered by a qualifying high-deductible plan is necessary but not sufficient. Enrolment in any part of Medicare ends eligibility for that month regardless of your employer coverage, so someone working at 67 with excellent coverage may still be barred.
- Claiming Social Security enrols you automatically β At 65 or later, claiming benefits enrols you in Part A whether or not you asked. People who intended to defer Medicare discover they were enrolled the day their first benefit payment arrived.
- The six-month backdating makes it retroactive β The advice to stop contributing when you enrol is a month too late. Because Part A is generally backdated up to six months, the months to stop contributing are the six before enrolment, not the ones after.
01 The eligibility rule, and what it does not touch
To contribute to an HSA in a given month you must be covered by a qualifying high-deductible health plan and have no other disqualifying coverage. Medicare is disqualifying coverage. From the month your Medicare begins, in any part, you can no longer contribute.
What this does not do is touch the balance. Money already in the account stays there, keeps its tax treatment, and can be spent tax-free on qualified medical expenses indefinitely. After 65 it can also be withdrawn for anything at all, taxed as ordinary income with no penalty β so the account remains useful long after the last contribution.
It is also worth knowing that Medicare premiums are themselves a qualified expense. Part B and Part D premiums can be paid from the HSA tax-free, which is often the most efficient use of the balance in the years that follow.
Source: Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans
02 Where the six months comes from
If you enrol in Medicare after your initial enrolment period β which is what people working past 65 typically do β Part A coverage is generally made effective retroactively, up to six months before the month you apply, and no earlier than the month you turned 65.
The backdating is meant as a kindness, giving coverage for care already received. Its side effect is that six months of apparently ordinary HSA contributions are reclassified as ineligible after the fact. Nothing warns you at the time, because at the time nothing is wrong.
The same mechanism catches people through Social Security. Claiming benefits at or after 65 enrols you in Part A automatically. Someone who deliberately deferred Medicare to keep contributing, then claimed benefits, has enrolled without intending to β which is one more reason the claiming decision reaches further than the benefit itself.
Source: About Form 5329, Additional Taxes on Qualified Plans
03 Unwinding an excess, and timing the stop
An excess contribution is not a disaster if caught. Withdraw the excess amount together with the earnings attributable to it before the due date of your return, including extensions, and the 6% excise is avoided. The earnings come out as taxable income; the contribution itself was never deductible.
Leave it in place and the 6% applies for each year the excess remains, reported on Form 5329. It is not a one-off charge, which is what makes an unnoticed excess expensive over several years.
Prevention is simply arithmetic. Decide the month you intend to enrol or to claim Social Security, count back six months, and stop contributing then. If you contribute through payroll, the instruction has to reach your employer in time β a deduction that runs one cycle too long is the most common way this happens at all.
Shows: what contributions made during the retroactive Medicare period cost if they are not withdrawn β income tax on amounts that were never deductible, plus the 6% excise. Ignores: earnings on the excess, which must also come out, and that the excise repeats each year the excess stays.
This one is almost purely administrative, which is why it catches careful people. Nobody makes a bad judgement here β they make a correct contribution in March and it becomes an incorrect one in September, because a form they filed reached back and changed the past. If you are over 65 and still contributing, the only question worth asking is when you expect to enrol or claim, and then stopping six months before that. It is a calendar problem wearing the costume of a tax problem.
FAQ
Can I contribute to an HSA after enrolling in Medicare?
No. From the month your Medicare coverage begins, in any part, you are no longer eligible to contribute. The existing balance is unaffected and can still be spent tax-free on qualified expenses, including Medicare Part B and Part D premiums.
Why are my contributions an excess if I only just enrolled?
Because Part A is generally backdated up to six months when you enrol after your initial enrolment period. Those retroactive months become ineligible after the fact, which turns contributions that were correct when made into excess contributions.
How do I fix an excess HSA contribution?
Withdraw the excess and the earnings attributable to it before your return's due date, including extensions, and the 6% excise is avoided. If it stays in the account, the 6% applies for each year it remains and is reported on Form 5329.
Sources
Regulator references
- Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans Β· Internal Revenue Service Β· 2025Eligibility to contribute, and why Medicare enrolment ends it.Last verified: 2026-09-07
- About Form 5329, Additional Taxes on Qualified Plans Β· Internal Revenue Service Β· 2025Where the excise tax on an excess contribution is reported.Last verified: 2026-09-07
- Publication 502, Medical and Dental Expenses Β· Internal Revenue Service Β· 2025What the balance can be spent on tax-free once contributions have stopped.Last verified: 2026-09-07
Calculator unit tests Β· the assertions this page's worked example is checked against, and their last result
Changelog
- 2026-09-07 β initial publish (new format)
Run this rule against your situation
See what this rule does to your own projection β month by month, to age 90.
Join the Waitlist