
You cannot make HSA contributions beginning the first month you are enrolled in any part of Medicare, though existing HSA funds remain usable for qualified expenses. IRS Publication 969 sets that rule, and Medicare explains how retroactive enrollment can backdate your Medicare start date, turning recent contributions into taxable excess. This guide is designed to help you time the switch correctly.
TL;DR:
- You cannot make new HSA contributions once you are enrolled in any part of Medicare, even if enrollment is retroactive for several months.
- Many people unknowingly make excess contributions due to Medicare Part A retroactive backdating, which can happen up to six months after applying.
- Stopping HSA contributions six months before your expected Medicare start date is recommended to avoid penalties caused by retroactive enrollment.
- HSA funds remain available for tax-free use on qualified medical expenses, including most Medicare costs and premiums, but not on Medigap premiums.
- Proper documentation and early coordination with your benefits administrator or a Medicare planner can prevent costly excess contributions and simplify corrections.
Table of Contents
- What happens to your HSA when you enroll in Medicare
- Timing and the 6-month guidance: when to stop contributing
- Which expenses you can pay from HSA after Medicare enrollment
- Medigap premiums and other insurance exceptions
- Working past 65 and special enrollment periods
- Tax consequences and how to correct excess HSA contributions
- Practical next steps checklist for turning 65
- How a certified Medicare planner helps you avoid HSA mistakes
- Get help timing your Medicare enrollment
- Sources
- FAQ
What happens to your HSA when you enroll in Medicare
Your HSA does not close or lose its funds when you sign up for Medicare. What changes is your ability to add money to it. Under IRS Publication 969, your contribution limit drops to zero starting the first month you are enrolled in any part of Medicare, whether that is Part A, Part B, or both. Contributions made for months after that point count as excess contributions and are subject to tax.
The account itself stays fully functional for spending. You can keep drawing on the balance, tax-free, for qualified medical expenses for the rest of your life.
The complication most people miss is retroactivity. When you enroll in Medicare after your initial eligibility window, coverage can be backdated, sometimes by several months. That backdating is what quietly creates excess contributions:
- Medicare Part A enrollment can apply retroactively up to six months once you file for benefits.
- Any HSA contribution made during those backdated months becomes an excess contribution.
- The account keeps earning and paying out normally; only new deposits are restricted.
Timing and the 6-month guidance: when to stop contributing
Getting the timing right matters more than almost anything else in this transition. Your Medicare enrollment date depends on how and when you apply, and that date determines your last eligible contribution month.
- If you apply for Social Security before or at age 65, Part A enrollment is typically automatic and starts the month you turn 65.
- If you delay applying for Social Security and then sign up for Medicare later, Part A can be applied retroactively for up to six months, per Medicare.gov.
- If you are still working and covered by an employer group health plan, you may be able to delay Medicare entirely and keep contributing.
This is why many HR and benefits teams tell employees to stop HSA contributions six months before their planned Medicare start date rather than waiting for the actual enrollment confirmation. It is a buffer against exactly the backdating problem described above. Someone who applies for Medicare in July, for instance, might find Part A applied retroactively to January, which would make every contribution made from January through June an excess contribution that needs correcting.
Which expenses you can pay from HSA after Medicare enrollment
Once contributions stop, your HSA becomes a spending account rather than a savings vehicle, and the list of tax-free uses is broader than most people expect. AARP confirms you can keep using HSA funds tax-free for qualified expenses and for specific Medicare premiums, even though you can no longer add new money.
Money already in the account can be used tax-free for:
- Deductibles, copays, and coinsurance across Medicare Parts A, B, and D.
- Medicare Part B premiums, deducted directly or paid out of pocket.
- Medicare Part D prescription drug plan premiums.
- Medicare Advantage plan premiums.
- COBRA premiums, when applicable, and qualified long-term care premiums up to IRS-set limits.
Confirm any borderline expense against IRS Publication 502 or with your HSA custodian before drawing funds, since not every insurance-related cost qualifies.
Medigap premiums and other insurance exceptions
This is where most confusion lands. Medicare Supplement, better known as Medigap, is not on the approved list. AARP notes that while Part B, Part D, and Medicare Advantage premiums qualify for tax-free HSA withdrawals, Medigap premiums generally do not.
The distinction comes down to how the IRS classifies each type of coverage. Part B, Part D, and Medicare Advantage are treated as qualified medical insurance for HSA purposes. Medigap is treated differently because it supplements Original Medicare rather than replacing it, and the IRS excludes most supplemental premium payments from the tax-free list. If you carry a Medigap policy, plan to pay that premium from regular income, not your HSA.

Working past 65 and special enrollment periods
Plenty of people keep working well past 65, and that changes the calculation. If you have employer group health coverage through an active job, you can typically delay Part B without penalty. Medicare.gov confirms you generally get an 8-month Special Enrollment Period after that employer coverage ends to sign up for Part B without a late penalty.
That window matters for your HSA too, since contributions can continue as long as you are not yet enrolled in Medicare.
- Confirm with HR whether your plan legally counts as an employer group health plan under IRS rules, since not every retiree or part-time plan qualifies.
- Ask whether COBRA continuation coverage counts toward your Special Enrollment Period, since Medicare.gov treats COBRA differently from active employer coverage.
- Document your coverage start and end dates in writing, since those dates determine your contribution cutoff.
Pro Tip: Ask your benefits administrator for a letter confirming your employer coverage dates before you file for Medicare, so you have a paper trail if a contribution question comes up later.
Tax consequences and how to correct excess HSA contributions
An excess contribution is any HSA deposit made after your contribution limit drops to zero, and the IRS taxes it. A 6% excise tax applies for each year the excess amount remains in the account uncorrected. That tax compounds annually until the excess is removed, which is why quick action matters more than a perfect explanation of how it happened.
Retroactive Medicare enrollment is the most common trigger, since it can turn several months of ordinary contributions into excess ones without any warning.
Correction generally works one of a few ways:
- Withdraw the excess contribution plus any earnings on it before your tax filing deadline, which avoids the excise tax entirely.
- Report the correction properly on Form 8889 when you file that year’s taxes.
- Recharacterize the contribution if you are still within an eligible window, though this option is narrower and worth confirming with a tax professional.
Your HSA custodian can process the actual distribution of excess funds, but a tax professional should confirm the numbers and the filing paperwork, especially when retroactive Medicare dates are involved.
Practical next steps checklist for turning 65
If Medicare enrollment is on your calendar, a short list of actions now prevents a much longer cleanup later.
- Contact your HSA custodian and stop payroll contributions before your anticipated Medicare enrollment date, not after.
- Verify your exact Medicare enrollment date with the Social Security Administration, since Medicare.gov notes this date can be retroactive depending on how and when you apply.
- Pause any employer HSA contributions at the same time as your own, since employer deposits count toward the same limit.
- Talk to HR about whether your coverage qualifies as an employer group health plan and whether you have a Special Enrollment Period.
- If you discover excess contributions after the fact, contact your custodian to withdraw the excess plus earnings and consult a tax advisor before filing.
Pro Tip: Keep copies of every enrollment confirmation and HR letter in one folder. If the IRS or your custodian ever questions a contribution date, that paper trail settles it fast.
How a certified Medicare planner helps you avoid HSA mistakes
Timing HSA contributions around Medicare enrollment involves multiple moving dates: your birthday, your Social Security filing date, your employer coverage end date, and Medicare’s own retroactivity rules. Certified Medicare Insurance Planners work through those dates with clients before enrollment, confirming which coverage applies when and flagging contribution cutoffs before they become a problem.
Two situations come up often: someone working past 65 who needs to confirm their Special Enrollment Period eligibility, and someone who applied for Social Security later than planned and now faces a backdated Part A start date. In both cases, the fix is the same: confirm the exact enrollment date in writing before assuming contributions are still safe.
— Zach
Get help timing your Medicare enrollment
Specialized Medicare consultations offer a hands-on alternative to figuring this out alone or relying on a call center script. A Turning 65 Medicare Consultation walks through your specific enrollment timeline, confirms whether you need to stop HSA contributions now or can wait, and checks whether your current coverage qualifies for a Special Enrollment Period.

Services also include:
- Medicare Enrollment Assistance to confirm your exact effective date before you file.
- Insurance Plan Comparison across Medicare Advantage, Medigap, and Part D options.
- Claims Support & Appeals if a coverage or billing issue comes up after enrollment.
- Annual Medicare Coverage Review to catch changes before they cost you money.
Visit the Medicare enrollment and consultation services page to request a consultation, or reach out directly to talk through your enrollment date before your next HSA contribution goes through.
Sources
- Publication 969 (2025), Health Savings Accounts and Other Tax‑Favored Health Plans | Internal Revenue Service
- Medicare
- HSAs and Medicare explained (AARP)
This article is general information, not a substitute for advice from a qualified financial advisor. Consult a qualified financial professional about your own circumstances before acting on anything here.
FAQ
What happens if you have an HSA and Medicare?
You keep the HSA and can still spend the existing balance tax-free on qualified medical expenses, but you cannot add new contributions once you are enrolled in any part of Medicare. Any contribution made after your enrollment date, including retroactive months, counts as an excess contribution under IRS Publication 969.
Do you have to stop HSA contributions 6 months before Medicare?
Not by IRS rule, but many employers recommend it as a safety buffer because Part A enrollment can be backdated up to six months when you apply for Medicare after your initial eligibility window. Stopping early protects you from accidentally creating excess contributions during that retroactive period, as Medicare.gov explains.
Can you contribute to an HSA after 65 if you are not on Medicare?
Yes, as long as you have not enrolled in any part of Medicare and you are covered by an HSA-qualified high-deductible health plan, typically through active employer coverage. Many people working past 65 delay Medicare Part B specifically to keep this option open, per Medicare.gov.
Can I pay my wife’s Medicare premiums with my HSA?
You can use your HSA tax-free to pay a spouse’s Medicare Part B, Part D, or Medicare Advantage premiums, since the IRS extends qualified expense treatment to a spouse’s Medicare costs. Medigap premiums are generally excluded from this tax-free treatment, so confirm the specific premium type before withdrawing funds, as noted by AARP.

