Signing up for any part of Medicare ends your ability to put new money into a Health Savings Account, even if you still have an employer high-deductible health plan. The balance you have already built stays yours, keeps growing tax-deferred, and can still be spent tax-free on qualified medical expenses, including most Medicare premiums. The Medicare and HSA rules that trip people up are almost entirely about timing: when contributions have to stop, how much you can put in during the year you enroll, and how to avoid the six-month retroactive coverage that turns legitimate contributions into taxable excess ones.
For 2026, the annual HSA contribution limits are $4,400 for self-only coverage and $8,750 for family coverage.1Internal Revenue Service. Revenue Procedure 2025-19 Every month of Medicare enrollment costs you a slice of that.
Why Any Part of Medicare Ends HSA Contributions
Federal tax law lets you contribute to an HSA only during months when you are covered by a high-deductible health plan and have no other disqualifying health coverage.2Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts Medicare is disqualifying coverage. Part A, Part B, Part C, and Part D each end eligibility on their own.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans The IRS tests eligibility on the first day of each month, so the month your Medicare coverage begins is the first month you cannot contribute.
The link that catches people off guard runs through Social Security. Applying for Social Security retirement benefits automatically enrolls you in Medicare Part A, and you cannot collect Social Security while declining Part A.4Social Security Administration. How Do I Sign Up for Medicare? Filing for retirement benefits at 65 is therefore also a decision to stop HSA contributions, whether or not you thought of it that way.
The Six-Month Retroactive Coverage Trap
Many people delay Medicare past 65 specifically to keep contributing to an HSA while still working. When they eventually apply, Part A coverage reaches back up to six months from the application date.5Centers for Medicare & Medicaid Services. Original Medicare (Part A and B) Eligibility and Enrollment The retroactive start cannot go earlier than the month you turned 65, but within that window it can turn months you believed you were HSA-eligible into months you technically had Medicare all along.6Medicare. When Does Medicare Coverage Start?
The practical rule: stop HSA contributions at least six months before you plan to apply for Medicare or Social Security. Any contribution made in a month that later falls inside the retroactive window becomes an excess contribution, subject to a 6% annual excise tax until you correct it. This is the most common mistake at the Medicare-HSA intersection, and a calendar prevents it.
How Much You Can Contribute in the Year You Enroll
You do not lose the whole year’s contribution when Medicare starts mid-year. Divide the annual limit by 12 and multiply by the number of months you were still eligible, measuring eligibility on the first day of each month.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans
Using the 2026 limits:
- Self-only coverage with Medicare effective July 1: six eligible months, so $4,400 × 6/12 = $2,200.
- Self-only coverage with Medicare effective October 1: nine eligible months, so $4,400 × 9/12 = $3,300.
- Family coverage with Medicare effective July 1: $8,750 × 6/12 = $4,375.
The $1,000 catch-up contribution for people 55 and older is pro-rated the same way. Six eligible months means a $500 catch-up.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans
Watch the last-month rule. Normally, if you are HSA-eligible on December 1, you can contribute the full annual amount for that year regardless of how many months you were actually covered. But there is a testing period: you must remain eligible for the following 12 months. If Medicare starts during that testing period, the amount you contributed above your pro-rated share is added back to income and hit with an additional 10% tax.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans For anyone heading into Medicare within a year, the last-month rule is a trap, not an opportunity.
Delaying Medicare to Keep Contributing
If you work past 65 at an employer with 20 or more employees, you can delay both Part A and Part B without penalty, keep your employer HDHP as primary coverage, and keep contributing to your HSA. This is the only clean way to keep building HSA savings past 65. At employers with fewer than 20 employees, Medicare generally becomes primary and you have to enroll when first eligible.
When you leave the job, a Special Enrollment Period lets you sign up for Part B without a late enrollment penalty. Without that Special Enrollment Period, the Part B penalty adds 10% to your premium for every full 12-month period you could have enrolled but did not, and the surcharge stays on for as long as you have Part B.7Medicare. Avoid Late Enrollment Penalties With the 2026 standard Part B premium at $202.90 a month, a two-year gap adds roughly $40 a month for life.
Whether the delay is worth it comes down to what you would contribute in each year of continued eligibility, your marginal tax rate, your time horizon before withdrawals, and the cost and quality of your employer plan compared to Medicare.
Family HSA Contributions When One Spouse Enrolls
Medicare enrollment is individual. If one spouse enrolls in Medicare while the other stays on a family HDHP, the spouse who is not on Medicare can still contribute up to the full family limit of $8,750 for 2026, plus a $1,000 catch-up if they are 55 or older. The Medicare-enrolled spouse just cannot contribute to their own HSA.
The eligible spouse’s HSA can be used for either spouse’s qualified medical expenses, including the Medicare-enrolled spouse’s deductibles, copayments, and most premiums. In households where one spouse is older, this stretches the family’s HSA building years well past the older spouse’s Medicare start date.
What You Can Spend Your HSA On After Medicare Starts
Your existing HSA balance does not go anywhere when Medicare begins. It stays yours, it keeps its tax treatment, and there is no deadline to spend it. For people on Medicare, qualified expenses include:
- Part B, Part C (Medicare Advantage), and Part D premiums.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans
- Deductibles, copayments, and coinsurance under any part of Medicare.
- Premiums for qualified long-term care insurance, subject to age-based limits.
- Dental, vision, and hearing costs that Medicare does not cover but that count as medical care.
One important exclusion: Medigap (Medicare Supplement Insurance) premiums do not qualify.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans The rule feels inconsistent because Medicare Advantage and Part D premiums are allowed, but Medigap was carved out specifically. Paying Medigap premiums from your HSA turns those withdrawals into taxable, and potentially penalized, distributions.
Non-Medical Withdrawals Once You Turn 65
Before 65, using HSA funds for anything other than qualified medical expenses triggers income tax plus a 20% additional tax.2Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts At 65 the 20% penalty falls away. You still owe ordinary income tax on non-medical withdrawals, but nothing on top of that. Medical withdrawals remain completely tax-free.
Fixing Excess Contributions
When you contribute more than your pro-rated limit, usually because of the retroactive Part A issue, the IRS charges a 6% excise tax on the excess for every year it stays in the account.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans The penalty repeats annually until you correct it.
To fix it, withdraw the excess plus any earnings those funds generated before your tax filing deadline, including extensions.3Internal Revenue Service. Publication 969 – Health Savings Accounts and Other Tax-Favored Health Plans With an extension, you have until October 15. The withdrawn earnings are taxable in the year of withdrawal. Report the excess and any additional tax on Form 5329, and report overall HSA activity on Form 8889.8Internal Revenue Service. Instructions for Form 8889 Keep the custodian’s statement showing the date, amount, and reason for the withdrawal. If you miss the deadline, you can still remove the excess, but you owe the 6% for each year it sat in the account, so acting quickly limits the cost.