Still Contributing to an HSA at 65? The Medicare Six-Month Lookback Trap

Health Savings Accounts can be incredibly valuable, especially for people who have spent years building a balance and are approaching retirement.

But the rules around an HSA and Medicare create one particular trap that catches people off guard. It often affects successful business owners and executives who keep working past age 65, stay on an employer health plan, and continue funding an HSA.

The problem is not simply that Medicare eventually stops your ability to contribute to an HSA. The bigger issue is that Medicare Part A can become effective retroactively.

That retroactive coverage can turn HSA contributions that looked perfectly normal at the time into excess contributions after the fact.

For someone planning to work beyond 65, this is a rule worth understanding before enrolling in Medicare or applying for Social Security.

Medicare Changes Your HSA Eligibility

You can contribute to an HSA only while you meet the IRS requirements for HSA eligibility. That generally means you have qualifying high-deductible health plan coverage and do not have other disqualifying health coverage.

Medicare counts as disqualifying coverage.

Beginning with the first month you have Medicare coverage, your HSA contribution limit for that month drops to zero. That applies whether you enroll in Part A, Part B, or both.

This does not mean you lose your HSA when you enroll in Medicare. The account remains yours, and you can continue using the existing balance for eligible healthcare expenses.

You simply lose the ability to make new HSA contributions once Medicare coverage begins.

For people who enroll around age 65, that rule is usually manageable. The complication becomes much more important for someone who delays Medicare while continuing to work.

The Six-Month Medicare Lookback

Many people working past 65 delay Medicare because they remain covered under an employer health plan.

That can make sense. It can also allow them to continue contributing to an HSA as long as their coverage remains HSA eligible and they have not enrolled in Medicare.

Eventually, though, they retire or decide to enroll.

For most people who qualify for premium-free Medicare Part A, Medicare can make Part A effective retroactively for up to six months when they apply after age 65. The retroactive period cannot begin earlier than the first month the person became eligible for Medicare.

That creates the trap.

Imagine you are 67, still working, covered by an HSA-qualified employer plan, and contributing to your HSA every month.

In October, you decide to retire and apply for Medicare.

Your Medicare Part A coverage may reach backward six months. Instead of beginning in October, Part A could become effective as early as April.

You were no longer HSA eligible beginning in April, even though you did not know that in April.

Any HSA contributions allocated to those months can become excess contributions.

That is why Medicare tells people who delay enrollment for at least six months beyond age 65 to stop contributing to their HSA six months before the month they apply for Medicare.

The same issue can arise when you apply for Social Security benefits after age 65 because applying for Social Security can also trigger retroactive premium-free Part A enrollment.

Your Final-Year HSA Limit May Be Smaller Than You Think

Another common mistake involves assuming you can contribute the entire annual HSA maximum during your Medicare enrollment year.

HSA limits generally operate on a monthly basis when you lose eligibility during the year.

For 2026, the HSA contribution limit is $4,400 for self-only coverage and $8,750 for family coverage. An HSA-eligible individual age 55 or older can also contribute an additional $1,000 catch-up contribution.

Consider someone age 65 with qualifying family coverage whose Medicare coverage starts July 1, 2026.

That person had six HSA-eligible months: January through June.

Six months represents half of the year, so the basic family contribution limit would generally equal half of $8,750, or $4,375.

The $1,000 age-55 catch-up also gets prorated based on HSA eligibility. Six months of eligibility would provide another $500.

That produces a total 2026 HSA contribution limit of $4,875.

Employer contributions count toward that limit too. If the employer already contributed $1,500, the employee could generally contribute only another $3,375 without exceeding the $4,875 total.

This calculation becomes even more important when Medicare applies retroactively.

Someone applying for Medicare in October might initially think they had nine months of HSA eligibility. A six-month Part A lookback could move the Medicare effective date to April 1, leaving only January, February, and March as eligible HSA contribution months.

The contribution limit can change dramatically.

HSA Payroll Contributions Count Too

People sometimes think of HSA contributions as money they personally transfer into the account.

The IRS looks at the total.

Your contributions, employer HSA contributions, and contributions that someone else makes on your behalf can all count toward your annual contribution limit.

That means you should not simply stop your personal transfers six months before Medicare enrollment.

You also need to check payroll.

If your employer automatically deposits money into your HSA every pay period, those deposits may need to stop too.

For business owners, this deserves particular attention because HSA contributions may run automatically through payroll or benefits systems long after the owner has started planning a Medicare transition.

What Happens If You Already Contributed Too Much?

Finding an excess contribution does not necessarily mean you have created a permanent tax problem.

You generally can correct excess HSA contributions.

The IRS allows you to withdraw an excess contribution and the earnings attributable to it by the due date of your tax return, including extensions. When completed properly, the IRS treats the excess amount as though you had not contributed it for purposes of the 6% excise tax. The earnings generally must get included in income.

You should coordinate the correction with the HSA custodian rather than simply taking a normal HSA withdrawal. Ask specifically about their process for a return or removal of an excess contribution.

If you leave an excess contribution in the HSA, the IRS generally imposes a 6% excise tax, and that tax can continue for each year the excess remains in the account.

Forms 8889 and 5329 also come into play when calculating and reporting HSA contribution limits and excess contributions.

This is one of those situations where I would rather fix the issue as soon as we find it instead of discovering it while preparing a tax return months later.

Your Spouse May Still Be Able to Contribute

Medicare eligibility applies individually.

Suppose one spouse enrolls in Medicare at 65 while the other spouse remains younger, continues working, and remains covered by an HSA-qualified health plan.

The spouse who enrolled in Medicare can no longer contribute to their HSA.

That does not automatically eliminate the other spouse’s HSA eligibility.

If the non-Medicare spouse remains an eligible individual and has qualifying family HDHP coverage, that spouse may generally continue making contributions to their own HSA based on the applicable family contribution limit. If that spouse has only self-only HDHP coverage, the self-only limit applies instead.

Each spouse’s age-55 catch-up contribution also belongs in that spouse’s own HSA. A spouse enrolled in Medicare can no longer use HSA eligibility to make a catch-up contribution.

The older spouse can still keep and spend money from an HSA accumulated before Medicare enrollment.

That distinction matters. Medicare stops contributions. It does not confiscate or close the HSA.

Coordinate Medicare Before You Submit the Application

For someone retiring at 65, Medicare planning often follows a fairly predictable calendar.

For someone retiring at 67, 70, or later, I think the HSA discussion needs to happen much earlier.

Before submitting a Medicare or Social Security application, look at your expected Medicare effective date, HSA contribution history, employer contributions, payroll elections, and your spouse’s coverage.

Then calculate how many months of HSA eligibility you will actually have during the year.

Do that before the Medicare application creates a retroactive coverage date.

This is particularly relevant heading into Medicare’s annual enrollment season, when Medicare naturally starts getting more attention. The HSA issue, however, depends on your individual Medicare enrollment and effective dates, not simply the annual enrollment calendar.

My Final Thoughts

An HSA and Medicare can work very well together in retirement. The problem usually comes from getting the timing wrong during the transition.

If you plan to work beyond 65 and continue funding an HSA, do not treat Medicare enrollment as something you figure out a few weeks before retirement. The six-month Part A lookback can reach into contributions you already made and create a tax cleanup project you never expected.

I would rather work backward from the Medicare date, calculate the final HSA contribution carefully, coordinate payroll, and know exactly when contributions need to stop.

Retirement planning works better when your healthcare, taxes, investments, Social Security, and cash flow decisions all connect. Medicare enrollment should be part of that plan, not a separate decision you make at the last minute.