June 18, 2026

HSA and Medicare: Why enrolling ends contributions

Working past 65 while contributing to a Health Savings Account is a deliberate retirement strategy for many high earners.


Working past 65 while contributing to a Health Savings Account is a deliberate retirement strategy for many high earners. Delaying Medicare enrollment can preserve HSA contribution eligibility if the person otherwise remains HSA-eligible, allowing continued contributions through payroll or direct deposit. The strategy holds together as long as no enrollment trigger occurs.

The problem surfaces at the moment of enrollment. Medicare retroactive provisions can reach back through months of HSA contributions that should not have continued, creating excess contributions and excise tax exposure that surprises both the contributor and the tax preparer the following spring.


Medicare enrollment disqualifies the person from making HSA contributions for any month enrolled. This includes premium-free Medicare Part A. The disqualification mechanism is about the technical status of being enrolled in Medicare, regardless of whether Part A carries a premium.

For people who apply for premium-free Medicare Part A after age sixty-five, the Part A effective date generally reaches back up to six months from the date they apply for Medicare, Social Security, or Railroad Retirement Board benefits, but not earlier than the first month they were eligible for Medicare. That matters because someone may think they are planning around a future coverage month, while the HSA contribution problem is measured from the retroactive Part A effective date.

Starting Social Security after age 65 carries its own trap. Social Security enrollment automatically enrolls the person in Medicare Part A if they are eligible for premium-free Part A, and the same retroactive lookback rules can apply. A person who starts Social Security at age 67 may find Part A coverage extending six months before the application date, which means HSA contributions made during that retroactive window are excess contributions even though Medicare was never the thing they thought they were actively requesting. Lovely system design, naturally.


Consider a worker who is 67 and continues contributing to a family HSA at the full annual limit because the employer health plan is a qualifying high-deductible plan. In August, the worker applies for Social Security and Medicare. They expected Medicare to matter later in the year, when they planned to transition coverage.

Premium-free Part A can be made effective back to February because the retroactive Part A rule looks back up to six months from the application date. Contributions allocated to the retroactive Medicare months are now excess contributions.

Every HSA contribution made for the months February through the end of the contribution period is now a problem if those months were treated as Medicare-enrolled months. If the worker contributed approximately seven hundred dollars per month during that window, the cumulative excess could reach several thousand dollars.

That excess contribution is subject to a six percent excise tax for each year it remains in the HSA. The tax can repeat year after year if the excess is not removed or otherwise resolved. Add the income tax problem from a contribution that was originally deducted, plus any earnings on the excess that must also be addressed, and the total cost can grow quickly.


The correction depends on timing.

Excess contributions returned with their earnings by the tax filing deadline, including extensions, for the year in which the excess occurred can avoid the six percent excise tax for that year. The contribution is reported on Form 8889 and corrected through a return of excess. The earnings are taxable in the year they are withdrawn.

Excess contributions left in the account past that deadline trigger the six percent excise tax for the year, reported on Form 5329, and the tax repeats annually until the excess is removed or otherwise resolved.

The cleaner path is prevention. A worker who expects to enroll in premium-free Part A after age sixty-five often needs to stop HSA contributions up to six months before applying for Medicare, Social Security, or Railroad Retirement Board benefits. The exact cutoff depends on the effective date and how contributions are allocated by month, which is why this rule deserves attention before the application is filed.

A worker who plans to delay Social Security past 65 should know that applying for Social Security can automatically trigger Part A enrollment with the same retroactive lookback. The HSA strategy requires both Medicare and Social Security to remain unenrolled until the contributor is prepared to stop funding the account.

The standing IRS source on this is Publication 969, which addresses HSA eligibility and the high-deductible health plan requirement. Form 8889 reports HSA contributions and distributions on the annual tax return. Form 5329 reports excise taxes on excess contributions.

The rule rewards stopping early. People who plan ahead are sometimes the ones who get caught worst, because the retroactive lookback stretches back from a thoughtful application date. The HSA strategy can still work after 65. It just has to respect the Medicare clock, because the Medicare clock does not care that the HSA contribution looked perfectly reasonable when it went in.

I write one of these every day, one retirement rule, explained in plain language and verified against the source. The daily email is free: subscribe here.


Full archive, worksheets, and search live at RetirementNewsRundown.com.


Disclaimer

This article is for educational and informational purposes only. It is not tax, legal, or financial advice and does not create an advisor–client relationship. Always consult appropriate professionals regarding your specific situation.

Frequently Asked Questions

Can I keep contributing to my HSA after I turn 65 if I don't enroll in Medicare?

Yes, you can continue contributing to your HSA after age 65 as long as you remain HSA-eligible and don't enroll in Medicare. However, once you enroll in Medicare—including premium-free Part A—you become disqualified from making any further HSA contributions for that month onward. This makes delaying Medicare enrollment a strategy some high earners use to extend their HSA contribution years.

What happens to my HSA contributions if I enroll in Medicare retroactively?

Medicare has retroactive provisions that can reach back several months, meaning your HSA contributions during those retroactive months may be considered excess contributions. This creates excise tax exposure that often surprises both the contributor and tax preparer when filing the tax return the following spring. You'll need to address these excess contributions and any resulting penalties.

Does enrolling in premium-free Medicare Part A stop my HSA contributions?

Yes, enrolling in premium-free Medicare Part A disqualifies you from making HSA contributions. The disqualification is based on your enrollment status in Medicare itself, not on whether you're paying premiums. Even if Part A is free, the moment you're enrolled, you can no longer contribute to an HSA.

How can I avoid excess HSA contributions when I turn 65?

To avoid excess contributions and excise taxes, be proactive about timing your Medicare enrollment in relation to your HSA contributions. If you plan to work past 65 and continue contributing to your HSA, coordinate with your HSA administrator and tax preparer to ensure you understand the exact month your Medicare enrollment becomes effective, including any retroactive coverage periods.

Take this further

All-Access
Get the tools that go with the rules.
All-Access includes every retirement planning and correction tool on the site. $149/year or $19/month.
Read the full guide
Browse all retirement guides

Get the retirement rule mistakes most people learn too late

Everyday-language breakdowns of IRS rules, contribution limits, and the deadlines that cost people money. Daily. Free.

Knowledge Blast: What Changes With Your HSA After Age 65
Knowledge Blast: The HSA last-month rule and testing period