Skip to content
MeetBrokers
Medicare

Medicare and HSA Contributions: When to Stop and Why

Once Medicare starts, your HSA limit drops to zero, even with only Part A. See when to make your last contribution and how to use HSA money on Medicare.

By MeetBrokers Editorial TeamUpdated November 23, 202612 min read

On this page
  1. Key takeaways
  2. Why do HSA contributions have to stop when Medicare starts?
  3. How does retroactive Part A coverage affect your HSA?
  4. When should you make your last HSA contribution before Medicare?
  5. How much can you contribute in the year Medicare starts?
  6. Does applying for Social Security stop your HSA contributions?
  7. Can you delay Medicare to keep contributing to your HSA?
  8. What if you contributed to your HSA after Medicare started?
  9. Can you use HSA money to pay Medicare costs?
  10. Can your spouse keep contributing to an HSA if you're on Medicare?
  11. What if you get Medicare because of a disability?
  12. Common mistakes with Medicare and HSA contributions
  13. Where can you get help with Medicare and HSA decisions?
  14. What to do next

Once you're enrolled in Medicare, you can't put any more money into a health savings account (HSA), even if Part A is the only part you have. Your HSA contribution limit drops to zero starting with your first month of Medicare, and that includes months when Part A coverage is backdated. This guide explains the retroactive Part A rule, when to make your last contribution, how to fix a contribution made by mistake, and how you can keep spending the money already in your HSA.

Key takeaways

  • Enrolling in any part of Medicare, including Part A alone, sets your HSA contribution limit to zero starting with your first month of Medicare coverage, including any backdated months. Money your employer puts in counts toward the limit too.
  • Premium-free Part A can be backdated up to 6 months from when you sign up for Part A or apply for Social Security or RRB benefits, but never before the first month you're eligible. The retroactive period can differ depending on how you became eligible. Contributions made during backdated months are excess contributions.
  • Medicare & You 2027 gives a timing chart for your last contribution. If you sign up during your Initial Enrollment Period, it's generally the month before you turn 65.
  • Claiming Social Security at 65 or later enrolls you in Part A. You can't decline Part A unless you withdraw your Social Security application and repay any benefits.
  • You can still use money already in your HSA for qualified costs. Medicare premiums count only if you're 65 or older, and Medigap premiums never count.

Why do HSA contributions have to stop when Medicare starts?

IRS Publication 969 lists four tests you must meet to contribute to an HSA:

  • You're covered by a high deductible health plan (HDHP) on the first day of the month.
  • You have no other disqualifying coverage.
  • You aren't enrolled in Medicare.
  • No one else can claim you as a dependent on their tax return.

Medicare enrollment fails the third test. The IRS says your contribution limit is zero beginning with the first month you're enrolled in Medicare. Part A counts on its own, so you don't need Part B or a drug plan for the rule to apply.

Do employer contributions count?

Yes. Publication 969 says your contribution limit must be reduced by employer HSA contributions that aren't counted as income, including money put in through a cafeteria plan. Once your limit is zero, your employer's deposits are excess contributions too. Medicare.gov's Working past 65 page says you and your employer should both stop contributing.

How does retroactive Part A coverage affect your HSA?

This is the rule that catches people who sign up after 65. Medicare.gov says premium-free Part A coverage goes back up to 6 months from the date you sign up for Part A or apply for Social Security or Railroad Retirement Board (RRB) benefits. It never goes back further than the first month you were eligible for Medicare. Medicare.gov also says the retroactive period can be different depending on how you became eligible.

The IRS says the zero limit applies to retroactive coverage. Any HSA money you put in during those backdated months counts as an excess contribution, even though you didn't have a Medicare card yet.

Here's how that plays out. Say you keep working past 65, keep contributing, and then apply for premium-free Part A at 68. Your Part A can start up to 6 months before your application. Contributions from those months become excess contributions that you'll need to fix.

When should you make your last HSA contribution before Medicare?

Medicare & You 2027 suggests making your last contribution the month before your Part A coverage begins. Its timing chart breaks that down by situation.

Your situation When to make your last HSA contribution
You sign up during your Initial Enrollment Period, or within 2 months after it ends The month before you turn 65
Your birthday is on the 1st of the month 2 months before the month you turn 65, because coverage generally starts the month before you turn 65
You sign up less than 6 months after turning 65 The month before you turn 65
You sign up 6 or more months after turning 65 6 months before the month you apply
You apply for Social Security or RRB benefits Medicare.gov says you and your employer should stop 6 months before you retire or apply for these benefits

Your Initial Enrollment Period is 7 months long. It starts 3 months before the month you turn 65 and ends 3 months after it. If you qualify for premium-free Part A and sign up during this window, Part A starts the month you turn 65, or the month before if your birthday is on the 1st.

Two examples

  • Birthday mid-month. You turn 65 on September 14 and sign up during your Initial Enrollment Period. Part A starts in September, so your last contribution is for August.
  • Birthday on the 1st. You turn 65 on October 1. Part A generally starts in September, so your last contribution is for August, 2 months before the month you turn 65.

Why do some sources say to stop six months before?

Medicare.gov's Working past 65 page says to stop contributing 6 months before you retire or apply for Social Security or RRB benefits. SSA's Retirement Benefits booklet says to stop at least six months before you apply for Medicare. Both match the 6-month lookback for Part A.

That lookback can't reach back before the first month you're eligible for Medicare. Medicare & You 2027's chart says that if you sign up during your Initial Enrollment Period, your last contribution is generally the month before you turn 65. Medicare.gov explains that Part A can't be backdated before the first month you're eligible. The six-month advice matters most if you sign up or claim benefits 6 or more months after you turn 65. If your situation doesn't fit the chart, ask your HSA administrator or a tax professional before your final deposit.

For a month-by-month view of the enrollment window, see our turning 65 Medicare checklist.

How much can you contribute in the year Medicare starts?

In the year Medicare starts, your limit is figured by month. Publication 969 gives this example: someone who turned 65 and enrolled in Medicare in July can contribute 6/12 of the yearly limit, catch-up contribution included. In other words, you count the months before Medicare when you met all the eligibility tests on the first day of the month.

Remember to subtract what your employer put in, since employer deposits count toward your limit. The yearly dollar limit changes every year, so check IRS Publication 969 for the current figure.

Does applying for Social Security stop your HSA contributions?

Yes, if you're 65 or older. SSA says people already getting Social Security retirement benefits are automatically enrolled in Original Medicare (Part A and Part B) at 65. You can turn down Part B but not Part A.

CMS says that once you've signed up for Social Security benefits, you can only delay Part B. The only way to opt out of Part A is to withdraw your Social Security application and repay any benefits you've already received.

Because applying for Social Security also triggers the Part A lookback, plan your last HSA contribution before you file. Applying at 67, for example, can backdate Part A up to 6 months.

Can you delay Medicare to keep contributing to your HSA?

Sometimes. Whether you can depends on the size of the employer providing your coverage and on whether you've signed up for Social Security. This guide doesn't recommend delaying or enrolling. It explains the rules so you can decide with your benefits administrator or a counselor.

Your coverage What CMS says
Current employer (yours or your spouse's) with 20 or more employees, plus an HDHP and HSA You can delay both Part A and Part B and keep contributing without a Medicare penalty, as long as you aren't getting Social Security benefits and you enroll within 8 months of losing that coverage or stopping work
Current employer with fewer than 20 employees Enroll in Part A and Part B at 65, because Medicare pays first
COBRA, retiree coverage, or employer money given to buy health insurance Not health coverage based on current employment for these rules

The 8-month Special Enrollment Period

After you stop working or lose job-based coverage, whichever comes first, you have an 8-month Special Enrollment Period to sign up for Medicare or add Part B. Medicare.gov says this window starts when you stop working even if you choose COBRA. COBRA doesn't count as group health plan coverage for this purpose.

If you sign up for Part B while you or your spouse are still working, or within the first full month after employer coverage ends, you can ask to delay your Part B start date by up to 3 months.

What delaying can cost

If you delay Part B without qualifying coverage, CMS says the Part B late enrollment penalty is a 10% increase in your monthly premium for each full 12-month period you could have had Part B but didn't. You pay it for as long as you have Part B. Our guide to the Medicare Part B late enrollment penalty explains how it's figured.

Delaying also moves your Medigap window. If you delay Part B because of group coverage from current employment, your 6-month Medigap Open Enrollment Period doesn't start until you get Part B. See how the Medigap Open Enrollment Period works.

For more on employer coverage after 65, read working past 65 and Medicare.

What if you contributed to your HSA after Medicare started?

Those deposits are excess contributions. The IRS says excess contributions generally face a 6% excise tax for every tax year they stay in the account, figured on Form 5329. Excess contributions can't be deducted. Excess contributions from your employer are included in your gross income. If they aren't in box 1 of your Form W-2, you report them as "Other income."

You can avoid the 6% tax by taking the excess out in time. Here are the steps:

  1. Find your Medicare start date. If Part A was backdated, use the backdated start date.
  2. Count the excess. Figure your limit for the year using the monthly method in Publication 969, subtract your employer's contributions, and compare that with everything put in for the year. Anything above your limit is an excess contribution. A tax professional can confirm the amount.
  3. Ask the company that holds your HSA to withdraw the excess plus any earnings on it. Do this by your tax return due date, including extensions.
  4. Report the withdrawal on Form 8889. The IRS says withdrawn excess contributions and related earnings go on lines 14a and 14b.
  5. If you already filed on time without withdrawing the excess, you can still withdraw it up to 6 months after the due date, not counting extensions. File an amended return marked "Filed pursuant to section 301.9100-2."
  6. If the excess stays in the account, figure the 6% excise tax on Form 5329 for each year it remains.

A tax professional can help you apply these steps to your own return.

Can you use HSA money to pay Medicare costs?

Yes. SSA says that even though you can't contribute once Medicare begins, you can use money already in your HSA to help pay deductibles, premiums, copayments, or coinsurance. Your balance stays yours to spend.

Which premiums count?

Publication 969 says you generally can't use HSA money for insurance premiums, with a few exceptions. One exception is Medicare and other health coverage if you're 65 or older. Premiums for a Medicare supplemental policy, such as Medigap, are not included. Check Publication 969 for the full list before you pay a premium from your HSA.

Your spouse's Medicare premiums

The owner's age matters. If you, the HSA owner, aren't 65 or older, Medicare premiums for a spouse or dependent who is 65 or older generally aren't qualified medical expenses.

The additional tax after 65

Publication 969 says no additional tax applies to HSA distributions made after you become disabled, reach age 65, or die. Distributions used for qualified medical expenses aren't taxed. See Publication 969 for how other withdrawals are taxed.

Can your spouse keep contributing to an HSA if you're on Medicare?

Your Medicare enrollment affects your own HSA eligibility. Your spouse's eligibility depends on whether they meet the four tests themselves.

  • There are no joint HSAs. Each spouse who is an eligible individual must open their own HSA.
  • Married-couple rules apply only if both spouses are eligible. Once you're on Medicare, you're no longer an eligible individual.
  • Catch-up contributions go in each person's own HSA.

For example, say you're 66 and enrolled in Medicare, and your spouse is 60 with HDHP coverage. Your spouse may keep contributing to their own HSA if they meet every eligibility test, including having no other disqualifying coverage. Confirm this with your plan or a tax professional.

What if you get Medicare because of a disability?

The same IRS rule applies: your contribution limit is zero starting with the first month you're enrolled in Medicare.

Medicare & You 2027 says people under 65 with a disability get Part A and Part B automatically after 24 months of Social Security disability benefits. People with ALS get them right away when benefits begin. Your Medicare card arrives 3 months before your 25th month of disability benefits. Use that notice to plan your last contribution.

If you have employer coverage from your own or a family member's current job, employer size decides who pays first:

  • 100 or more employees: the employer plan pays first.
  • Fewer than 100 employees: Medicare pays first, unless the employer is part of a multi-employer plan with 100 or more employees.

Talk to your employer's benefits administrator about how your HSA and HDHP work once Medicare starts.

Common mistakes with Medicare and HSA contributions

  • Thinking Part A alone is fine. Any Medicare enrollment sets your limit to zero.
  • Forgetting the employer deposit. Medicare.gov says you and your employer should both stop contributing, so check that payroll and employer deposits end too.
  • Ignoring the lookback. Signing up late or claiming Social Security after 65 can backdate Part A up to 6 months.
  • Using the full-year limit in your Medicare year. The limit is figured by month.
  • Paying Medigap premiums from your HSA. Publication 969 excludes them.
  • Leaving an excess in the account. The 6% excise tax applies each year it stays.

Where can you get help with Medicare and HSA decisions?

Different questions go to different people:

  • Tax questions, such as excess contributions and Form 5329, go to a tax professional.
  • Payroll deposits and how your plan works with Medicare go to your employer's benefits administrator.
  • Free Medicare counseling in Texas comes from the Health Information, Counseling and Advocacy Program (HICAP), the state's SHIP. Call 800-252-9240. HICAP offers free benefits counseling for Medicare beneficiaries of any age through Texas HHSC, Texas Legal Services Center, and the Area Agencies on Aging. Our Medicare in Texas guide covers more state details.
  • Comparing Medicare coverage once you enroll can be done with a licensed agent.

What to do next

  1. Find the month your Part A will start, or would start if you signed up today.
  2. Use the timing chart above to pick your last contribution month.
  3. Tell your employer to stop its HSA deposits for the same month.
  4. Figure your partial-year limit using Publication 969.
  5. If you already over-contributed, withdraw the excess plus earnings by your tax return due date, including extensions.

If you'd like help from an agent, MeetBrokers is free to use. Every listed agent holds a state license that anyone can verify by National Producer Number. Profiles marked "unclaimed" come from public licensing records. Browse licensed Medicare agents in Texas or Medicare agents in other states, and read how to choose a Medicare agent first.

When you're ready, you can request help from a licensed Medicare agent in Texas. Your request goes only to the agent you choose. MeetBrokers is not connected with or endorsed by the U.S. government or the federal Medicare program.

Frequently asked questions

I'm 66 and work for a company with fewer than 20 employees. Can I keep contributing to my HSA?

Under IRS rules, HSA eligibility depends on Medicare enrollment, not age. But CMS says that if your current employer has fewer than 20 employees, Medicare pays first and you should enroll in Part A and Part B at 65. If you sign up for premium-free Part A now, coverage can be backdated up to 6 months, but no earlier than the first month you were eligible for Medicare, and any HSA contributions for those months become excess contributions. Talk to your benefits administrator and a tax professional before your next deposit.

Does COBRA let me keep delaying Medicare so I can keep funding my HSA?

No. CMS says COBRA and retiree coverage are not health coverage based on current employment for Medicare enrollment rules. Your 8-month Special Enrollment Period starts when you stop working, even if you choose COBRA. Plan your Medicare enrollment and your last HSA contribution around the date your job ends.

Can I pay my Medicare premium bill with my HSA card?

Medicare & You 2027 says you can pay a Medicare premium bill with a Health Savings Account card, either through your secure Medicare account or by mail. Paying this way is a qualified HSA expense only if you, the account owner, are 65 or older. See IRS Publication 969 or ask a tax professional.

Do I need my high deductible health plan in place for the whole month to contribute?

IRS Publication 969 says you must be covered by a high deductible health plan on the first day of the month to be eligible for that month. You also can't have other disqualifying coverage, can't be enrolled in Medicare, and can't be claimable as a dependent on someone else's tax return.

If I sign up for Part B while I'm still working, when does it start?

Medicare.gov says that if you sign up for Part B while you or your spouse are still working, or within the first full month after employer coverage ends, you can ask to delay your Part B start date by up to 3 months. This can help you line up Medicare with the end of your job coverage. Part A timing follows its own rules, so check both dates.

Related guides

Not sure who to call? We'll match you.

Tell us your state and what you need. We show you one licensed agent, and nothing is sent until you confirm. Free, no obligation.

Get matched, free