The HSA Medicare penalty is not a penalty for simply keeping or spending your Health Savings Account after Medicare starts — it is a penalty for contributing to an HSA for months after Medicare coverage begins. According to IRS Publication 969, once you are enrolled in any part of Medicare — Part A or Part B — your HSA contribution limit is zero beginning that first month. Contributing after that point creates excess contributions that are generally not deductible, may be included in income, and are subject to a 6% IRS excise tax for each year the excess remains in the account. A critical risk: Part A can be retroactive by up to 6 months when you apply after age 65 — so contributions during that retroactive window can also become excess contributions. Stop all HSA contributions — your own and your employer's payroll contributions — at least 6 months before you plan to retire, apply for Medicare, or apply for Social Security or Railroad Retirement benefits. Existing HSA funds are not lost and can still be spent tax-free on qualified medical expenses.
The rules that apply depend on your specific situation:
Use the Medicare Intake tool to check your Medicare enrollment timing and how it may affect your HSA.
Key rules about HSA contributions and Medicare:
No. IRS rules prohibit new HSA contributions once you are enrolled in any part of Medicare, including Part A or Part B. Contributing after Medicare enrollment begins can result in excess contributions subject to income tax and a 6% excise tax penalty. Both your own deposits and your employer's payroll contributions count toward this limit.
Both. Enrollment in any Medicare part ends HSA contribution eligibility. Part A alone ends it; Part B alone ends it. You do not need to be enrolled in both to trigger the restriction. Employer payroll contributions face the same restriction as personal deposits.
If you apply for Social Security or Medicare after age 65, Part A can be retroactive by up to 6 months from your application date — but no earlier than the month you first became eligible for Medicare. HSA contributions made during that retroactive period — by you or by your employer — may be treated as excess contributions, triggering income tax and a 6% excise tax. To avoid this, stop all contributions at least 6 months before you plan to apply.
Yes. Your employer's payroll contributions to your HSA must also stop once you enroll in any part of Medicare. Both employee and employer contributions are subject to the same IRS excess contribution rules. Coordinate with your HR department or payroll provider to stop employer contributions. If excess contributions have already been made, speak with your payroll department, HSA custodian, or a tax professional about correcting them.
Your existing HSA funds are not lost when you enroll in Medicare. You can spend them tax-free on qualified medical expenses, including Medicare Part B, Part D, and Medicare Advantage premiums. You cannot use them for Medigap premiums. You cannot make new contributions, but your balance is yours to use.
No. HSA status does not affect when you need to enroll in Part B. Part B timing depends on your employer coverage, employer size, whether you are actively working, and penalty risk. An HSA neither requires nor exempts you from Part B enrollment.
If your employer has fewer than 20 employees, Medicare is typically primary for Part B coverage at age 65. Delaying Part B in that situation can cause your employer plan to underpay or deny claims that Medicare should have covered. You should generally enroll in Part B at 65 in this case, even if it ends HSA contributions.
Yes, but only for the months you were HSA-eligible — the months before Medicare enrollment began in that calendar year. The IRS prorates the annual HSA contribution limit: you are entitled to one-twelfth of the annual limit for each eligible month. Contributions beyond that prorated amount are excess contributions and are subject to income tax and the 6% IRS excise tax. Coordinate with your HSA custodian or a tax professional to confirm your prorated limit for the year Medicare starts.
People researching this Medicare topic often also compare related enrollment, coverage, and penalty rules. The guides below can help you explore closely related Medicare situations.