Medicare and Your HSA – When to Stop Contributing
By Matt Temmen, Springfield, MO · Updated 2026-10-19
If you have a Health Savings Account and you're getting close to Medicare, here's the rule:
Once you're enrolled in any part of Medicare, you can't put new money into your HSA.
That part's simple. The tricky part is the timing. Premium-free Part A can be backdated up to 6 months. So you may need to stop contributing before you sign up.
You can still spend the money that's already in there. Let's walk through it.
The mental model: the faucet and the bucket
Think of your HSA as a bucket with a faucet.
The faucet is new contributions. Medicare turns the faucet off.
The bucket is the money already saved. That stays yours. You can keep using it for qualified medical costs, even after Medicare starts.
So Medicare shuts off the faucet. It doesn't take away the bucket.
The analogy: the backdated lease
Imagine signing a lease today, and the landlord says it officially started six months ago. Anything you did in that apartment over the past six months now counts as being under that lease.
Part A can work like that. If you sign up after 65, premium-free Part A can start up to 6 months back. It can't start earlier than the month you turned 65.
The IRS says your HSA contribution limit is zero starting with the first month you're enrolled in Medicare, and that includes backdated months. So money you put in during those 6 backdated months becomes an excess contribution.
Who this affects
Mostly folks who are still working past 65, covered by a job-based high-deductible health plan, and contributing to an HSA.
If you're in that spot, you may be able to delay Medicare without a penalty. Whether you can depends on your employer's size and your coverage. My article on working past 65 covers that part.
The timeline I'd use
Say you plan to retire and sign up for Medicare in August.
- Count back 6 months. Stop HSA contributions by February.
- Tell your payroll or HR department so they stop contributions too. That includes any employer deposits.
- Apply for Medicare when you're ready.
- Part A may start as early as February. Since contributions stopped, you're clean.
Social Security's own guidance says to stop contributing to your HSA at least six months before you apply for Medicare. CMS says the same.
Social Security benefits trigger it too
Here's one people miss.
If you start Social Security benefits after 65, you'll generally be enrolled in premium-free Part A. That Part A can be backdated too. That's why CMS says to stop HSA contributions 6 months before applying for Medicare or Social Security benefits.
So if you plan to keep contributing to an HSA, you also need to hold off on claiming Social Security.
Already contributed during a backdated month?
Don't panic. The IRS says you can withdraw the excess contributions, plus any earnings on them, without the excess-contribution penalty. You need to do it by your tax filing deadline, including extensions. The withdrawal is included in your income for tax purposes.
This is a tax question, so loop in your tax professional or HSA administrator. They'll know how to handle it cleanly.
What about the year you enroll?
In the year Medicare starts, your HSA limit is generally figured month by month. You can contribute only for the months before Medicare kicks in. The IRS gives an example in Publication 969. Ask your tax pro to run your exact number.
Using your HSA after Medicare starts
This is the good news. Your bucket keeps working.
According to the IRS, once you're 65 or older, you can use HSA money tax-free for things like:
- Medicare Part B premiums
- Medicare Part D premiums
- Medicare Advantage premiums
- Deductibles, copays, and other qualified medical costs
One big exception: Medicare Supplement premiums don't count as a qualified expense for HSA purposes.
Things I'd do (and never do)
- I'd stop HSA contributions 6 months before applying for Medicare. Put that date on the fridge.
- I'd tell HR in writing so employer contributions stop too.
- I'd max out my contributions in the months I'm still eligible, if it fits my budget and my tax pro agrees.
- I'd never start Social Security without thinking about my HSA. It can trigger backdated Part A.
- I'd never pay Medicare Supplement premiums from my HSA. They don't count as qualified.
Retiring with an HSA? Let's line it up
We'll map your Medicare start date and help you plan when to stop contributions. Then we'll help you pick coverage that fits. For the tax side, bring your tax pro into the loop.
Call (417) 633-7200, or visit our Springfield office or Wildwood office.
Turn off the faucet on time. Keep the bucket.
— Matt
Frequently asked questions
Can I contribute to an HSA after I enroll in Medicare?
No. The IRS says your contribution limit is zero starting with the first month you're enrolled in any part of Medicare, including backdated months.
When should I stop contributing to my HSA before Medicare?
Social Security and CMS both say to stop at least 6 months before you apply for Medicare. Premium-free Part A can be backdated up to 6 months, but not earlier than the month you turned 65.
Can I still use my HSA money once I have Medicare?
Yes. You can keep using the money already in your HSA for qualified medical expenses. After 65, that includes Part B, Part D, and Medicare Advantage premiums.
Can I use my HSA to pay Medicare Supplement premiums?
No. Medicare Supplement premiums aren't a qualified medical expense for HSA purposes.
What if I accidentally contributed after my Medicare started?
The IRS lets you withdraw excess contributions and their earnings without the excess-contribution penalty if you do it by your tax filing deadline. Talk to your tax professional.
Get a free plan review
Tell us how to reach you. A local advisor will call, usually the same business day.
Thanks, , we've got it.
A local advisor will call you at , usually the same business day. Can't wait? Call (844) 348-4138.
No cost, no obligation. We never sell your information.
Talk to a Medicare advisor near you
We’ll compare plans that fit your doctors, prescriptions, and budget, then explain the tradeoffs in plain English. There’s no cost for our help.