Can I contribute to an HSA while on Medicare?
The rule itself is one sentence. The part that costs people money is the six-month backdate on Part A — which means the last month you could legally contribute has usually already passed by the time anyone asks the question. Here is how to count it, and how to fix it if you counted wrong.
No. Once you are enrolled in any part of Medicare — A, B, C or D — you cannot put new money into a Health Savings Account. The IRS puts it in one line: beginning with the first month you are enrolled in Medicare, your contribution limit is zero.
That much is easy. The expensive part is the second rule, which almost nobody hears in time: when you enroll after 65, Part A is generally backdated up to six months. So the month your contributions had to stop is not the month your card arrives. It is roughly seven months before you ever file the application — a date that, for most people asking me this in August, is already in the past.
I get this question from people in Anthem, Carefree and north Phoenix more than any other tax-adjacent Medicare question, and it is almost always from someone who worked past 65 on purpose: a consultant, a business owner, somebody who kept the high-deductible plan because the HSA was the best account they had. Nothing here is tax advice — your CPA has the final word on your return — but the timing is Medicare’s, and that part I can lay out cleanly.
The six-month backdate, in plain numbers
When you sign up for Medicare after your Initial Enrollment Period — because you stayed on an employer plan, or because you simply waited — Social Security does not start your Part A on the day you file. It reaches backward, up to six months, though never earlier than the first month you were eligible. The intent is generous: nobody should sit uninsured in the gap between leaving a job and getting a Medicare card.
The side effect is not generous at all. Every month that gets swept into that retroactive window is a month you were enrolled in Medicare, which makes it a month you were not allowed to contribute. The contributions were fine when you made them and became excess afterwards, retroactively, without anyone telling you.
So the number to work with is seven, not six: six months of backdate, and then the last month you were clear.
| If you apply in | Part A generally backdates to | Last month you could contribute for |
|---|---|---|
| September 2026 | March 2026 | February 2026 |
| October 2026 | April 2026 | March 2026 |
| November 2026 | May 2026 | April 2026 |
| December 2026 | June 2026 | May 2026 |
| January 2027 (for a New Year retirement) | July 2026 | June 2026 |
Illustrative, not a determination. The backdate is "up to" six months and never reaches earlier than the month you first became eligible for Medicare — so someone who turned 65 in May 2026 cannot be backdated to March. Source: Medicare.gov, Working past 65; IRS Publication 969.
Read the bottom row again if you are planning to retire on January 1. That is the most common plan in this market, and it means the last clean contribution month was June — before the Fourth of July, in a year most people were not thinking about Medicare paperwork yet.
Two things that make it worse, and both are easy to miss:
- Employer money counts. If your employer seeds the HSA, or a wellness credit lands in it, that is a contribution in the month it is deposited. Your own payroll deferral stopping is only half the job.
- Claiming Social Security pulls Part A with it. You cannot draw Social Security at 65 or older and decline Part A. If your retirement plan involves switching on the Social Security check, it involves switching off the HSA, whether or not you thought about Medicare at all.
How the year’s limit is prorated
Stopping mid-year does not wipe out the months before. HSA eligibility is tested on the first day of each month, and the annual limit is prorated accordingly — about a twelfth of your annual maximum for each month you were an eligible individual, including the extra catch-up amount available from 55 on.
IRS Publication 969 works the example directly: someone who turned 65 in July and enrolled in Medicare is entitled to six twelfths of the year’s limit. The arithmetic is not the hard part. Knowing which months count is, and that is what the backdate table above settles.
The last-month rule is where careful people get caught
There is a provision that ordinarily works in your favor: if you are HSA-eligible on the first day of the last month of your tax year — December 1 for nearly everyone — you are treated as eligible for the whole year and may contribute the full annual amount, no proration.
It comes with a testing period. You have to stay eligible through the end of the following December. Fail it, and the contributions you were “allowed” become taxable income plus an additional 10% tax.
Now put that beside a normal Phoenix-metro retirement plan. Contribute the full amount in December 2026 on the strength of the last-month rule, retire the following spring, file for Medicare, and the backdate lands Part A somewhere in 2027 — inside the testing period. The rule that saved you a proration calculation is the rule that hands you a tax bill. If you are within about eighteen months of retiring, the last-month rule deserves a conversation with your tax advisor before you use it, not after.
What happens to the money already in the account
Nothing bad, and this is the reassuring half of the answer.
The balance is yours. There is no required distribution, no spend-by date, no account closure. It keeps growing tax-free and it keeps paying qualified medical expenses tax-free. After 65 even a non-qualified withdrawal loses only its tax-free status — it is taxed as ordinary income, without the 20% additional tax that would apply before 65.
What it will pay for on the Medicare side is broader than most people realize:
- Part B premiums — the $202.90 standard premium in 2026, and any income-related surcharge on top of it.
- Part D premiums, and Medicare Advantage premiums.
- Deductibles, copays and coinsurance — the $283 Part B deductible, the $1,736 hospital deductible per benefit period, drug costs up to the $2,100 annual cap.
- Dental, vision and hearing costs, long-term care insurance premiums within the age-based IRS limits, and the rest of the standard qualified-expense list.
And one exception that matters here: Medigap premiums do not qualify. Publication 969 excludes premiums for a Medicare supplemental policy by name. So an HSA balance pays a Medicare Advantage premium tax-free but not a Medicare Supplement premium — a genuine, if narrow, thumb on the scale in a comparison that should still be decided on doctors, drugs and risk tolerance rather than on which premium your HSA may reimburse.
Why this is worth more if your income is above the IRMAA line
For a household already paying an income-related surcharge, the HSA does something no other account does: it pays medical bills without adding a dollar to your income.
$109,000 single / $218,000 joint — where the 2026 Part B surcharge begins
IRMAA is set from your modified adjusted gross income two years back, so 2026 premiums run off your 2024 return. A qualified HSA distribution is not income and does not appear in that calculation. Pulling $2,435 from an IRA to cover a year of Part B premiums does show up — and, in a year you are near an edge, can be what moves you across it.
Sources: SSA income-related monthly adjustment amount tables and the CMS 2026 Parts A & B premiums and deductibles fact sheet, verified against the published figures.
The brackets are cliffs, not slopes — one dollar over a threshold moves the whole year’s premium up a tier. How IRMAA actually works covers the mechanics, and the IRMAA estimator will show you which tier your own numbers land in. Spending down an HSA in retirement is one of the few levers that reduces cash outlay without touching the number the surcharge is calculated from. Whether it belongs in your sequence of withdrawals is a question for your tax advisor and your financial professional — I am naming the interaction, not the strategy.
If you already over-contributed
Common, fixable, and not worth losing sleep over if you catch it.
Ask your HSA custodian for a return of excess contribution — that specific phrase, not an ordinary withdrawal. They will send back the excess plus the earnings attributable to it, and issue the paperwork your preparer needs. Do it before your tax filing deadline for that year and the 6% excise tax does not apply. Leave it sitting in the account and the IRS charges that 6% for every year it stays.
If the money came through payroll, tell your employer to stop the deferral the same day. A contribution you did not personally authorize is still your excess.
What to do in the next few weeks
The Annual Enrollment Period runs October 15 through December 7, and for anyone leaving employer coverage this fall the two decisions arrive together: what Medicare looks like on January 1, and what the HSA can still legally receive between now and then.
Three things worth doing before October:
- Pick your application month and count back seven. Not your retirement date — the month you will actually file with Social Security. Everything above hangs on that one number.
- Check what has already gone into the HSA this calendar year, employer deposits included, and compare it to the prorated limit those eligible months allow.
- Get your employer’s creditable-coverage confirmation in writing before you leave. Losing job-based coverage opens a Special Enrollment Period, and it is narrower than most people assume — eight months for Part B, two months for a drug plan, and COBRA does not extend either.
There is a north-Valley wrinkle underneath all of this, too. Plenty of people in Anthem and north Phoenix are self-employed or consulting past 65 rather than sitting on a large employer’s plan — and a small employer changes the answer entirely. Under 20 employees and Medicare generally becomes primary at 65, which means delaying Part B is not the safe choice it is at a big company, and the HSA question resolves itself much earlier than anyone planned. Which enrollment window is yours is the thing to settle first.
If you are not sure which case you are in — and after twenty-two years I can tell you most people are not — that is a fifteen-minute conversation, not an afternoon with Publication 969. Call (602) 844-6002 or book a free 30-minute call and we will work out your dates together. It costs nothing, and if the answer is that you stopped at exactly the right month, that is what you will hear.
Common questions
Can I contribute to an HSA while on Medicare?
No. Enrollment in any part of Medicare — A, B, C or D — ends your eligibility to put new money into a Health Savings Account. The IRS is explicit about it — beginning with the first month you are enrolled in Medicare, your contribution limit is zero. What does not change is the account itself. The balance stays yours, it keeps growing tax-free, and you can spend it tax-free on qualified expenses for the rest of your life.
Do I have to stop HSA contributions before my Medicare coverage starts?
Usually yes, and by about six months. If you enroll in Medicare after age 65, Part A is generally backdated up to six months — never earlier than the month you first became eligible. Any contribution covering a month that turns out to be retroactively enrolled becomes an excess contribution. Medicare.gov states it plainly — you and your employer should stop contributing six months before you retire or apply for Social Security.
When should I stop contributing to my HSA before Medicare?
Count back seven months from the month you plan to apply. If you file for Medicare or Social Security in November, Part A is likely to reach back to May, so April is the last month you could contribute for. The contribution limit is prorated by month — roughly a twelfth of your annual limit for each month you were eligible on the first day — so stopping mid-year does not disqualify the earlier months, it just shrinks the year's ceiling.
Can I use my HSA to pay Medicare premiums?
Yes, once you are 65 or older, and this is the part people underuse. HSA dollars pay Part B, Part D and Medicare Advantage premiums tax-free, along with deductibles, copays and coinsurance. The exception is a Medicare supplement — IRS Publication 969 excludes premiums for a Medicare supplemental policy such as Medigap. Advantage premiums qualify, Medigap premiums do not, and that distinction is worth knowing before you choose between the two routes.
What happens to my HSA when I go on Medicare?
Nothing happens to the money. Contributions stop, the account does not close, there is no required distribution and no deadline to spend it. After 65 a non-medical withdrawal is taxed as income but carries no additional penalty, and qualified medical withdrawals stay tax-free. What you lose is the deduction going in, not the account.
What if I already contributed too much — how do I fix an excess HSA contribution?
Ask your HSA custodian for a return of excess contribution, which withdraws the excess plus the earnings attributable to it. Do it before your tax filing deadline for that year and the 6% excise tax is avoided; leave the money in and the IRS applies that 6% for each year it remains. Your tax preparer should handle the reporting — this is one of the few Medicare-adjacent problems with a clean, ordinary fix, provided you catch it in time.