If you have a high deductible health plan, you may also have a health savings account (HSA). You should stop paying into an HSA 6 months before you enroll or are automatically enrolled in Medicare.

HSAs allow you to save on medical costs. You can set aside pretax dollars to pay into your HSA and use the funds toward healthcare costs.

You can have pretax dollars paid directly from your paycheck into your HSA, or you can add your own money, which becomes tax-deductible.

If you’re approaching Medicare age, for which you become eligible when you turn 65, you should stop making HSA contributions to avoid paying a penalty.

You should stop paying into an HSA up to 6 months before you enroll or are automatically enrolled in Original Medicare Part A, or up to the first day of the month in which you turned age 65, whichever is shorter.

This is because Medicare Part A can give you up to 6 months of retroactive health coverage that begins when you apply for Social Security benefits.

If you add excess funds to your HSA, you may be subject to a 6% excise tax on the excess contributions.

However, even though you cannot make contributions after a specific time, you can still use the money you have in your HSA toward healthcare expenses, including toward the cost of:

  • Medicare or other health coverage if you are age 65 or older, excluding Medigap premiums
  • long-term healthcare insurance
  • health insurance continuation coverage (such as through COBRA)
  • healthcare coverage while getting unemployment compensation; can be under either federal or state law

If you continue to work past age 65 and you are contributing to an HSA, you must delay enrollment in Original Medicare Part A and Part B. To avoid a penalty, you must then stop contributing to your HSA 6 months before you plan to enroll in Original Medicare.

If you are married, and you and your spouse have individual HSAs, you can both continue to make contributions to your own accounts.

However, if you have an HSA with a family contribution limit, the spouse who becomes eligible for Medicare will no longer be able to make contributions, and the remaining spouse will need to change to self-only coverage.

To have an HSA, you must be eligible for a high deductible health plan (HDHP), and you cannot have another type of health plan, including Medicare, alongside it.

In 2025, if you have a single or self-only HDHP, you can contribute a maximum of $4,300 to an HSA. If you have family HDHP coverage, you can contribute a maximum of $8,550.

You can use the money in an HSA for qualified medical expenses, including:

  • Medicare Part B premiums
  • Medicare Advantage (Part C) premiums
  • Medicare Part D prescription drug plan premiums
  • all Medicare deductibles, copayments, and coinsurance
  • over-the-counter medications
  • dental and vision expenses
  • insulin and diabetes supplies
»Learn more:Medicare and HSAs

If you have an HDHP, you may also have an HSA.

Because you cannot be enrolled in Medicare while also being eligible to pay into an HSA, you should stop paying into your HSA 6 months before enrolling in Medicare or being automatically enrolled in Medicare.

If you continue working past age 65 and would like to continue contributing to an HSA, you must stop making HSA contributions before enrolling in Medicare Part A or Part B. Remember, you may automatically be enrolled in Medicare Part A if you apply for Social Security benefits.

If you pay into an HSA after enrolling in Medicare, it is considered an excess contribution, and penalties may apply.