Social Security Advisor Match

HSA and Social Security: The Medicare Enrollment Trap

If you have a Health Savings Account and are approaching Social Security age, there is a planning hazard that catches many people by surprise. The moment you are enrolled in Medicare Part A — even retroactively — you lose the right to make new HSA contributions. And claiming Social Security is what triggers Medicare Part A enrollment for most people.

This creates a concrete deadline. Every month you contribute to an HSA while enrolled in Medicare is an excess contribution subject to a 6% IRS excise tax under IRC §4973, plus ordinary income tax when you withdraw the excess. At the 2026 family limit of $8,750 per year, a six-month overage costs $437 in excise tax alone — on top of income tax owed.

The core rule (IRC §223(b)): To contribute to an HSA, you must be enrolled in a qualifying High Deductible Health Plan (HDHP) and not enrolled in Medicare — any part, including Part A only. There is no pro-ration for enrollment mid-year after the excess contribution rules kick in.

How Social Security claiming triggers Medicare enrollment

Social Security and Medicare have three different enrollment relationships depending on when you claim.

Scenario 1: You claim SS before 65

If you start Social Security at 62, 63, or 64, you will be automatically enrolled in Medicare Parts A and B when you turn 65. The SSA sends enrollment materials approximately three months before your 65th birthday. Your HSA eligibility ends the month Medicare coverage begins — generally the month you turn 65. Plan to make your last HSA contribution in the month before your Medicare-effective date.

Scenario 2: You claim SS at 65

Claiming at 65 and enrolling in Medicare at 65 happen simultaneously — both start in the same month. No retroactivity complication. Your last eligible HSA contribution month is the one before your 65th birthday month.

Scenario 3: You delay SS past 65 — the 6-month retroactivity trap

This is where the planning hazard lives. If you delay SS past your 65th birthday (perhaps because you had employer-sponsored coverage and stayed on an HDHP), you can apply for Medicare separately under your Initial Enrollment Period (IEP) and keep making HSA contributions as long as Medicare hasn't started.

But when you do eventually apply for Social Security at 66, 67, 68, or later, the SSA may offer you a lump sum of retroactive Social Security benefits for up to six months prior. If you accept retroactive SS benefits, your Medicare Part A coverage is also backdated by the same number of months.1 Any HSA contributions you made during those retroactive months instantly become excess contributions — even though you made them in good faith before any Medicare card arrived.

Example: You're 67 and apply for Social Security in January 2026. You haven't enrolled in Medicare yet — you've been on your spouse's HDHP. The SSA offers you 6 months of retroactive benefits (July–December 2025), which you accept. Your Medicare Part A is now effective July 2025. But you made 6 months of HSA contributions ($4,400 × 6/12 = $2,200 self-only, or $4,375 family) from July through December 2025 — all excess. You owe a 6% excise tax on each excess contribution for each year it remains in the account, plus ordinary income tax when withdrawn.

The safe rule: stop HSA contributions 6 months before applying for SS

If you plan to claim Social Security after FRA (age 67 for anyone born in 1960 or later), stop making HSA contributions six months before your planned application date. This ensures that even if you accept the maximum retroactive SS benefit window, no Medicare-period contributions exist in your account.

If you plan to decline retroactive SS benefits at filing time, your Medicare Part A begins from your application month and there is no retroactivity problem. But this requires a deliberate decision at application — declining retroactivity means giving up a lump sum and permanently keeping your higher monthly benefit from continued delay. Many people choose the lump sum without realizing the HSA consequence. The safest approach is to stop contributions 6 months early regardless.

HSA contributions remaining: calculator

Shows how many months you can still contribute to your HSA and the maximum amount, based on when you plan to claim Social Security. Uses 2026 IRS contribution limits (IRS Rev. Proc. 2025-19).

You can enter a decimal (e.g. 63.5 for age 63 years 6 months)

What you can use your HSA for after Medicare enrollment

Once you're on Medicare you cannot add to your HSA, but your existing balance remains available for qualified medical expenses indefinitely — and the list of eligible expenses expands meaningfully at 65.2 Specifically, you can use accumulated HSA funds to pay:

Medicare premiums alone can make a large accumulated HSA balance highly useful. A couple each paying $202.90/month base Part B premiums spends $4,870/year — easily depleting even a large HSA balance over a retirement. If you or your spouse face IRMAA surcharges (income above $109,000 single / $218,000 MFJ for 2026), Part B premiums can reach $12,000+ per year per person. A strategic HSA drawdown plan with a financial advisor can significantly reduce the after-tax cost of Medicare.

Can you keep your HSA by enrolling only in Medicare Part B and not Part A?

Most people are eligible for premium-free Medicare Part A (they worked 40+ quarters) — and once you file for Social Security, Part A enrollment is automatic and cannot be declined without also giving up your Social Security benefits. If you are already receiving SS when you turn 65, you are enrolled in both Parts A and B automatically.

There is one limited scenario where you can delay Part A: if you would have to pay a Part A premium (fewer than 30 work quarters), you can delay enrollment. But this applies to very few people — only those with minimal U.S. work history. For the vast majority of recipients, Part A is mandatory once SS begins.

You can always delay Medicare Part B if you have qualifying employer-sponsored coverage (the Part B Special Enrollment Period, or SEP). But delaying Part B does not preserve HSA eligibility — enrollment in Part A alone is sufficient to make you ineligible under IRC §223. Part B delay is useful to avoid the Part B premium, not to keep HSA contributions going.

Federal employees: different enrollment dynamics

Federal employees covered by the Federal Employees Health Benefits (FEHB) program have more flexibility. FEHB is considered creditable coverage for Medicare purposes, meaning federal workers can delay Medicare enrollment without a late-enrollment penalty. Many federal retirees delay Part B enrollment while keeping FEHB as their primary coverage.

However, if a federal employee is also contributing to an HDHP-based FEHB plan with an HSA, the same rule applies: enrolling in Medicare Part A ends HSA eligibility. Federal employees who delay Medicare and stay on an HDHP-qualified FEHB plan can continue HSA contributions into their 60s — but the moment they apply for Social Security (which triggers Part A enrollment), contributions must stop.

Federal employees covered by CSRS (not FERS) may not have SS retirement benefits at all if they worked entirely in CSRS. For these workers, the SS/Medicare enrollment link doesn't apply in the same way — they would enroll in Medicare separately (generally at 65 via IEP) and can time that enrollment independently of any SS application.

The interaction with your Social Security delay decision

Every year you delay SS past FRA earns 8% in delayed retirement credits — a guaranteed, inflation-adjusted return. Each year of delay also gives you one additional year of HSA contributions. At the 2026 family limit of $8,750 plus the $1,000 catch-up, a 66-year-old delaying from 67 to 68 could contribute an additional $9,750 in tax-advantaged HSA savings while also securing a higher monthly benefit for life.

This is not typically the primary reason to delay Social Security — the benefit increase and survivor protection of delay dwarf the HSA contribution value for most households. But it is a quantifiable secondary benefit of delay that should be on the table when your advisor models the claiming-age tradeoffs.

Get matched with a Social Security specialist

The HSA-Medicare-SS interaction is one of dozens of moving parts in a retirement income plan. A fee-only advisor who specializes in Social Security claiming can model your specific situation — HSA balance, HDHP coverage, planned Medicare enrollment, SS claim age, and IRMAA exposure — as an integrated decision.

SocialSecurityAdvisorMatch is a referral service, not a licensed advisory firm. We may receive compensation from professionals in our network.

Content is for informational purposes only and does not constitute financial, tax, legal, or investment advice.

Sources

  1. SSA.gov — Medicare enrollment rules for Social Security recipients; see also IRS Publication 969 (2025), "Health Savings Accounts and Other Tax-Favored Health Plans."
  2. IRS Publication 969 (2025) — HSA eligible expenses, HSA and Medicare coordination rules (IRC §223).
  3. IRS Rev. Proc. 2025-19 — 2026 HSA contribution limits: $4,400 self-only, $8,750 family. Catch-up ($1,000, age 55+) per IRC §223(b)(3)(B), not indexed for inflation.
  4. Medicare.gov — When does Medicare coverage start? Covers IEP, automatic enrollment for SS recipients, and retroactive Part A rules.

HSA limits and Medicare rules verified against IRS and Medicare.gov sources as of June 2026.