Using Your HSA After 65

What Changes When You Enroll in Medicare, Which Expenses Still Qualify, and How to Avoid the 6-Month Contribution Trap

Monte Carlo retirement projection chart showing HSA balance, Medicare costs, and tax-free withdrawal scenarios

An HSA does not end at 65 — it transforms. The rules around contributions change significantly when you enroll in Medicare, but the account itself continues to work, and in some ways becomes more flexible. After 65, you can use your HSA balance to pay for a much broader range of expenses, including Medicare premiums. You can withdraw funds for non-medical purposes without penalty, though those withdrawals are taxed as ordinary income. And the balance you have accumulated — if you invested it over the years — can represent a substantial tax-free healthcare reserve that significantly reduces your out-of-pocket costs in retirement.

Understanding the transition rules clearly is essential. The Medicare enrollment and HSA contribution rules interact in ways that catch many people off-guard, and a mistake — contributing even one month after Medicare begins — triggers a 6% IRS excise tax on the excess contributions.

The Core Rule: No New Contributions After Medicare Enrollment

Once you enroll in any part of Medicare — Part A (hospital insurance), Part B (medical insurance), Part C (Medicare Advantage), or Part D (prescription drugs) — your HSA contribution limit drops to zero. This rule applies from the first month of Medicare coverage.

You can still use the funds you have accumulated. Enrollment in Medicare does not affect your existing HSA balance or your ability to spend it. It only stops new contributions.

The retroactive enrollment trap — the 6-month lookback. This is the rule that most frequently causes unintentional over-contributions. When you apply for Medicare after age 65, Medicare Part A coverage is applied retroactively for up to 6 months before your application date — but never earlier than the month you turn 65.

If you applied for Medicare at age 67 in September 2026, your Part A coverage would be retroactive to March 2026. Any HSA contributions you made between March and August 2026 are treated as excess contributions — even though you were not enrolled in Medicare when you made them. Those excess contributions are subject to a 6% excise tax for every year they remain in the account.

The safe rule: stop HSA contributions 6 months before you plan to apply for Medicare. If you intend to apply for Medicare in June, stop contributing to your HSA in December of the prior year. This buffer protects against retroactive coverage creating excess contributions.

The Social Security Automatic Enrollment Problem

If you are already receiving Social Security benefits when you turn 65, Medicare Part A enrollment is automatic — you do not need to apply, and you may not be aware that enrollment has occurred. Many people who are collecting Social Security early retirement benefits find themselves automatically enrolled in Medicare Part A at 65, which immediately disqualifies them from further HSA contributions.

If you are collecting Social Security and wish to continue contributing to your HSA past 65, you must delay Medicare enrollment — which means you also need to delay or suspend Social Security benefits. This is a complex decision with significant financial implications beyond the HSA consideration alone. Consult a financial advisor before making changes to Social Security or Medicare enrollment timing.

Working Past 65: You Can Keep Contributing If You Delay Medicare

If you continue working past 65 and remain covered by your employer's HDHP — and you do not enroll in Medicare — you can continue contributing to your HSA. Many tech workers who remain at their companies past 65 choose to delay Medicare enrollment specifically to continue building their HSA balance during their peak earning and saving years.

If your employer has 20 or more employees, you have the right to maintain employer-sponsored coverage and delay Medicare without penalty during active employment. Once you retire and lose employer coverage, you have a Special Enrollment Period to enroll in Medicare without late enrollment penalties.

Note on employer HSA contributions. If you are 65 or older, enrolled in Medicare, and your employer continues making contributions to your HSA — for example, through an automatic employer contribution program — those employer contributions also become excess contributions. Notify your benefits department as soon as you enroll in Medicare to stop employer HSA contributions.

What You Can Pay For After 65

Once you turn 65, the list of HSA-qualified expenses expands significantly. The key changes:

Medicare premiums. After 65, you can use HSA funds tax-free to pay premiums for:

  • Medicare Part A (hospital insurance)
  • Medicare Part B (medical insurance — the standard 2026 premium is $202.90/month per person)
  • Medicare Part C (Medicare Advantage plans)
  • Medicare Part D (prescription drug coverage)

What is NOT covered: Medigap (Medicare Supplement) premiums. HSA funds cannot be used for Medigap premiums at any age. If you purchase a Medigap plan to supplement traditional Medicare, those premiums come from after-tax dollars. This is one of the clearest distinctions in the Medicare/HSA rules and is confirmed in IRS Publication 969.

All standard qualified medical expenses remain covered. Deductibles, copays, dental care, vision care, hearing aids, prescription drugs, mental health services, and all other qualified medical expenses continue to be eligible for tax-free HSA withdrawals at any age.

IRMAA surcharges. If your income triggers IRMAA (Income-Related Monthly Adjustment Amount) surcharges on your Part B or Part D premiums, HSA funds can pay those higher premiums tax-free. For 2026, IRMAA begins at $109,000 for individuals and $218,000 for married filing jointly. Tech workers who retire with high investment income — RSU sales, Roth conversions, RMDs — often face IRMAA surcharges. Paying them from HSA funds means tax-free dollars covering an otherwise taxable-income-funded expense.

Non-Medical Withdrawals After 65: The IRA-Like Feature

Before age 65, withdrawing HSA funds for non-qualified expenses triggers income tax plus a 20% penalty. After 65, the 20% penalty disappears. Non-qualified HSA withdrawals after 65 are taxed as ordinary income — exactly like a traditional IRA distribution.

This means that after 65, an HSA functions as a traditional IRA for general expenses, with the bonus that medical withdrawals remain permanently tax-free. An HSA is strictly better than a traditional IRA for a retiree who has qualifying healthcare expenses, because:

  • Medical withdrawals: tax-free (versus taxable from a traditional IRA)
  • Non-medical withdrawals: taxed as ordinary income (same as a traditional IRA)

There is no scenario after 65 in which a traditional IRA beats an HSA, assuming the money would be spent on qualified medical expenses at some point.

The IRMAA Interaction: Using Your HSA to Manage Medicare Costs

This is one of the most powerful but underused applications of HSA funds in retirement. IRMAA surcharges are calculated based on your Modified Adjusted Gross Income (MAGI) from two years prior. When you pay Medicare premiums or other qualified medical expenses from your HSA, those withdrawals do not appear in your MAGI — they are not taxable income and do not flow through your tax return.

This creates a compounding benefit: HSA withdrawals reduce your out-of-pocket healthcare costs and do not push you into a higher IRMAA tier for the following years. By contrast, a traditional IRA withdrawal to pay the same Medicare premium would be counted as MAGI and could trigger or increase your IRMAA surcharge.

For a retired tech worker managing a large IRA balance alongside Social Security and potentially RMDs, the ability to pay Medicare costs from an HSA without affecting MAGI is a meaningful planning lever.

The "Pay Now, Reimburse Later" Strategy Coming to Fruition

If you followed the strategy of paying all medical expenses out-of-pocket during your working years and keeping your receipts, age 65 is when that discipline pays off. The IRS does not impose a time limit on when you must reimburse yourself for qualified medical expenses incurred after the HSA was opened. You can reimburse yourself at 65 for a medical expense you paid out-of-pocket at 45 — as long as you have the documentation, the HSA was open at the time, and you have not previously reimbursed that expense from another tax-advantaged account.

This means a retiree who accumulated decades of unreimbursed medical receipts can make large tax-free HSA withdrawals in retirement, effectively converting decades of qualified expenses into current tax-free income. The amounts can be substantial for a healthy high earner who paid all medical costs out-of-pocket for 20+ years.

Summary: The HSA Transition Checklist at 65

6+ months before Medicare enrollment:

  • Stop HSA contributions (employee and employer)
  • Calculate your prorated contribution limit for the partial year

At Medicare enrollment:

  • Notify your benefits department to stop employer HSA contributions
  • Confirm whether your Part A coverage is retroactive and by how many months
  • Correct any excess contributions before your tax filing deadline

In retirement:

  • Use HSA to pay Medicare Part B, C, and D premiums tax-free
  • Do not use HSA for Medigap premiums
  • Consider IRMAA impact when deciding which account to use for medical expenses
  • Continue to invest unspent HSA balance if not needed immediately

California Note

California taxes HSA earnings annually as ordinary income — even during your working years. By retirement, the accumulated California tax on HSA investment gains may reduce the effective after-tax value of your HSA balance. However, because qualified withdrawals remain federal-tax-free and Medicare premium payments do not affect MAGI, the HSA remains a strategically valuable account for California retirees — especially for managing IRMAA.

Frequently Asked Questions

Yes. Once you are 65 or older, you can use your HSA to pay Medicare premiums for your spouse — provided they are 65 or older and enrolled in Medicare. If your spouse is under 65, their Medicare premiums (in the unusual circumstance of early Medicare eligibility due to disability) are generally not covered by your HSA.
The standard 2026 Part B premium is $202.90 per person per month, up from $185.00 in 2025. Higher-income individuals pay more through IRMAA surcharges. Both spouses pay the premium individually — a couple together pays $405.80/month minimum for Part B alone.
Yes. Non-medical HSA withdrawals after 65 are taxed as ordinary income federally. California taxes them as well, since California never recognized the HSA deduction in the first place — California's tax treatment is consistent before and after 65.
Yes. Your existing HSA balance can remain invested in any investment options your HSA custodian offers — stock funds, bond funds, ETFs. The account continues to grow tax-free federally (and subject to California state income tax on earnings). There is no requirement to move to cash or cash equivalents after enrollment in Medicare.

Plan Your HSA-to-Medicare Transition

Nauma models your retirement accounts, Medicare enrollment timing, and HSA balance together — so you can see exactly when to stop contributions, how much to build before 65, and how to coordinate your HSA with IRMAA management.

Get Started for Free