Medicare and HSAs don’t mix — what near-retirees need to know

Dear Ms. MoneyPeace,

I am retiring this year and trying to understand Medicare. At this point I am covered fully by a company plan. I turned 65 last fall and plan to retire in August or September. 

While researching, I saw a sentence about not having a Health Savings Account (HSA) while being qualified for Medicare. My company has a high-deductible insurance, so offers an HSA. Since I am on their plan, I have the HSA. Shouldn’t that be the issue when I get on Medicare, not now? 

I have never heard of this. Did I read it wrong? Could you explain it? I like having my HSA and want to keep it.

— Puzzled by Medicare rules

Dear Puzzled,

You are not alone in your confusion.

In 2013, HSA’s were designed to work in conjunction with the high-deductible health insurance plans (HDHP.) Once you are eligible for Medicare, you no longer have an HDHP. Health Savings Account contributions are disallowed when other health insurance is in place. You may use the funds in the HSA but not contribute more money to the account. (See: 2022 Publication 969 (

Sandy Anderson, Medicare specialist and consultant at Medicare Northeast, helped clarify this little-known glitch in retirement planning.

“If they are eligible for Medicare Part A, a person can no longer contribute to an HSA.”

This gets confusing as you are eligible to sign up for Medicare before you turn 65 and coverage starts the first of the month in which you turn 65. Planning ahead is critical.

Read: When does Medicare coverage start?

An added twist is that if you are already collecting Social Security before you turn 65, you are automatically enrolled in Medicare Part A. Professional advice in the past was since there are no premiums for Part A (you qualify from work experience), retirees and preretirees were encouraged to sign up right away; however, to avoid HSA penalties, you cannot have both health programs. Penalties can be avoided by not contributing after you are qualified for Medicare. If you have made this mistake, you are allowed to withdraw the excess contributions before you file your taxes for that year to avoid overfunding and being penalized—if you know about it.

Read: Medicare’s tricky rules on HSAs after age 65—Journal of Accountancy

Exceptions exist

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. Therefore, if you are still working and have HDHP (or you are covered by a spouse’s insurance) but not filed for Medicare Part A, the maximum can be contributed to an HSA. (See: Section 223—Health Savings Accounts ( For 2023, if you have self-only HDHP coverage, you can contribute up to $3,850. If you have family HDHP coverage, you can contribute up to $7,750. (See: 2022 Publication 969 (

If you wait because you have a one of the above qualified exceptions, you still have to stop contributions six months ahead of starting Medicare Part A. For HSAs, section 223(b)(7) of the Internal Revenue Code states that an individual may not contribute to an HSA for months the individual is entitled to benefits under Medicare.

This is critical to know — as of 2022 there are 30 million active HSAs covering more than 63 million people. These accounts allow for tax-deductible contributions until one is Medicare qualified. 

Read: HSAs gain traction with older and younger Americans alike, covering more than 63 million people across all 50 states at the end of 2020 — Devenir   

Informal reports have shown that even large human resources departments are unaware of this little-known rule. Unless you are getting professional financial advice, this may fall through the retirement cracks.

“Fun fact” that Sandy Anderson wanted readers to know: After age 65 the owner of the HSA can withdraw the funds for any purpose and only pay taxes on the earnings. So your mortgage, retirement trip or any nonmedical expense could be funded. Though it is best left for medical expenses, there are options and reasons to fund as long as you can.

Read: A 63-year-old woman had a heart attack. Her advice could save your life.

How will anyone know?

An IRS tax audit would pick up an excess contribution; however, making an erroneous HSA contribution will not get you audited, Anderson said. Instead, if you were to get audited and were collecting Social Security and Medicare as well as over age 65, that information would put the IRS auditor on notice of this oversight. The result will cost you money in penalties and interest, so why take that chance?

Despite being dreaded, these audits are not common. For most income groups, the chances of an audit are below 1%. In 2019, that percentage dropped to 0.45%; however, with the recent hiring by the IRS, all aspects of auditing and actions would be expected to increase. According to the IRS, the chance of an audit increases with a significant increase in income. For example those with over $10 million in income have almost a 9 % audit rate. 

What are the ways around it?

Front load your HSA account. Plan ahead by increasing your HSA monthly contribution to reach the maximum early in the year you retire. You will have less income those months but the last six months of working, you will have more in your paycheck than usual. This way you can build a strong well-funded health account for your retirement years.

More people are unaware of this mundane fact than aware of it. Knowing it and following the rules will make your life easier in the long run. 

Don’t get stuck in this trap.

CD Moriarty, CFP, is a Vermont-based financial speaker, writer and coach who wants to create financial peace of mind for others.