Medicare’s tricky rules on HSAs after age 65

Specific enrollment procedures must be followed to avoid significant penalties.
By Kelley C. Long, CPA/PFS

Medicare’s tricky rules on HSAs after age 65
Image by Roy Scott/IKON Images

Before the tax-savings wonder that is the health savings account (HSA) was introduced in 2003, it was a generally accepted best practice for any worker who wasn't already collecting Social Security at the age of 65 to go ahead and sign up for Medicare Part A (hospital insurance), regardless of other coverage. By being "in the system," the person was more likely to avoid penalties for late enrollment in Part B (medical insurance), Part D (prescription drug coverage), or other Medicare policies if he or she continued working with employer-provided health care coverage, with no additional cost in premiums (since Part A is free).

This rule of thumb still applies, for the most part, but a crucial exception arises for anyone who works past age 65 and wishes to continue contributing to an HSA. As this article discusses, individuals who enroll in Medicare Part A are not allowed to continue funding their HSA.


A high-level overview of the Medicare enrollment rules is in order. According to

1. Taxpayers already receiving Social Security at their 65th birthday will automatically be signed up for Medicare. Taxpayers who aren't yet collecting Social Security and are still covered by an employer's group health plan because they are actively working (retiree medical plans do not count) may wish to defer signing up for Medicare at their 65th birthday in order to continue contributing to an HSA.

2. Besides the special enrollment periods available to workers who defer Medicare due to other eligible coverage, there are only certain times of year that Medicare recipients can sign up for or change coverage, which is why getting the sign-up process right is so important.

3. Signing up for Medicare Part B when first eligible avoids penalties. Generally speaking, taxpayers are able to defer Medicare past age 65 if they work for an employer with 20 or more employees while also enrolled in a group health plan based on that employment. However, they will need to take action to enroll upon leaving that plan in order to avoid lifetime penalties for late enrollment in Medicare Part B.


There are lots of quirks involved when determining whether a taxpayer is eligible to make contributions to an HSA (which are always tax-deductible as long as they are allowed), most of them having to do with health care plan design. But a separate rule that often trips up taxpayers is that HSA contributions are disallowed when a taxpayer has other coverage in addition to an HSA-eligible plan (Sec. 223(c)(1)(A)(ii)).

This applies to taxpayers whose other coverage is TRICARE (the health care program for uniformed service members, retirees, and their families). It also applies to anyone whose spouse is using a flexible spending account, which is technically other coverage under the HSA rules (limited-use flexible spending arrangements (FSAs) are the exception here and are typically offered alongside HSAs when available). Where this can get really sticky (and the focus of this article) is when a taxpayer works past age 65 with HSA-eligible group health coverage.


It's simplest to lay out the facts followed by an example to best help taxpayers and their advisers apply the nuances to specific situations:

  • HSA contributions (including employer-provided ones) are disallowed when other coverage is in place, including Medicare Part A. Workers can still enroll in HSA-eligible plans and use funds already in HSAs for eligible expenses; they just can't contribute further once enrolled in Medicare.
  • Workers may opt to participate in an HSA-eligible plan after enrolling in Medicare, typically because it's the only plan available to them at their workplace or because the lower premiums justify the choice, but they cannot contribute additional funds to their HSA nor can they accept contributions from their employer without penalty.
  • There is a six-month lookback period (but not before the month of reaching age 65) when enrolling in Medicare after age 65, so a best practice is for workers to stop contributing to their HSA six months before enrolling in Medicare to avoid penalties. See the examples below for more on this.
  • Funds already in the HSA can still be used for qualified medical expenses upon enrollment in Medicare, including to reimburse taxpayers for Medicare premiums (but not premiums for Medicare supplemental insurance) as well as to pay for long-term-care costs and insurance.
  • If a worker is already collecting Social Security upon turning age 65, he or she will be automatically enrolled in Medicare and henceforth no longer be able to contribute to his or her HSA. The only way to opt out of this would be to rescind the Social Security election (within 12 months) and pay back all benefits received to date.
  • A worker enrolling in Social Security upon reaching full retirement age will automatically be enrolled in Medicare Part A and consequently cannot make HSA contributions.

Example 1: To illustrate how the six-month lookback period operates, let's say that A plans to work until age 67 in order to reach her full Social Security retirement age and opts to defer Medicare until then as well in order to continue funding her HSA. If A's birthday (and therefore her Social Security and Medicare enrollment date) is July 1 or later that year, she simply needs to stop any contributions to an HSA during the calendar year of retirement six months prior to her birthday.

Example 2: Using the above example, except for changing A's retirement date to April 1, 2021, her Medicare enrollment with the six-month lookback would actually be Nov. 1, 2020. If A fully funded her HSA by the maximum allowable amount for 2020, she would need to recalculate for the two months of ineligibility then take steps to remove the excess contributions from the account. If A had already filed her 2020 income tax return before removing the excess contributions, an amendment may be in order as well to account for the loss of the tax deduction taken for ineligible contributions.


Note that to defer Medicare past age 65, the taxpayer must be enrolled in an employer-based group health plan. An HSA-eligible plan through the private marketplace, COBRA, or a health care exchange does not suffice, and in that case, he or she must cease contributions to the HSA upon reaching age 65 and enroll in Medicare to avoid lifetime late-enrollment penalties.

Once a taxpayer is age 65 or older and no longer has coverage through an employer-based group health plan, he or she has eight months to enroll in Medicare Part B to avoid a penalty. If that deadline is missed, there is a risk of a lifetime penalty for late enrollment as well as being unable to enroll until the Jan. 1—March 31 window, which doesn't start coverage until July 1. In other words, getting the Medicare Special Enrollment Period wrong risks a gap in coverage plus a lifetime of penalties.

It's a best practice for taxpayers to go ahead and enroll in Medicare Part B as soon as they decide to retire in order to avoid this scenario.


When taxpayers opt to continue working past age 65 and wish to continue funding an HSA, they need to be very clear on the Medicare rules of enrollment to avoid either penalties for excess HSA contributions or late-enrollment penalties for Medicare Part B and Part D.

About the author

Kelley C. Long, CPA/PFS, CFP, is a personal financial coach in Chicago. To comment on this article or to suggest an idea for another article, contact Dave Strausfeld, a JofA senior editor, at


PFP Member Section and PFS credential

Membership in the Personal Financial Planning (PFP) Section provides access to specialized resources in the area of personal financial planning, including complimentary access to Broadridge Advisor. Visit the PFP Center at Members with a specialization in personal financial planning may be interested in applying for the Personal Financial Specialist (PFS) credential. Information about the PFS credential is available at


Advanced Personal Financial Planning Conference at AICPA & CIMA ENGAGE

July 26—28

Deepen your ability to offer top-tier financial planning advice and learn the latest best practices, online or in person in Las Vegas.

Retirement Planning Certificate Program (Exam + Course)

This CPE self-study program is a series of courses covering the retirement planning life cycle, including planning for aging and chronically ill clients.

For more information or to make a purchase, go to or call the Institute at 888-777-7077.


Get your clients ready for tax season

Upon its enactment in March, the American Rescue Plan Act (ARPA) introduced many new tax changes, some of which retroactively affected 2020 returns. Making the right moves now can help you mitigate any surprises heading into 2022.


Black CPA Centennial, 1921–2021

With 2021 marking the 100th anniversary of the first Black licensed CPA in the United States, a yearlong campaign kicked off to recognize the nation’s Black CPAs and encourage greater progress in diversity, inclusion, and equity in the CPA profession.