There is a rule connecting your HSA and Medicare enrollment that thousands of people trigger accidentally every year. Most of them don't find out until their tax return comes back wrong. The rule is simple: once you are enrolled in any part of Medicare, you can no longer contribute to an HSA. Not a reduced amount. Nothing. The moment you are covered by Medicare Part A, Part B, Part C, or Part D, new contributions to your HSA become 'excess contributions' subject to a 6% excise tax penalty every year until they are corrected.
HSA eligibility requires that you be covered by a qualifying high-deductible health plan and not have any 'other health coverage' that provides first-dollar medical benefits. The IRS explicitly lists Medicare Part A, Part B, Part C (Medicare Advantage), and Part D as disqualifying coverage. The standard understanding is: turn 65, enroll in Medicare, stop contributing to your HSA. That's correct as far as it goes. The problem is what happens when you don't enroll at 65 because you're still working and covered by an employer's group health plan.
When an individual who delayed Medicare enrollment eventually applies for Social Security benefits or Medicare after 65, the Social Security Administration automatically backdates Medicare Part A coverage for up to six months — but never earlier than the month of the person's 65th birthday. This retroactive coverage creates a gap. If you apply for Social Security or Medicare at 67, your Part A coverage is backdated to six months prior — to when you were 66 and a half. Any HSA contributions you made during those six months are now excess contributions, because you were technically 'covered by Medicare' during that period even though you hadn't applied yet. The 6% excise tax applies each year to the excess contribution amount until you correct it by withdrawing the excess plus earnings from the HSA and paying income tax on the withdrawal.
The practical guidance from financial professionals is straightforward: stop all HSA contributions at least six to seven months before you plan to apply for Medicare or Social Security. This buffer ensures that no contributions fall within the retroactive six-month window triggered by the enrollment application. The exact stopping point depends on when you plan to apply: If you plan to apply for Medicare at your 65th birthday, stop HSA contributions the month you turn 64 years and 6 months old — or earlier. This is the safest approach for someone enrolling at the standard age. If you plan to work past 65 and delay Medicare, you can continue HSA contributions as long as you are not enrolled in Medicare and are covered only by your employer's group health plan. But you must stop contributing at least six months before you eventually apply for Medicare or Social Security — whenever that is. If your employer's coverage terminates before you're ready to enroll in Medicare, you have a Special Enrollment Period for Medicare. Coordinate the timing carefully — the retroactive Part A rule applies regardless of when your employer coverage ended. Situation Risk What to Do Working past 65, No current issue — Stop contributing 6-7 covered by employer contributions are fine months before planned plan, not enrolled in Medicare/SS application Medicare Applying for Social Auto-enrolled in Part A Stop HSA contributions Security at 65 or later at same time — 6+ months before Social retroactive 6-month Security application look-back triggered Applying for Medicare Enrollment date — Final contribution at 65 contribution stop month is typically 6 required months before Part A effective date Already on Medicare Any new HSA Stop contributions contributions are immediately; consult excess CPA about correcting past excess contributions
If you become ineligible for HSA contributions partway through the year — because you enrolled in Medicare mid-year — your annual contribution limit is prorated. The proration is based on the number of months you were an eligible individual, calculated as of the first of each month. For example: if you turn 65 on July 1 and enroll in Medicare that month, you were eligible for January through June — six months. Your 2026 contribution limit is 6/12 of the annual limit. For a self-only plan, that would be $2,200 (half of $4,400), plus $500 catch-up (half of $1,000) — a maximum of $2,700 for the year. Contributing the full annual amount would generate excess contributions for the second half.
You can trigger the HSA excess contribution penalty without ever|And because Part A enrollment triggers the six-month retroactive|HSA simultaneously is a trap that catches retirees who retire|Medigap premiums — Medicare Supplement insurance — cannot be paid