The rule that catches people off guard
Once you enroll in any part of Medicare — including premium-free Part A — you can no longer contribute to a Health Savings Account. This is an IRS rule, not a Medicare rule. It surprises people who file for Social Security at 65 (which automatically triggers Part A) while planning to keep funding their HSA.
If you contribute after enrolling in Medicare, the IRS can impose a 6% excise tax on the excess contributions — and it compounds each year the excess stays in the account. It's one of the most common and most avoidable Medicare mistakes.
The six-month look-back trap
When you enroll in Medicare after age 65, Part A coverage is backdated up to six months. If you kept contributing during those months, those contributions can become excess and taxable. If you plan to work past 65 and keep an HSA, stop contributions at least six months before you enroll. If you did over-contribute, you can withdraw the excess before your tax-filing deadline to avoid the penalty.
What you can still use HSA funds for
You can no longer add to the account, but you can spend the existing balance tax-free on qualified expenses:
- Medicare Part B, Part D, and Medicare Advantage premiums
- Deductibles, copays, and coinsurance
- Dental, vision, and hearing expenses
- Long-term-care insurance premiums (up to IRS limits)
- Prescription medications
- Note: HSA funds cannot be used tax-free for Medicare Supplement (Medigap) premiums.
Planning tips
A few timing rules protect your HSA and your household:
- Working past 65 with employer HDHP coverage — you can delay Part A & B and keep contributing, as long as you haven't filed for Social Security.
- Filing for Social Security at 65 — this auto-enrolls you in Part A and ends HSA eligibility; stop contributions about six months before your Medicare start date.
- Under-65 spouse on your HDHP — they can still contribute to their own HSA even after you enroll in Medicare.