Can I contribute to an HSA after enrolling in Medicare Part A?

    Last updated: March 2026

    Short Answer

    No. Once you are enrolled in any part of Medicare, including Part A, you can no longer contribute to a Health Savings Account (HSA). This includes retroactive Part A enrollment. Both your own contributions and your employer's payroll contributions must stop.

    Check Your Medicare Enrollment Timing

    Use the Medicare Intake tool to check your Medicare enrollment timing based on your age, coverage, and work status.

    What You Should Know

    IRS rules prohibit HSA contributions for anyone enrolled in Medicare. Since Part A can be retroactive up to 6 months when you sign up (especially if you're 65+ and signing up for Social Security), this can create a surprise: contributions made during those retroactive months may need to be withdrawn to avoid tax penalties. If you want to keep contributing to an HSA while working past 65, you should delay Part A, which means delaying Social Security benefits as well.

    The connection between Social Security and Part A is important. If you apply for Social Security benefits at 65 or later, Medicare Part A enrollment is automatic and retroactive. You cannot have Social Security without Part A.

    If you are still working past 65 and want to keep your HSA, you must delay both Social Security and Medicare Part A. You can still delay Part B separately with qualifying employer coverage from a large employer. The HSA and Medicare guide explains the timing in detail.

    If contributions may have continued after Medicare began, ask payroll, your HSA custodian, or a tax professional about correcting possible excess contributions and earnings.

    When This Question Matters

    • You are 65+ and contributing to an HSA
    • You are signing up for Social Security or Railroad Retirement benefits after 65
    • You want to enroll in Part A only and keep your HSA contributions going
    • You have a high-deductible health plan with an HSA through your employer

    What Happens If You Get This Wrong

    Contributing to an HSA while enrolled in any part of Medicare — including retroactively applied Part A — triggers IRS penalties. You face a 6% excise tax on excess contributions for each year they remain in the account.

    Frequently Asked Questions