HSA Medicare Penalty: Contributions, Part A, and 6-Month Rule

    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.

    Check Your Medicare Status

    Use the Medicare Intake tool to check your Medicare enrollment timing and how it may affect your HSA.

    What you need to know about HSA and Medicare timing

    Key rules about HSA contributions and Medicare:

    • there is no penalty for simply keeping or using existing HSA funds after Medicare starts — the penalty is for making new contributions after Medicare coverage begins
    • once enrolled in Medicare, your HSA contribution limit is zero beginning the first month of Medicare coverage — this is an IRS rule (Publication 969), not just a plan rule
    • excess contributions — those made after Medicare enrollment began — are generally not deductible, may be included in gross income, and are subject to a 6% IRS excise tax for each year the excess remains in the account
    • any Medicare enrollment — Part A or Part B — stops new HSA contributions
    • stop both your own contributions and your employer's payroll contributions — both must stop before Medicare enrollment begins
    • to protect yourself from retroactive Part A, stop all HSA contributions at least 6 months before you plan to retire, apply for Medicare, or apply for Social Security or Railroad Retirement benefits
    • Part A can begin up to 6 months before your application date (but no earlier than the month you first became eligible for Medicare); contributions during that retroactive window may be excess contributions under IRS rules
    • Social Security or Railroad Retirement benefits at 65 or later include automatic Part A enrollment, which ends HSA contribution eligibility immediately
    • existing HSA funds are not lost — you can still spend them tax-free on qualified medical expenses, including Medicare Part B, Part D, and Medicare Advantage premiums (not Medigap)
    • having an HSA does not exempt you from Part B or change when you need to enroll
    • if your employer has fewer than 20 employees, Medicare is typically primary at 65 — delaying Part B can create coverage problems regardless of HSA status
    • if your employer has 20 or more employees and you are actively working, you may be able to delay Part B — but delaying Part B does not preserve HSA contribution eligibility once Part A has started
    • if excess HSA contributions have been made after Medicare enrollment began, speak with your payroll department, HSA custodian, or a tax professional about correcting them
    • if Medicare enrollment begins mid-year, your annual HSA contribution limit is prorated — you are generally entitled to one-twelfth of the annual HSA limit for each calendar month you were HSA-eligible (not enrolled in Medicare) in that year; contributions beyond that prorated limit are excess contributions subject to income tax and the 6% excise tax
    • to avoid the 6% excise tax, you can correct excess contributions by withdrawing the excess amount — and any earnings on it — by your federal income tax filing deadline, including extensions; contact your HSA custodian to request a return of excess contributions before that deadline

    This page is especially helpful if you:

    • have an HSA and are approaching age 65
    • are working past 65 and contributing to an HSA
    • are unsure when to stop both your own and your employer's HSA contributions before Medicare enrollment
    • have already enrolled in Medicare and are still contributing to an HSA
    • want to understand how Social Security and retroactive Part A affect your HSA
    • have an employer with fewer than 20 employees and want to understand payer order
    • think excess HSA contributions may have been made and need general direction

    Common Questions

    Can I contribute to an HSA after enrolling in 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.

    Does Part A or Part B stop HSA contributions — or both?

    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.

    What is the retroactive Part A problem?

    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.

    Do employer HSA contributions have to stop too?

    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.

    What happens to my existing HSA balance?

    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.

    Does my HSA exempt me from enrolling in Part B?

    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.

    What if my employer has fewer than 20 employees?

    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.

    Can I contribute to my HSA for the months before Medicare starts in the same year?

    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.

    Related Medicare Topics