HSAs and Medicare

If you contribute to an HSA, enrolling in Medicare requires careful timing. The 6-month lookback rule explained.

The HSA-Medicare Conflict

If you have a Health Savings Account (HSA) and approach 65, you face a critical decision. Once you enroll in any part of Medicare — including premium-free Part A — you can no longer contribute to an HSA. This catches many California workers off guard, particularly those at tech companies and large employers with HSA-compatible high-deductible health plans.

The 6-Month Lookback Rule

When you enroll in Medicare or claim Social Security at age 65 or later, Part A coverage is retroactive up to 6 months (but no earlier than your 65th birthday month).

This means HSA contributions made during those 6 retroactive months are technically excess contributions — subject to taxes and a 6% excise tax penalty unless withdrawn before your tax deadline.

How to Avoid the HSA Penalty

  1. Stop HSA contributions 6 months before enrolling in Medicare. If you plan to enroll at 65, stop contributions at 64.5.
  2. Don’t claim Social Security before 65 if you want to keep contributing to your HSA. Claiming Social Security automatically enrolls you in Part A.
  3. Pro-rate your annual contribution based on the number of months you’re HSA-eligible.

You Can Still USE Your HSA After Medicare Enrollment

The rule only prohibits new contributions. You can continue to:

  • Pay for qualified medical expenses tax-free with existing HSA funds
  • Pay Medicare premiums (Part B, Part D, Medicare Advantage) with HSA funds tax-free
  • Pay for long-term care insurance with HSA funds

Strategy for Workers Who Want to Keep Contributing

If you’re 65+ and still working with HSA-compatible coverage, you can decline Medicare enrollment entirely (including Part A) and continue HSA contributions. But this requires being eligible to delay — your employer must have 20+ employees and you should not be receiving Social Security benefits.

Can I contribute to an HSA after enrolling in Medicare?
No. Enrolling in any part of Medicare, including premium-free Part A, makes you ineligible to contribute to a Health Savings Account. You can still use existing HSA funds for qualified expenses.
What is the 6-month HSA lookback rule?
When you enroll in Medicare or claim Social Security at 65+, Part A is retroactive up to 6 months. Contributions made during those 6 months become excess contributions subject to penalties unless removed.
Can I use HSA money to pay Medicare premiums?
Yes. You can use existing HSA funds to pay Part B premiums, Part D premiums, and Medicare Advantage premiums tax-free. You cannot pay Medigap premiums with HSA funds.

Need Help Coordinating Medicare with Your Employer Plan?

Licensed California Medicare agents understand the complexities of working past 65 — at no cost to you.

Compare Plans → Find a Licensed Agent →