Once any part of Medicare begins, you can no longer contribute to a Health Savings Account (HSA), and premium-free Part A can start up to six months before the month you apply. That backdating is how careful savers end up with excess contributions they never meant to make.
The trap mostly catches people who kept an employer high-deductible plan past 65 and are now retiring, or who just filed for Social Security. The fix: stop contributions six months before you apply, prorate your limit on Form 8889, remove any excess, and spend the rest on Medicare premiums tax-free.
The money most often overlooked is the employer’s. A match keeps landing during the months Medicare later reaches back over, and neither the employer nor the custodian will remove it for you.

Medicare enrollment, not your retirement date, ends HSA eligibility
Turning 65 does not by itself stop contributions. Under IRS Publication 969, you lose HSA eligibility starting with the first month you are enrolled in Medicare, whether that is Part A alone, Part B, or a Medicare Advantage plan.
Two enrollment routes surprise people. Applying for Social Security retirement benefits at 65 or older enrolls you in Part A automatically, and you cannot keep the monthly benefit while turning Part A down.
The second route is the backdating itself. When you sign up for premium-free Part A after 65, Medicare starts coverage up to six months back, but never earlier than the month you turned 65.
The date that matters is therefore the month you file, counted back six months. Stopping contributions with your last paycheck is not enough if that paycheck falls inside the lookback window.

How the lookback shrinks your 2026 contribution limit
For 2026, the IRS contribution limits are $4,400 for self-only high-deductible coverage and $8,750 for family coverage, plus a $1,000 catch-up for anyone 55 or older. Those are full-year amounts.
If Medicare starts partway through the year, your limit becomes one-twelfth of the annual amount for each month you were eligible on the first day of that month. The catch-up is prorated the same way.
| 2026 coverage | Annual limit | Per eligible month | Catch-up per month (55+) | Total per month (55+) |
|---|---|---|---|---|
| Self-only | $4,400 | $366.67 | $83.33 | $450.00 |
| Family | $8,750 | $729.17 | $83.33 | $812.50 |
The “last-month rule,” which lets someone eligible on December 1 contribute a full year’s amount, does not help here. Anyone enrolled in Medicare by December is not eligible on December 1, so counting months is the only route.
A younger spouse can be the exception. If your spouse is under 65, has no Medicare, and is covered by your family high-deductible plan, Publication 969 generally lets that spouse contribute up to the family limit to their own HSA.

One year worked through: retiring at 66 and applying in August
Take a 66-year-old with self-only coverage whose HSA received $450 a month through payroll, part of it the employer’s match, from January through July 2026. They retired and applied for Medicare and Social Security in August.
- Part A is backdated six months, to February 1, 2026.
- Only January counts as an eligible month, so the 2026 limit is $450 ($366.67 plus the $83.33 catch-up).
- Contributions totaled $3,150, seven months at $450, and the full $3,150 appears in Box 12, code W of the W-2, whether it came from the paycheck or the match.
- The excess is $2,700. Left in the account, it draws a 6% excise tax of $162 for 2026, and again every year it stays.
Had payroll deposits and the match stopped after January, six months before the August application, there would be nothing to fix.
Rule check: after Medicare starts, there is no future year’s contribution limit to soak up an excess. Withdrawing it is the only way to stop the 6% tax from repeating.

Employer match deposited inside the lookback: who fixes it
Employer money, including a match and pre-tax deferrals made through a cafeteria plan, counts toward the same prorated limit as your own deposits. Box 12, code W reports both together.
Don’t wait for a clawback. IRS Notice 2008-59 generally bars an employer from recouping HSA deposits, allowing it mainly when the employee was never HSA-eligible or the deposit was an administrative error.
A retroactive Medicare date fits neither exception when you were eligible before Medicare began. The money is legally yours, so removing the excess falls to you and your custodian.
Box 12, code W should show what the employer actually deposited, so a backdated Medicare date is not by itself a reason for a corrected Form W-2c. Form 8889 does the correcting.
- Before you apply, tell HR or payroll in writing the month you will file for Medicare or Social Security, and ask them to stop both your deferrals and the match after your last eligible month.
- Ask whether the plan makes a lump-sum employer deposit early in the year; one deposit can exceed a one- or two-month limit on its own.
- When the W-2 arrives, compare the code W total with your prorated limit and request removal of the difference from the custodian.

Reporting the prorated limit on Form 8889
Anyone who contributed to or withdrew from an HSA during the year files Form 8889 with their 2026 Form 1040. These are the lines that change in a Medicare year.
- Line 1: check self-only or family based on the coverage you had in your eligible months.
- Line 2: contributions you made yourself, outside payroll.
- Line 3: your prorated limit from the Line 3 Limitation Chart and Worksheet in the form instructions, not the full-year figure.
- Line 7: your catch-up, also prorated at $83.33 per eligible month for 2026.
- Line 9: the full Box 12, code W amount, match included, even when it exceeds your limit.
- Lines 14a and 14b: total distributions from Form 1099-SA on 14a; any excess you withdrew on time, with its earnings, on 14b so it is not treated as taxable spending.
Code W money above your limit was kept out of your W-2 wages, so the instructions have you add that excess employer contribution back to income as other income. A tax preparer can confirm the entry.

Removing an excess contribution before the 6% tax applies
The excise tax is avoidable if the excess and its earnings leave the account by the due date of your 2026 return, including extensions. The steps run through your HSA custodian, not the IRS or the employer.
- Ask the custodian for its excess-contribution removal form and state the dollar amount, employer match included; the custodian calculates the earnings.
- Submit it well before the filing deadline so the money is out in time.
- Expect a Form 1099-SA for the year of withdrawal showing distribution code 2, which marks an excess removal.
- Report the earnings as other income for the year you receive them. The removed excess is not charged the 20% penalty for non-medical withdrawals.
Miss the deadline and the 6% tax goes on Form 5329, Part VII, for every year the excess remains. On a $2,700 excess, that is $162 a year with no end date.

Paying Medicare premiums tax-free from the balance you keep
Losing the right to contribute does not touch the money already saved. After 65, your HSA can reimburse Medicare premiums, which IRS Publication 502 treats as medical expenses, while Medicare supplement premiums stay off the tax-free list.
| Expense at 65 or older | Tax-free from HSA? | What to know |
|---|---|---|
| Part B premium | Yes | $202.90 a month standard in 2026; more with income-related surcharges |
| Part D premium | Yes | Includes any income-related Part D surcharge |
| Medicare Advantage premium | Yes | Plan premium plus Part B, if you pay both |
| Part A premium | Yes | Only if you lack enough work credits and pay one |
| Medigap (Medicare supplement) premium | No | Taxed as income if paid from the HSA |
| Employer or retiree group plan premium | Yes | Allowed once you are 65 |
| Deductibles, copays, dental, vision, hearing aids | Yes | Part B deductible is $283 in 2026 |
| Non-medical spending | Taxable | Income tax applies; no 20% penalty after 65 |
The 2026 Part B standard premium of $202.90 adds up to $2,434.80 a year. Most people have it deducted from Social Security, and you can still reimburse yourself using the Part B total on your annual SSA-1099.
Reimbursement has no deadline, as long as the premium was paid after the HSA was opened. Keep the SSA-1099 or plan statements with your tax records, and treat the balance as a dedicated line in your retirement health care budget.
Qualified withdrawals are not counted as income, so they do not push up the income figure Medicare uses for Part B and Part D surcharges. A taxable withdrawal for non-medical spending can.
You cannot also claim reimbursed premiums under the medical expense deduction, and premiums paid by a state program cannot be reimbursed.
That second point affects anyone whose Part B premium is covered through one of the Medicare Savings Programs. In that case the HSA is better kept for copays, dental work and hearing aids.
When comparing plans during the Medicare open enrollment period, October 15 through December 7, remember the HSA can pay a Part D or Advantage premium but not a Medigap premium.

Who can confirm your Medicare start date and Form 8889 numbers
Your Medicare card shows the month each part began, which is the date your Line 3 worksheet depends on. Social Security (1-800-772-1213) can confirm whether Part A was backdated, and to which month.
For enrollment timing before you retire, your State Health Insurance Assistance Program gives free one-on-one counseling. Your HR or benefits office can give the date and amount of each employer deposit if the code W total looks wrong.





