
By Marc Gilman
(800) 927-9326 |
If you’ve built up a Health Savings Account over your working years, enrolling in Medicare changes what you can do with it — but not as much as people often assume. You lose the ability to contribute, but the money already in the account keeps working for you, tax-free, with one significant exception that catches a lot of people off guard.
Key Takeaways
-
Enrolling in any part of Medicare — even premium-free Part A — stops your ability to contribute to an HSA going forward.
-
Existing HSA funds remain available tax-free for qualified medical expenses indefinitely, with no deadline to use them.
-
HSA funds can pay Medicare Part A, Part B, Part D, and Medicare Advantage premiums tax-free — but not Medigap premiums, which the IRS specifically excludes.
-
Because Part A coverage can apply retroactively, exactly when to stop HSA contributions depends on your enrollment timing — on-time enrollees face no issue, but two different “late enrollment” scenarios each have their own stop-contribution rule.
-
Long-term care insurance premiums are also a qualified HSA expense, subject to the same IRS age-based deduction limits that apply to LTC insurance generally.
What Happens to HSA Contributions Once You Enroll in Medicare?
Once you enroll in any part of Medicare — Part A or Part B, it doesn’t matter which — you’re no longer eligible to contribute to an HSA. This catches some people by surprise specifically around Part A, since it’s premium-free for most people and easy to assume it’s a low-stakes decision. It isn’t, if you’re still working and want to keep building your HSA: enrolling in Part A alone is enough to cut off future contributions, even if you’re not yet on Part B.
If you’re already receiving Social Security benefits, this isn’t optional — Medicare Part A enrollment is automatic and mandatory once you’re receiving benefits, which means your HSA contributions stop at that point regardless of your preference.
Why Does Retroactive Part A Coverage Matter So Much?
This is the detail most likely to actually cost you money — and exactly when you need to stop contributing depends on which of three scenarios applies to you:
-
You enroll during your Initial Enrollment Period (IEP). Part A starts on your actual enrollment date — no retroactive complication. Just stop HSA contributions before your Initial Enrollment date.
-
You enroll after your IEP ends, but less than 6 months after the month you turned 65. Even though you’re technically enrolling “late,” Part A’s retroactive start date still lands close to your original IEP in this case. Stop contributions before your Initial Enrollment month, not just a flat 6 months before you actually apply.
-
You enroll 6 or more months after your 65th birthday month. This is the scenario the “6-month rule” usually refers to: Part A applies retroactively a full 6 months from your application (or back to your eligibility date, whichever is sooner). Stop HSA contributions 6 months before you apply.
The underlying mechanic: premium-free Part A becomes effective either 6 months before your application or your Initial Enrollment date, whichever is sooner — which is why the middle scenario above still ties back to your IEP month rather than a simple 6-month countdown from application. If you kept contributing to your HSA during whichever retroactive window applies to you, those contributions become excess contributions — subject to a 6% excise tax.
What Can You Still Use HSA Funds For?
This is the reassuring part. Once you stop contributing, your existing HSA balance doesn’t disappear or lose its tax advantages — you can still withdraw funds completely tax-free for qualified medical expenses, and there’s no deadline to do it. You can even reimburse yourself years later for a qualified expense you paid out of pocket, as long as the HSA was already open when you incurred it.
Specifically, HSA funds can pay:
-
Medicare Part A premiums (if you owe any)
-
Medicare Part B premiums
-
Medicare Part D premiums
-
Medicare Advantage (Part C) premiums
-
Deductibles, copays, and coinsurance across all of the above
-
Dental, vision, and hearing expenses
-
A range of other IRS-qualified medical expenses
What’s the One Big Exception?
Medigap (Medicare Supplement) premiums cannot be paid tax-free from an HSA. This is explicitly excluded under IRS Publication 969, and it’s a genuinely counterintuitive rule — Medigap and Medicare Advantage both exist to fill gaps in Original Medicare, but the IRS treats them completely differently for HSA purposes. Medicare Advantage replaces Original Medicare and qualifies; Medigap supplements it and doesn’t.
To be precise about the full rule: the IRS generally treats insurance premiums as not qualified HSA expenses, with specific exceptions — long-term care insurance, COBRA continuation coverage, coverage while receiving unemployment compensation, and Medicare coverage for anyone 65 or older (Part A, B, C, and D specifically). Medigap is the one Medicare-adjacent premium explicitly carved back out of that exception.
If you withdraw HSA funds to pay a Medigap premium, that withdrawal gets taxed as ordinary income. The good news, if you’re 65 or older: you won’t face the additional 20% penalty that applies to non-qualified withdrawals before 65 — but you’ll still owe regular income tax on the amount. Given how many Medicare beneficiaries carry a Medigap policy specifically, this is worth knowing clearly rather than assuming “it’s a Medicare-related premium, so it must qualify.”
One practical technique worth knowing: if your Part B or Part D premiums are already being deducted directly from your Social Security check, you can still reimburse yourself tax-free from your HSA for that same amount afterward — HSA reimbursement has no time limit, and you don’t have to pay the premium directly from the HSA to claim it. Keep records of what Social Security withheld, and you can pull an equivalent tax-free amount from your HSA whenever it’s convenient.
Does Long-Term Care Insurance Count?
Yes — long-term care insurance premiums are a qualified HSA expense, which is easy to miss since it doesn’t come up in most general HSA-and-Medicare explainers. The amount you can pay tax-free is capped by the same IRS age-based schedule that applies to LTC insurance premium deductions generally, which we’ve covered in more detail in our post on the tax implications of funding a long-term care policy.
What If You Use HSA Funds for Something That Doesn’t Qualify?
After age 65, using HSA funds for a non-qualified expense (Medigap premiums, or anything else outside the qualified list) means the withdrawal is taxed as ordinary income, but you avoid the 20% penalty that applies to non-qualified withdrawals at a younger age. It’s not free, but it’s also not the harshest possible outcome — still, it’s better to know the rule going in than to find out at tax time.
Where Does Insurance Planning Fit In?
Understanding how your HSA interacts with Medicare is part of a larger decision about how and when to enroll, especially if you’re still working past 65. Gilman Agency can help you think through the timing of your Medicare enrollment alongside your HSA, and make sure your Medigap or Medicare Advantage choice fits into the fuller picture of how you’re funding your healthcare costs.
What To Do Next
If you’re approaching 65 and still contributing to an HSA, the timing of your Medicare enrollment matters more than it might seem — both for avoiding an excess contribution penalty and for knowing what your HSA can and can’t pay for afterward.
Call (800) 927-9326, or email to talk through your situation. TTY: 711.
By Marc Gilman, Gilman Agency
This information is general in nature and not intended as tax or legal advice. Consult your CPA or tax advisor regarding your specific situation.
Sources: UnitedHealthcare, “Health Savings Accounts and Medicare” (Medicare Made Clear); Internal Revenue Service, Publication 969; Fidelity, “HSAs and Medicare: Diagnose the Possible Pitfalls”; Aetna Medicare, “Medicare and HSAs Can Work Together”.


