HSAs and Medicare: The Basic Rule
A Health Savings Account (HSA) is a tax-advantaged account paired with a high-deductible health plan (HDHP) that allows you to save pre-tax dollars for medical expenses. HSAs offer a triple tax advantage: contributions are tax-deductible, growth is tax-free, and withdrawals for qualified medical expenses are tax-free. However, there is a critical rule: you cannot contribute to an HSA if you are enrolled in any part of Medicare, including Part A.
Why Medicare Enrollment Stops HSA Contributions
The IRS considers Medicare (Parts A, B, C, and D) to be non-HDHP coverage. Since HSA contributions are only allowed when you have an HDHP and no other disqualifying coverage, any Medicare enrollment — even premium-free Part A — makes you ineligible to contribute. This rule catches many people by surprise, especially those who:
- Are automatically enrolled in Part A when they start Social Security benefits
- Turn 65 and are retroactively enrolled in Part A (Medicare Part A is retroactive up to 6 months)
- Continue working past 65 with an HDHP and assume they can keep contributing
The Retroactive Enrollment Trap
When you enroll in Medicare Part A, coverage can be retroactive by up to 6 months (but not before age 65). This means if you sign up for Part A in December, your coverage start date might be backdated to June. Any HSA contributions made during those retroactive months are excess contributions subject to a 6% excise tax for every year they remain in the account.
To avoid this, stop HSA contributions at least 6 months before enrolling in Medicare Part A. If you plan to enroll in Medicare at age 65 and 3 months, stop contributing by the month you turn 65 at the latest.
Can You Still Use Your HSA After Enrolling in Medicare?
Absolutely. You can withdraw existing HSA funds tax-free for qualified medical expenses at any time, regardless of Medicare enrollment. You just cannot make new contributions. Qualified medical expenses for Medicare beneficiaries include:
- Medicare Part B premiums ($190.40/month in 2026)
- Medicare Part D premiums
- Medicare Advantage premiums
- IRMAA surcharges
- Copays, deductibles, and coinsurance
- Prescription drug costs
- Dental, vision, and hearing expenses
- Long-term care insurance premiums (up to age-based limits)
The one exception: HSA funds cannot be used tax-free to pay Medigap (Medicare Supplement) premiums. This is a specific IRS exclusion. Using HSA funds for Medigap premiums is treated as a non-qualified withdrawal and will be included in taxable income (but no penalty after age 65).
Strategy: Maximize HSA Before Medicare
If you are working past 65 with employer-sponsored HDHP coverage and have not yet enrolled in Medicare (including Part A), you can continue contributing to your HSA. This strategy works when:
- Your employer has 20+ employees (so employer coverage is primary)
- You have not filed for Social Security benefits (which triggers automatic Part A enrollment)
- You have not enrolled in any Medicare part
In this scenario, maximize your HSA contributions ($4,300 individual / $8,550 family in 2026, plus $1,000 catch-up for those 55+) as long as possible. The accumulated funds become a powerful tax-free health spending account once you transition to Medicare.
Strategy: Build an HSA Bridge Fund
Some financial planners recommend aggressively funding an HSA in your late 50s and early 60s to build a healthcare bridge fund for Medicare years. A well-funded HSA can cover Medicare premiums, out-of-pocket costs, and even dental and vision expenses tax-free for many years. An HSA with $100,000 at age 65 could cover approximately 10+ years of average Medicare out-of-pocket costs.
After Age 65: No Penalty for Non-Medical Withdrawals
After age 65, HSA withdrawals for non-medical expenses are no longer subject to the 20% penalty (though they are still taxed as ordinary income, similar to traditional IRA withdrawals). This effectively makes an HSA a hybrid retirement account — tax-free if used for healthcare, tax-deferred if used for anything else. This flexibility makes the HSA one of the most powerful retirement planning tools available.
Common Mistakes to Avoid
| Mistake | Consequence |
|---|---|
| Contributing to HSA after enrolling in Part A | 6% excise tax on excess contributions each year |
| Not accounting for Part A retroactivity | Up to 6 months of excess contributions |
| Filing for Social Security while contributing to HSA | Auto-enrollment in Part A triggers excess contributions |
| Using HSA for Medigap premiums | Taxable income (no penalty after 65, but loses tax-free benefit) |
| Not using HSA funds at all in retirement | Missing tax-free healthcare spending opportunity |
Consult a tax advisor or financial planner to coordinate your HSA strategy with Medicare enrollment timing. For state-specific considerations, see your state's Medicare cost information.