Medicare: The 6-Month Rule to Know Before You Enroll
Aug 18 2026 13:00
By Austin Tyler · Tyler Insurance Group · Updated August 2026
Six months. Remember that number and this article has done its job.
Health Savings Accounts and Medicare are both good deals that refuse to share a calendar. The HSA is the only account in the tax code with a triple tax break. Medicare is the coverage nearly everyone takes at some point past 65. Between them sits a backdating rule that almost nobody mentions until it has already created a tax problem, and it trips up exactly the people doing everything else right: diligent savers working past 65. Here is the whole picture, laid out as a timeline.
In 30 seconds
You cannot contribute to an HSA once you are enrolled in any part of Medicare. The trap: when you enroll after 65 (or start Social Security, which enrolls you in Part A automatically), your Part A start date is backdated up to 6 months, and contributions made during those backdated months become excess contributions with IRS penalties. The fix is timing: stop HSA contributions up to 6 months before you file, prorate your final year, and remember the account itself stays yours for life and still pays most Medicare premiums tax-free.
The rule behind everything
IRS rules allow HSA contributions only alongside a qualifying high-deductible health plan and no other disqualifying coverage, and every part of Medicare, including premium-free Part A, is disqualifying. Note the precise verb: enrollment ends contributions. It does not touch the balance you have built, and it stops employer deposits too, which count toward the same annual limits.
The timeline that causes the trouble
Month zero: you file, and the clock runs backward
Enroll in Medicare after your Initial Enrollment Period has passed, or file for Social Security benefits after 65, and Part A does not start on your filing date. It is made retroactive up to 6 months (never earlier than your first month of eligibility). Your official Medicare start date is suddenly in the past, and so is your HSA ineligibility.
The backdated months: contributions become a tax problem
Every HSA dollar contributed during those retroactive months, yours and your employer's, is now an excess contribution, subject to a 6% excise tax for every year it stays in the account. Payroll systems do not catch this. HR rarely warns about it. The IRS notices at tax time.
The final year: prorate, do not guess
In the year your eligibility ends, your contribution limit is prorated by the months you were actually HSA-eligible, counting employer deposits in the math. Working the numbers before your filing date is a five-minute job; reconstructing them afterward is an accountant's afternoon.
Already over the line? There is a fix
If backdating has already overlapped your contributions, ask your HSA custodian for a “withdrawal of excess contributions,” including their earnings, before your tax-filing deadline for that year. Handled in time, the excise tax is generally avoidable. A tax professional can square the paperwork.
After Medicare: the account gets a second life
What it still pays, tax-free
Losing contributions is not losing the account. The balance keeps growing tax-free and keeps paying qualified expenses tax-free, and after 65 the qualified list is generous: Medicare Part B premiums, Part D premiums, Medicare Advantage premiums, plus out-of-pocket medical, dental, vision, and hearing costs. Plenty of retirees treat a well-fed HSA as the tax-free bucket that quietly pays the Part B bill for a decade.
The one notable exception
Medigap (Medicare Supplement) premiums are not a qualified HSA expense. If a Supplement is part of your retirement plan, budget its premium from other money.
Four dates, in the right order
For a working-past-65 HSA contributor, the whole strategy compresses to sequencing four dates: your last HSA contribution, then (up to 6 months later) your Medicare or Social Security filing date, your group coverage end date, and the 8-month Special Enrollment Period that follows it for penalty-free Part B. Line those up once, on paper, and both the IRS and Medicare stay satisfied.
For the rest of the working-past-65 picture:
the employer-size rules, the creditable-coverage test, and the clean-exit enrollment steps are covered by our local Kentucky team in their guide to Medicare while working past 65 (https://bluegrassmedicarehelp.com/articles/working-past-65-medicare/). Those rules are federal and apply in every state.
Quick recap
- Enrollment in any part of Medicare, including premium-free Part A, ends HSA contributions (the balance stays yours).
- Filing for Medicare or Social Security after 65 backdates Part A up to 6 months, turning contributions in those months into excess contributions with a 6% annual excise tax.
- Stop contributions up to 6 months before filing, prorate the final year's limit (employer deposits included), and correct any excess with your custodian before the tax deadline.
- After Medicare, the HSA still pays Part B, Part D, and Medicare Advantage premiums tax-free, but not Medigap premiums.
- Sequence four dates: last contribution, filing date, group coverage end, then the 8-month Part B Special Enrollment Period.
Frequently asked questions
Can I contribute to an HSA while on Medicare?
No. Enrollment in any part of Medicare, including premium-free Part A, makes you ineligible to contribute to a Health Savings Account under IRS rules. You keep the account and its balance, and you can still spend it tax-free on qualified medical expenses; you simply cannot add new money, and employer contributions must stop too.
Why do HSA contributions have to stop 6 months before Medicare?
Because when you enroll in Medicare after your Initial Enrollment Period, or start Social Security benefits after 65, your Part A coverage is backdated up to 6 months. Contributions made during those retroactive months count as excess contributions, so stopping 6 months ahead of your filing date keeps the backdating from overlapping any contribution.
What happens if I contributed to my HSA during the backdated Part A months?
Those deposits are excess contributions, subject to a 6% excise tax each year they remain in the account. The fix is asking your HSA custodian for a withdrawal of excess contributions (plus their earnings) before your tax-filing deadline for that year, which generally avoids the excise tax. A tax professional can help square the paperwork.
Can I pay Medicare premiums from my HSA?
Yes. After age 65, Medicare Part B, Part D, and Medicare Advantage premiums are qualified HSA expenses, along with out-of-pocket medical, dental, vision, and hearing costs. The main exception is Medigap (Medicare Supplement) premiums, which are not HSA-qualified. Many retirees use the HSA as a tax-free source for the monthly Part B premium.
Should I delay Medicare to keep contributing to my HSA?
Sometimes, and it depends on your employer coverage. If you work for an employer with 20 or more employees and your group plan is creditable, delaying Medicare (and continuing HSA contributions) can be reasonable, then you enroll penalty-free within 8 months of the job ending. If the employer has fewer than 20 employees, delaying Medicare is usually risky regardless of the HSA. Confirm your situation before deciding.
Written by Austin Tyler, a licensed insurance agent with Tyler Insurance Group.