English | Español

Medicare Topics

HSA and Medicare: When to Stop Contributing

You cannot contribute to a Health Savings Account once you are enrolled in any part of Medicare, including premium-free Part A. Because Part A can be backdated up to 6 months when you enroll after 65, most people need to stop contributing 6 months before they apply for Medicare or Social Security, not on their actual enrollment date.

Why HSA contributions and Medicare don’t mix

A Health Savings Account requires you to be covered only by a qualifying high-deductible health plan (HDHP), with no other health coverage that pays before the deductible is met. Medicare counts as other coverage, so the moment you are enrolled in any part of it, even just Part A with no premium, you are no longer eligible to put new money into an HSA.

This catches a lot of people off guard because premium-free Part A often starts automatically. If you are already collecting Social Security retirement benefits when you turn 65, Medicare Part A enrolls you automatically, there is no separate decision to make, and no way to decline just Part A without also giving up your Social Security cash benefits.

The 6-month lookback rule that catches people off guard

If you enroll in Medicare, or start Social Security retirement benefits, after your 65th birthday, Part A coverage is applied retroactively, up to 6 months back, but never earlier than the month you actually turned 65. That retroactive window is the trap: any HSA contribution made during those backdated months becomes an excess contribution after the fact, even though you had no way of knowing your exact enrollment date yet when you made it.

If you sign up for Medicare right at 65, during your Initial Enrollment Period, there is no lookback problem, since there is no "before 65" month for Part A to reach back into. The lookback only matters for someone who delays enrolling past 65, most often because they are still working with employer coverage.

Find your HSA stop-contribution date

Educational estimate only. This calculator assumes you plan to enroll in Medicare after age 65 and applies the 6-month lookback. It does not replace advice from a tax professional or Social Security.

Enter both dates above to see your stop-contributing date.

What happens if you contribute after you should have stopped

The IRS treats a contribution made during an ineligible month as an excess contribution. Excess HSA contributions are subject to a 6% excise tax for every year they remain in the account, on top of being added back to your taxable income. The usual fix is to withdraw the excess amount, plus any earnings it generated, before you file your tax return for that year, which generally avoids the 6% excise tax going forward.

A tax professional or your HSA administrator can walk through the withdrawal paperwork with you. The important part for Medicare planning is avoiding the problem in the first place by stopping contributions before the retroactive Part A window can reach them.

Working past 65 with employer coverage

If you are still actively working at 65 and your employer has 20 or more employees, you can generally keep your HSA-eligible group health plan and keep contributing, and delay enrolling in Medicare without a late penalty until that coverage or your employment ends. A Special Enrollment Period then gives you 8 months to sign up for Part B without a late penalty.

If your employer has fewer than 20 employees, the rule is different: Medicare generally becomes your primary coverage at 65 whether or not you keep working, so delaying enrollment is riskier and can leave gaps in what your employer plan actually pays. Check with your employer's benefits office or a licensed agent before assuming you can wait, this is one of the most common points of confusion for people working past 65.

2026 HSA contribution limits

For 2026, the IRS annual HSA contribution limit is $4,400 for self-only HDHP coverage and $8,750 for family coverage, plus an extra $1,000 catch-up contribution for anyone 55 or older who is not enrolled in any part of Medicare. These limits apply to the months you are actually HSA-eligible in a given year, if you stop being eligible partway through the year, your limit for that year is prorated down to the number of eligible months.

Source: https://www.irs.gov/pub/irs-drop/rp-25-19.pdf

What to do before you apply for Medicare or Social Security

If you are past 65, still working, and still contributing to an HSA, the safest move is to stop new contributions at least 6 months before the date you plan to apply for Medicare or Social Security retirement benefits, then confirm your exact numbers with a tax professional. If you are applying for Medicare right at 65, during your Initial Enrollment Period, the lookback generally does not apply and you can keep contributing right up until your Part A start date.

See the turning 65 timeline tool to find your own enrollment window, or the enrollment periods and penalties guide for how Special Enrollment Periods work if you are delaying Medicare because of employer coverage.

Common questions about HSA and Medicare

Can I keep contributing to my HSA once I enroll in Medicare?

No. Enrolling in any part of Medicare, including just premium-free Part A, makes you ineligible to contribute to a Health Savings Account. You can still spend money already in the account on qualified medical expenses, including Medicare premiums, deductibles, and copays, you just cannot add new contributions.

Why does it matter that Part A can be backdated 6 months?

If you sign up for Medicare or start Social Security retirement benefits after your 65th birthday, Part A coverage is applied retroactively up to 6 months, but never earlier than the month you turned 65. Since Medicare enrollment makes you HSA-ineligible, any contribution made during that backdated window becomes an excess contribution, even though you did not know you had Part A yet.

What happens if I contribute to my HSA after I should have stopped?

The IRS treats that amount as an excess contribution, which is subject to a 6% excise tax for every year it stays in the account. You generally need to withdraw the excess (plus any earnings on it) before you file your tax return for that year to avoid the penalty.

I am still working at 65 with health insurance through my job. Do I have to stop my HSA contributions?

If your employer has 20 or more employees and you are not yet enrolled in Medicare, you can generally keep your HSA-eligible employer plan and keep contributing, and you can delay enrolling in Medicare without a late penalty until that coverage or your employment ends. Once you do enroll in Medicare, the same stop-contributing rule applies.

Does it matter if my employer has fewer than 20 employees?

Yes. At a smaller employer, Medicare generally becomes your primary coverage at 65 whether or not you are still working, and delaying enrollment is riskier. Check with your employer’s benefits office or a licensed agent before assuming you can wait.

Can I still use my existing HSA balance after I am on Medicare?

Yes. Money already in your HSA stays yours and can be spent tax-free on qualified medical expenses for the rest of your life, including Medicare Part B and Part D premiums, deductibles, copays, and coinsurance. You just cannot add new contributions once you are enrolled in Medicare.

Sources

Figures verified 2026-10-01. No data you enter above is stored, saved, or sent anywhere; the calculation runs in your browser only.

Last updated: October 2, 2026

Prefer to call? 866-717-8683

Talk to a licensed agent

No pressure, no obligation. Fill out the form and we will reach out.