The short answer
No. Beginning with the first month you are enrolled in Medicare, your HSA contribution limit is zero, because not being enrolled in Medicare is a requirement to contribute at all. The rule also applies to retroactive coverage, so a backdated enrollment can turn contributions you already made into excess contributions.
Say you sign up for premium-free Part A at 67, still working, still putting money into your health savings account. The coverage backdates six months. Contributions you made in good faith, when nothing was wrong with them, have just become excess.
Can I contribute while on Medicare?
No. To be an eligible individual and qualify for an HSA contribution, the IRS requires that you are not enrolled in Medicare. Enrollment ends contribution eligibility outright; it is a condition of qualifying, not a reduction. Anyone enrolled in any part of Medicare has stopped being eligible to put money in.
The account does not disappear. Eligibility to contribute ends. Those are different things, and the difference matters, which is the last question on this page.
Your employer's contributions count as contributions too. If you are still working and your employer pays into your HSA, that stops being permitted at the same moment yours does.
When exactly does it stop?
Beginning with the first month you are enrolled in Medicare, your contribution limit is zero. The cut is monthly rather than annual, so the year of enrollment splits: a prorated limit for the months you were eligible, nothing for the months after. The IRS prorates by eligible months.
Someone who enrolls mid-year therefore has a partial-year limit, not a lost year and not a full one.
The current dollar amounts change annually, so this page does not print them. IRS Publication 969 carries the figure for the year you need.
Does the rule reach backwards?
Yes, and this is the part that surprises people. The IRS states the zero limit applies to periods of retroactive Medicare coverage: if you delayed applying and your enrollment is later backdated, any contributions made during that retroactive period are considered excess. Call it the Backdate Trap, because the damage is dated before the decision.
The Backdate Trap is the two agencies read together. Medicare says premium-free Part A can be signed up for at any time after 65 and that coverage starts 6 months back from when you sign up, never earlier than the month you turned 65. The IRS says retroactive coverage zeroes the limit for those same months. Neither agency states the combination.
The timing is the trap, and it has three moving parts.
| What happens | When it takes effect | What it does to contributions |
|---|---|---|
| Medicare starts | The month your coverage begins | Contributions must stop |
| Part A backdates | Up to 6 months before you applied | Contributions in those months become excess |
| You keep contributing | After coverage began | The excess carries a tax consequence |
The middle row is the one nobody expects. Applying late does not protect the months in between, because Part A can reach back and cover them.
Together they mean signing up for Part A can retroactively disqualify contributions you made months earlier, in good faith, when nothing was wrong with them at the time.
That is why the timing of a Part A application matters to anyone still funding an HSA.
What if I already contributed?
Contributions made during a period of retroactive Medicare coverage are treated as excess contributions. Excess contributions have their own defined treatment in the tax rules rather than being simply forgiven, so the position is recoverable but not automatic. Publication 969 sets out what happens to them.
This is the point to involve whoever prepares your tax return, before the return is filed rather than after.
Discovering it late is the expensive version. Discovering it in the same tax year, while there is still time to act, is the manageable one.
Does Part A alone count?
Yes. The IRS condition is not being enrolled in Medicare, and it does not carve out Part A. Many people take premium-free Part A at 65 while continuing to work and keep their employer plan, assuming that only Part B would affect anything. Part A alone is enough to end HSA contribution eligibility.
This is the most common version of the mistake among people still working past 65.
Anyone planning to keep contributing to an HSA past 65 has to weigh that against taking Part A at all, which is a decision to make with the facts in front of you rather than by default.
Can I still spend the balance?
Being enrolled in Medicare stops contributions going in. It does not touch the money already in the account, and it does not stop you using it. The HSA keeps working as an account for qualified medical expenses after enrollment; what ends is the ability to add to it.
So the planning question is never whether the account survives. It does.
The question is how much you want in it before the door on contributions closes, and when that door closes for you.
Medicare states the safe timing plainly, and it is earlier than most people expect.
If you have a Health Savings Account, you and your employer should stop contributing 6 months before you retire or apply for benefits from Social Security or the Railroad Retirement Board. That is the step Medicare says avoids a tax penalty.
The reason sits in the backdating. At 65 or older, Part A coverage starts up to 6 months back from the date you sign up for Medicare or apply for those benefits. You are not eligible to contribute once you have Medicare, so if that backdated coverage overlaps months you contributed, you may owe a tax penalty.
One thing does not stop. You can withdraw money from the account after you sign up for Medicare, to help pay your share of costs such as deductibles, premiums, coinsurance or copayments.
What this means for you
If you are working past 65 and still funding an HSA, the date you apply for Part A is a financial decision, not just an administrative one. Watch the Backdate Trap: a Part A application can reach six months into your past and turn good contributions into excess ones.
For a household, this is a quiet one. Nobody sends a letter. The couple find out when a tax return is being prepared, often for a year they have already stopped thinking about.
FAQ
Does taking only Part A stop my HSA contributions?
Yes. The IRS condition for contributing is that you are not enrolled in Medicare, and it does not make an exception for Part A on its own. This catches many people who keep working past 65, take premium-free Part A because it appears to cost nothing, and keep their employer plan and their HSA running alongside it.
Part A by itself is enough to end contribution eligibility. If continuing to fund an HSA matters to you, the decision about whether to take Part A at 65 has to be made with that in mind rather than treated as automatic.
The rule is written as a condition of being eligible at all: to qualify for an HSA contribution you must not be enrolled in Medicare (W17), and no part of Medicare is carved out of that.
When does the limit actually drop to zero?
Beginning with the first month you are enrolled. The rule works month by month rather than as an all-or-nothing annual test, so in the year you enroll you keep a prorated limit covering the months you were eligible and nothing for the months afterwards.
The IRS prorates by eligible months and gives a worked example in Publication 969. The current year's dollar figures change annually, which is why this page does not print them; take them from Publication 969 for the year you need.
The cut is monthly rather than annual. Beginning with the first month you are enrolled your contribution limit is zero (W18), and the limit for that year is prorated by the months you were eligible rather than lost entirely (W21).
How can contributions I already made become a problem?
Because the zero limit applies to periods of retroactive Medicare coverage. Premium-free Part A can be signed up for at any time after 65, and that coverage backdates up to six months, though never earlier than the month you turned 65. If your enrollment is backdated across months in which you contributed, the IRS treats those contributions as excess.
Nothing was wrong with them when they were made. The application changed their status afterwards, which is what makes this rule so easy to walk into. The zero limit applies to periods of retroactive Medicare coverage (W19). So if you delayed applying and your enrollment is later backdated, contributions made during that retroactive period are treated as excess (W20).
What happens to excess contributions?
They are treated as excess rather than quietly ignored, and the tax rules set out specific handling for them, described in Publication 969. The practical point is that the situation is recoverable but not self-correcting, and the sooner it is found the more straightforward the fix.
If you think this may have happened to you, raise it with whoever prepares your return before the return is filed, not after, and take the figures from the IRS publication rather than from a summary.
Excess contributions have their own treatment in the tax rules (W22) rather than being forgiven, so the position is recoverable but not automatic. Publication 969 sets out what happens to them.
Can I still use the money in my HSA after I enroll?
Yes. Enrolling in Medicare stops new contributions going in; it does nothing to the balance already there and does not stop you spending it on qualified medical expenses. The account continues to function. This distinction matters because people sometimes rush contributions or make decisions about the account itself under the impression that the whole thing closes at 65.
It does not. Only the ability to add money ends. Enrollment ends the ability to put money in and touches nothing already there. The condition in the rule is about qualifying to contribute (W17), not about holding or spending the account, and the balance keeps working for qualified medical expenses.
What about my employer's contributions?
An HSA may receive contributions from an eligible individual or from another person on their behalf, including an employer. The eligibility test governs the account holder, so once you are enrolled in Medicare and your limit is zero, employer contributions are caught by the same limit rather than sitting outside it.
If you are working past 65 with an employer who contributes to your HSA, tell your benefits administrator when you enroll, because contributions arriving after that point create the same excess problem.
They stop at the same moment yours do, because the limit itself is what goes to zero from the first month you are enrolled (W18). The rule caps the account, not the person paying into it.




