The Second Half Guide
← Medicare & health insurance Facts & thresholds

The HSA rule that can cost you a 6% tax at 65

If you’re still working past 65 with an HSA-eligible health plan, enrolling in Medicare later can reach backward and tax contributions you already made. The fix is timing, not paperwork.

Health Savings Accounts and Medicare do not mix — you cannot contribute to an HSA for any month you are covered by Medicare, full stop. Most people learn this the easy way, by stopping contributions when Medicare starts. The trap is for people who keep working past 65, stay on an HSA-eligible employer plan, and enroll in Medicare later — because Medicare can reach backward and cover months they had already assumed were still HSA-eligible.

The rule, precisely
The triggerEnrolling in Medicare Part A after 65 — including automatic enrollment, if you claim Social Security at or after 65.
The reach-backPart A coverage applies retroactively up to 6 months, but never earlier than the month you turned 65.
The conflictYou are not HSA-eligible for any month covered by Medicare, including a month covered retroactively.
The tax consequenceContributions made during a retroactively-covered month become excess HSA contributions. Left uncorrected, an excess contribution is charged a 6% excise tax for every year it remains in the account, not a one-time hit.
The fixStop HSA contributions at least 6 months before you apply for Medicare, or before your 65th birthday if you plan to enroll right at 65.
What is not affectedMoney already in the HSA. It stays yours, stays tax-free for qualified medical expenses, and can be used to pay Medicare premiums (except Medigap) after 65.

Who this actually reaches

Almost nobody who enrolls in Medicare right at 65 hits this. The trap is specific to people who keep working past 65 on an employer’s high-deductible health plan, keep contributing to an HSA, and then either delay Medicare deliberately or trigger it accidentally by claiming Social Security. Claiming Social Security at or after 65 automatically enrolls you in Medicare Part A — you do not get to keep the HSA-eligible coverage and collect Social Security at the same time without running into this.

The 6-month lookback also has a floor: it never reaches earlier than the month you turned 65. Someone who works to 68 and then enrolls has the same 6-month exposure window as someone who works to 66 — the retroactive coverage does not stretch back to their 65th birthday in either case.

The contribution was legal when you made it. The problem is that Medicare, once it starts, can decide it started six months earlier than the day you actually enrolled.

Also on The Second Half Guide Most states will let you take college classes free after 60 Most states let older residents take public-college courses free or cheaply. Rules vary by state, campus, age, and whether you audit or take credit. Read it →

What to do about it

  • If you plan to keep working past 65 on an HSA-eligible plan and delay Medicare deliberately, that is fine — just know the 6-month exposure applies whenever you eventually do enroll.
  • If you plan to claim Social Security at or after 65, stop HSA contributions at least 6 months before that claim takes effect, since claiming triggers automatic Part A enrollment.
  • If you already over-contributed during a retroactive-coverage window, you can generally withdraw the excess, plus any earnings it generated, by your tax return deadline including extensions for that contribution year to avoid the excise tax on that amount — talk to the HSA custodian about the correction process.
  • Employer contributions count too. If your employer contributes to your HSA automatically, that also needs to stop on the same schedule.
  • None of this affects an HSA balance you already have. It is only about new contributions during the overlap window.

This is a timing rule, not a reason to avoid an HSA-eligible plan while still working. The Medicare retroactivity itself only ever reaches back up to 6 months. But that is a separate question from how long the tax consequence lasts: an excess contribution left uncorrected keeps accruing the 6% excise tax every year, on top of ordinary income tax on whatever it earned. Get the 6-month timing right, or correct an excess contribution promptly if you miss it, and neither issue lingers.

This is general information, not personal advice. We report the rules, the numbers and the deadlines as clearly as we can. We don't know your income, your state, your health or your family — and all four can change the answer. Treat this as a good place to find the right questions, not a substitute for someone looking at your actual situation.

Where these facts come from

Checked on 24 August 2026 against the sources listed below. Dollar limits and program rules change — if you're reading this well after that date, verify the numbers at the links below.

Edward Silva

Edward Silva

Edward spent more than forty years as a computer professional — long enough to pick up one useful occupational habit: when somebody hands you a summary, go and read the actual documentation. He started The Second Half Guide after noticing that most writing aimed at people his age was either talking down to him or quietly selling him something, and that the plain facts — the dates, the thresholds, the dollar figures — were somehow the hardest part to find.

He's married, with two grown sons, both married themselves. He is not a financial adviser, an attorney or an insurance agent, and this site doesn't tell you what to do with your money. It tells you what the rules actually say, and links to where he checked.

Next up

The four-year 401(k) catch-up window at 60–63

Another narrow, easy-to-miss window — this one on the savings side.

Read it →
Also on The Second Half Guide Is the National Parks Senior Pass still one of America’s best deals? $80 for life, starting at 62. The headline is as good as it sounds — but the word “parks” misleads people about what they’re actually buying. Read it →