Can you contribute to an HSA if you only have Medicare Part A? No. Medicare Part A disqualifies you from making Health Savings Account contributions, even when Part A is your only Medicare coverage, even when Part A costs you nothing, and even when you are still working with an HDHP through your employer. The IRS rule is absolute: beginning with the first month you are enrolled in any part of Medicare, your HSA contribution limit drops to zero. This article explains exactly why that rule exists, how the 6-month retroactive trap catches thousands of people off guard each year, and what you can still do with your HSA once Medicare begins.

Medicare Part A and HSA Contributions: Quick Facts

  • Any Medicare enrollment ends HSA contributions - Part A, B, C, or D
  • Premium-free Part A still counts - zero cost does not mean zero impact
  • Social Security triggers automatic Part A at age 65+
  • Retroactive coverage can backdate Part A up to 6 months
  • Your existing HSA stays intact - spend, invest, and grow tax-free
  • Pro-rated contributions apply in the year you enroll
  • Medicare premiums are HSA-eligible (except Medigap)

Use our eligibility checker to verify your current HSA eligibility status.

Why Medicare Part A Disqualifies You from HSA Contributions

The rule comes directly from IRC Section 223(b)(7). The IRS reduces your HSA contribution limit to zero for any month you are enrolled in Medicare. There are no carve-outs for Part A only, no exceptions for premium-free coverage, and no workarounds for people who did not intend to enroll.

IRS Publication 969 states the rule plainly: beginning with the first month you are enrolled in Medicare, your contribution limit is zero.

Why Does Free Coverage Matter?

Most Americans who worked 10 or more years (40 quarters of Social Security credits) qualify for premium-free Medicare Part A. Because it costs nothing, many people assume enrolling in Part A is harmless. The logic seems reasonable: free hospital insurance on top of your employer HDHP should only help.

But the IRS treats Medicare enrollment as "other health coverage" that disqualifies you from HSA eligibility. The cost of coverage is irrelevant. Whether your Part A premium is $0 or $505 per month (the 2026 rate for those who do not qualify for premium-free coverage), the HSA disqualification is identical.

Important

Premium-free Medicare Part A still counts as Medicare enrollment. Enrolling in Part A, even with no monthly premium, immediately ends your eligibility to contribute to an HSA. Do not assume "free" means "no consequences."

Every Part of Medicare Disqualifies You

The disqualification is not limited to Part A. Here is how each part affects your HSA:

Medicare PartWhat It CoversDisqualifies HSA?HSA Pays Premiums?
Part AHospital insuranceYesYes
Part BMedical insurance (doctors, outpatient)YesYes
Part CMedicare Advantage (private plan)YesYes
Part DPrescription drug coverageYesYes
MedigapSupplemental insuranceYes (requires A + B)No - not qualified

Notice that Medigap stands apart. While Part A, B, C, and D premiums are all qualified medical expenses you can pay with HSA funds, Medigap (Medicare Supplement Insurance) premiums are not. This catches many retirees by surprise.

Medicare parts and their impact on HSA eligibility and spending

The 6-Month Retroactive Rule You Cannot Afford to Ignore

This is where most people get caught. When you apply for Medicare Part A after age 65, your coverage is backdated up to 6 months, but never earlier than the month you turned 65. Any HSA contributions you made during that retroactive coverage period become excess contributions, subject to a 6% excise tax every year they remain in your account.

How the Retroactive Trap Works

Here is the typical scenario:

  1. You turn 65 and keep working with an employer HDHP
  2. You delay Medicare enrollment to preserve HSA eligibility
  3. You retire at 67 and apply for Medicare and Social Security
  4. Medicare Part A coverage is retroactive 6 months from your application date
  5. Your HSA contributions during those 6 months are now excess contributions

A Real-Dollar Example

Consider this: Maria turns 65 in January 2025 and continues working with self-only HDHP coverage. She contributes to her HSA throughout 2025 and 2026. In September 2026, she retires and applies for Medicare.

Her Medicare Part A effective date is backdated to March 2026 (6 months before September). Her HSA contributions from March through August 2026 are now excess. With the 2026 self-only limit of $4,400 plus the $1,000 catch-up (she is 66), her monthly eligible amount is $5,400 / 12 = $450. She was only eligible for January and February, meaning her maximum contribution for 2026 is $900.

If she contributed $3,600 through August (8 months at $450), the excess is $2,700. The 6% excise tax on that excess is $162, and it repeats every year until she withdraws the excess from her HSA.

Important

The 6% excise tax on excess HSA contributions is not a one-time penalty. It applies every year the excess amount remains in your account. If you contributed while retroactively covered by Medicare, you must withdraw the excess plus any earnings before your tax filing deadline to stop the annual penalty. Use our compliance guard to check for excess contributions.

How to Protect Yourself

The safest strategy is simple: stop HSA contributions at least 6 full months before you plan to apply for Medicare or Social Security. If you are turning 65 in June and plan to enroll in Medicare that month, your last HSA contribution should be in December of the prior year.

Timeline showing the 6-month retroactive Medicare trap and when to stop HSA contributions

The Social Security Trap: Automatic Medicare Part A Enrollment

Many people do not realize that applying for Social Security retirement benefits after age 65 automatically enrolls you in Medicare Part A. There is no opt-out checkbox. If you are 65 or older and you start receiving Social Security, you will receive Medicare Part A whether you want it or not.

This creates a critical conflict for people who planned to delay Medicare to maximize HSA contributions. You cannot collect Social Security and avoid Medicare Part A at the same time if you are 65 or older.

Three Scenarios That Trigger Automatic Part A

  1. You apply for Social Security at 65 or later. Part A enrollment is automatic and immediate. Your Part A effective date may be retroactive up to 6 months.

  2. You are already receiving Social Security when you turn 65. If you started collecting Social Security before 65 (as early as 62), you will be automatically enrolled in Medicare Part A the month you turn 65. No application is needed.

  3. You apply for Social Security disability benefits. After 24 months of receiving Social Security Disability Insurance (SSDI), you are automatically enrolled in Medicare, regardless of age. Over 10% of Medicare beneficiaries are under age 65 due to disability, ALS, or end-stage renal disease.

Good to Know

Being eligible for Medicare does not disqualify you from HSA contributions. Only actual enrollment does. If you are 65+ and still working with an HDHP, you can remain HSA-eligible as long as you have not enrolled in any part of Medicare and are not receiving Social Security.

The 12-Month Withdrawal Window

If you applied for Social Security and were automatically enrolled in Medicare Part A but did not intend to lose HSA eligibility, you may be able to reverse the decision. The Social Security Administration allows you to withdraw your Social Security application within 12 months of your first payment. You must repay all benefits received (including any Medicare-paid claims), but this cancels both Social Security and Medicare enrollment, restoring your HSA eligibility going forward.

This is an extreme measure and only makes sense when the ongoing HSA tax savings outweigh the Social Security benefits you would forfeit during the delay. A financial advisor can help you run the numbers.

How to Calculate Pro-Rated HSA Contributions Before Medicare

When Medicare enrollment begins mid-year, your annual HSA contribution limit is pro-rated by the number of months you were eligible. You calculate this on Form 8889 using the Line 3 Limitation Chart.

The Formula

Monthly HSA limit = Annual limit / 12

Pro-rated annual limit = Monthly limit x Number of eligible months

You are considered eligible for a month if you are an eligible individual on the first day of that month. If Medicare coverage begins July 1, you are eligible January through June (6 months) because you were still eligible on June 1.

2026 Pro-Ration Examples

Use our contribution calculator to find your exact pro-rated limit. Here are two common scenarios:

Scenario A: Self-only, age 57, Medicare starts July 1

  • 2026 annual limit: $4,400 + $1,000 catch-up = $5,400
  • Monthly limit: $5,400 / 12 = $450
  • Eligible months: January through June = 6
  • Pro-rated limit: $450 x 6 = $2,700

Scenario B: Family coverage, age 66, retroactive Medicare to April 1

  • 2026 annual limit: $8,750 + $1,000 catch-up = $9,750
  • Monthly limit: $9,750 / 12 = $812.50
  • Eligible months: January through March = 3
  • Pro-rated limit: $812.50 x 3 = $2,437.50

Pro Tip

If you front-load your HSA contributions early in the year (a common strategy to maximize investment growth time), make sure your total does not exceed the pro-rated limit. Contributing $5,400 in January when your pro-rated limit turns out to be $2,700 creates $2,700 in excess contributions. Withdraw the excess plus earnings before your tax filing deadline to avoid the 6% excise tax.

What About the Last-Month Rule?

The last-month rule lets you contribute the full annual limit if you are eligible on December 1 of the tax year, provided you remain eligible through December 31 of the following year (the "testing period"). For someone enrolling in Medicare mid-year, this rule almost never applies, because by definition you will not be eligible on December 1 of the enrollment year.

Pro-rated HSA contribution calculations for mid-year Medicare enrollment

Can You Delay Medicare Part A to Keep Contributing to Your HSA?

Yes, and for many working Americans over 65, delaying Medicare is the right financial move. The key is understanding when delay makes sense and when it creates more risk than reward.

When Delaying Makes Sense

  • You are still working with employer HDHP coverage from a company with 20 or more employees
  • You want to maximize HSA catch-up contributions - an extra $1,000 per year after age 55
  • Your employer contributes to your HSA and you do not want to lose those contributions
  • You are healthy and the additional hospital coverage from Part A provides minimal marginal value alongside your employer plan

When Delaying Is Risky

  • Your employer has fewer than 20 employees. In this case, Medicare becomes your primary insurer and your employer plan becomes secondary. Delaying Medicare could mean your employer plan pays less and you face higher out-of-pocket costs.
  • You have significant health issues. The security of Medicare hospital coverage (Part A) may outweigh the HSA contribution benefit, especially since your employer plan alone may have higher out-of-pocket costs.
  • You are not covered by an HDHP. If your employer plan is a PPO, HMO, or other non-HDHP, you cannot contribute to an HSA regardless of Medicare status.

Good to Know

There is no late enrollment penalty for Medicare Part A if you delayed because you had active employer coverage from an employer with 20+ employees. You qualify for a Special Enrollment Period when you or your spouse stop working or lose employer coverage. However, self-employed individuals and those with small-employer coverage do not get this protection and may face penalties for late Part A enrollment.

The Math: Is Delaying Worth It?

Consider a 66-year-old with self-only HDHP coverage and a 32% combined federal and state tax rate. Each additional year of HSA contributions saves:

  • $5,400 annual limit (2026) x 32% tax rate = $1,728 in tax savings per year
  • Over 5 years (ages 65-70): $27,000 in additional HSA contributions, $8,640 in tax savings
  • If invested at 7% average return, those contributions could grow to $32,000+ by age 75

The decision depends on your tax bracket, health status, employer plan quality, and how long you plan to keep working. A tax and growth simulator can help model your specific scenario.

Spousal HSA Rules When One Partner Has Medicare

When one spouse enrolls in Medicare while the other spouse remains on an HDHP, the family's HSA strategy changes, but it does not end.

The Non-Medicare Spouse Can Still Contribute

If your spouse enrolls in Medicare but you have qualifying HDHP coverage, you can continue contributing to your own HSA at the full family limit ($8,750 in 2026). Your spouse's Medicare enrollment only affects their individual eligibility, not yours.

However, your spouse cannot make any HSA contributions of their own, and they cannot contribute catch-up amounts to your HSA. If your spouse is 55 or older and wants catch-up contributions, they would need their own HSA, but Medicare enrollment prevents that.

You Can Pay Your Spouse's Medical Expenses

Here is the good news: you can use your HSA to pay for your Medicare-enrolled spouse's qualified medical expenses, including Medicare Part B premiums, Part D premiums, copays, and deductibles. The IRS allows HSA funds to be used for any qualified medical expense of the account holder, their spouse, or their dependents, regardless of who has the HDHP coverage.

Pro Tip

If your spouse is on Medicare and you are on an HDHP, your HSA becomes an even more powerful tool. You can contribute at the family limit, invest for long-term growth, and use the funds tax-free for both your own expenses and your spouse's Medicare costs. Use the expense checker to verify which of your spouse's Medicare costs qualify.

How to Use Your HSA to Pay Medicare Expenses Tax-Free

Enrolling in Medicare ends your ability to contribute, but it does not end your ability to spend. Every dollar already in your HSA remains available tax-free for qualified medical expenses, and that includes most Medicare-related costs.

What You Can Pay Tax-Free

  • Medicare Part A premiums (for those who pay them)
  • Medicare Part B premiums (currently $185.00/month in 2026 for most enrollees)
  • Medicare Part C (Medicare Advantage) premiums
  • Medicare Part D (prescription drug) premiums
  • Medicare deductibles, copays, and coinsurance
  • Dental, vision, and hearing expenses
  • Prescription medications
  • Long-term care insurance premiums (up to age-based limits)

What You Cannot Pay Tax-Free

  • Medigap (Medicare Supplement Insurance) premiums - This is the big exception. IRS Publication 502 specifically excludes supplemental Medicare insurance premiums from the list of qualified medical expenses. Using HSA funds for Medigap premiums triggers income tax, and if you are under 65, a 20% penalty as well.

The After-65 Bonus

Once you turn 65, your HSA effectively becomes a hybrid retirement account. Withdrawals for qualified medical expenses remain completely tax-free. Withdrawals for non-medical purposes lose the 20% penalty that applies before 65, and are taxed as ordinary income, the same as a traditional IRA distribution. This makes your HSA a flexible spending tool in retirement, whether you need the money for healthcare or any other purpose.

As we explain in our HSA retirement guide, the optimal strategy is to pay Medicare expenses from your HSA first, since those withdrawals are tax-free, and use traditional IRA and 401(k) funds for non-medical expenses.

Eligible vs. ineligible Medicare expenses for HSA spending

Your HSA-to-Medicare Transition Checklist

Approaching age 65 or considering Medicare enrollment? Follow this timeline to protect your HSA contributions and avoid penalties.

12+ Months Before Medicare

  • Confirm your HDHP eligibility with our eligibility checker
  • Maximize catch-up contributions ($1,000 extra if you are 55+)
  • Consider front-loading your annual contribution early in the year
  • Review whether delaying Medicare makes financial sense for your situation

7 Months Before Medicare

  • If you plan to enroll in Medicare at 65, remember the Initial Enrollment Period starts 3 months before your 65th birthday month
  • Stop HSA contributions at least 6 months before your intended Medicare effective date to avoid the retroactive trap
  • Notify your employer's payroll department to stop automatic HSA deductions
  • Calculate your pro-rated contribution limit for the transition year

The Month You Enroll

  • Confirm your Medicare Part A effective date with the Social Security Administration
  • Verify that no HSA contributions were made during any retroactively covered months
  • If excess contributions exist, contact your HSA custodian to request a return of excess contributions plus earnings
  • File Form 8889 to report your pro-rated contributions for the tax year

After Medicare Enrollment

  • Keep your HSA open - the funds remain yours indefinitely
  • Continue investing HSA funds for tax-free growth
  • Use HSA funds for Medicare premiums (except Medigap) and other qualified medical expenses
  • Track all HSA-paid medical expenses with the Expense Tracker for clean records

Pro Tip

Do not close your HSA after enrolling in Medicare. The account continues growing tax-free and can fund decades of healthcare expenses in retirement. The average 65-year-old couple will spend an estimated $315,000 on healthcare throughout retirement, according to Fidelity's annual estimate. Your HSA is one of the best tools to cover those costs tax-free.

What Congress Almost Changed - and Why It Matters

The One Big Beautiful Bill Act expanded HSA eligibility in several important ways: Bronze and catastrophic Exchange plans now qualify as HDHPs (effective 2026), and direct primary care arrangements are now HSA-compatible. But the House version of the bill included a provision that would have allowed Medicare Part A enrollees to continue contributing to their HSAs, and that provision was dropped from the final law.

This means the Medicare-HSA barrier remains intact for now. However, the fact that Congress seriously considered the change signals growing awareness that the current rule penalizes working Americans who happen to have Medicare Part A. Future legislation may revisit this issue, especially as the population of working 65+ Americans continues to grow.

Written by

HO
HSA Orbit
Editorial Team