If you turn 65 and enroll in Medicare, your HSA contributions stop the same month. If you delay enrollment, Medicare Part A can backdate up to 6 months. Contributions made during that backdated window become excess contributions. The IRS charges 6% per year until you fix them.
The fix is simple. Stop HSA contributions 6 months before Medicare enrollment.
This guide covers the transition mechanics. For long-term retirement strategy after enrollment, see HSA After 65.
The Three-Part Rule
The HSA-to-Medicare transition has three moving pieces. Each one matters.
Part 1: Medicare enrollment ends HSA contributions. Any part of Medicare counts. Part A, Part B, Part C, or Part D. From the first month of coverage, your contribution limit is zero.
Part 2: Part A is retroactive up to 6 months. If you enroll late, Medicare backdates your Part A coverage. HSA contributions made during the backdated window are now excess contributions.
Part 3: You can still spend from the HSA forever. Medicare ends the contribution side. The spend side never ends. Receipts from any year remain reimbursable.
Month-by-Month Transition Timeline
| Time | What Happens | What You Do |
|---|---|---|
| 6 months before 65th birthday | Last safe window for HSA contributions | Stop contributing if you plan to enroll on time |
| 3 months before 65th birthday | Initial Enrollment Period opens | Sign up for Medicare if not auto-enrolled |
| 65th birthday month | Medicare eligibility starts | Coverage starts first day of birthday month if you signed up early |
| 3 months after 65th birthday | Initial Enrollment Period closes | Late enrollment penalty starts if you wait |
| First month of Medicare | HSA contributions must be zero | Confirm payroll or bank transfer is stopped |
| Ongoing | Spend down HSA on qualified expenses | Reimburse past receipts. Pay Medicare premiums. |
Source: Medicare.gov Initial Enrollment Period rules.
What Medicare Premiums Are HSA-Eligible
Once you turn 65, certain Medicare premiums become qualified HSA expenses. Others do not.
| Premium Type | HSA-Eligible? | 2026 Standard Amount |
|---|---|---|
| Medicare Part B | Yes | $202.90/month |
| Medicare Part D (prescription) | Yes | Varies by plan |
| Medicare Advantage (Part C) | Yes | Varies by plan |
| Long-term care insurance | up to age-based limit | Varies |
| Medigap (Medicare Supplement) | No | Not reimbursable |
Medicare Part B
- HSA-Eligible?
- Yes
- 2026 Standard Amount
- $202.90/month
Medicare Part D (prescription)
- HSA-Eligible?
- Yes
- 2026 Standard Amount
- Varies by plan
Medicare Advantage (Part C)
- HSA-Eligible?
- Yes
- 2026 Standard Amount
- Varies by plan
Long-term care insurance
- HSA-Eligible?
- up to age-based limit
- 2026 Standard Amount
- Varies
Medigap (Medicare Supplement)
- HSA-Eligible?
- No
- 2026 Standard Amount
- Not reimbursable
Source: CMS 2026 Medicare Parts A & B Premiums.
Medigap is the one to remember. It looks like a Medicare premium. It is not HSA-eligible. IRS Publication 969 names it specifically as excluded.
The 6-Month Look-Back Trap
Social Security enrollment automatically triggers Medicare Part A enrollment. If you delay both and sign up later, Part A backdates up to 6 months. Never earlier than your 65th birthday month.
Example. You turn 65 in January 2026. You keep working and contributing to an HSA. In October 2026 you sign up for Social Security. Medicare Part A backdates to April 2026.
Every HSA contribution from April through October is now an excess contribution. The IRS treats those months as Medicare-covered, retroactively.
The fix: stop HSA contributions 6 months before you plan to enroll in Medicare or Social Security. If you are not sure when you will enroll, stop at 65.
Excess Contribution Penalty
Excess contributions get hit with a 6% excise tax. Per year. Until removed.
The IRS has two ways to clear excess contributions:
- ●Withdraw the excess plus earnings before the tax filing deadline. No 6% penalty. Earnings count as taxable income.
- ●Leave it in and pay 6% per year. Compounds annually until removed or absorbed by a future contribution limit.
Most HSA custodians have an "excess contribution withdrawal" form. File it before April 15 of the year after the excess contribution.
If Your Spouse Is Younger and on Your HDHP
A younger spouse can keep contributing to their own HSA after you enroll in Medicare. Three conditions:
- ●They are under 65.
- ●They are covered by an HSA-eligible HDHP.
- ●They are not enrolled in Medicare or other disqualifying coverage.
The family contribution limit logic gets tricky here. If they stay on family HDHP coverage, they can contribute the full family limit to their own HSA. Your account stops receiving contributions. Theirs does not.
This is one of the few legal ways to keep HSA tax benefits in the household. Useful when one spouse hits 65 first.
The Last-Month Rule and Medicare
The Last-Month Rule lets you contribute the full annual amount if you are HSA-eligible on December 1. In exchange, you must stay eligible for the full following calendar year. The IRS calls this the testing period.
Medicare breaks the testing period.
Example. You are HSA-eligible on December 1, 2026 and contribute the full $4,400 individual limit. You enroll in Medicare in March 2027. You failed the testing period. The IRS adds the over-contribution back to income. Plus a 10% additional tax.
Rule of thumb: if Medicare is coming within 12 months, do not use the Last-Month Rule. Pro-rate contributions to actual eligible months instead.
For 2026 contribution math, see HSA Contribution Limits 2026.
Practical Decision Tree
| Your Situation | HSA Contribution Status | Action |
|---|---|---|
| Working past 65, employer HDHP, not on Social Security | Eligible to contribute | Delay Medicare and Social Security. Keep contributing. |
| Working past 65, employer HDHP, on Social Security | Not eligible | Stop contributions. Medicare Part A is automatic with Social Security. |
| Retiring at 65, on Social Security | Not eligible | Stop contributions 6 months before 65. Pay Medicare premiums from HSA. |
| Retiring at 65, delaying Social Security and Medicare | Eligible until enrollment | Stop contributions 6 months before planned enrollment date. |
| Spouse under 65 on family HDHP | Spouse still eligible | Spouse contributes to own HSA. Yours stops. |
How Tripl Handles the Medicare Transition
Tripl tags Medicare premium receipts as qualified medical expenses. Part B, Part D, and Medicare Advantage receipts get coded as eligible. Medigap receipts do not.
The smart lump-sum tool applies to the oldest receipts first. When you start drawing from the HSA to pay Medicare premiums, Tripl tracks the running balance. Documentation stays organized for tax time.
Pricing: $30/year for the first 100 sign-ups, then $50.
For the underlying tax forms, see HSA Form 8889 and Taxes. For the full eligible expense list, see HSA Eligible Expenses.
This is educational content, not financial or tax advice. Consult a qualified professional before making decisions about your HSA.