Understanding HSA Contribution Rules When Transitioning to Medicare
When you enroll in Medicare at age 65, you must stop contributing to your Health Savings Account (HSA) to avoid IRS penalties, but the timing is more complex than simply stopping on your enrollment date. The IRS applies a six-month lookback rule that can create unexpected tax consequences if you’re not prepared. Understanding this rule and planning your HSA contribution cessation properly can save you from costly penalties and the hassle of correcting excess contributions.
The Six-Month Lookback Rule Explained
The six-month lookback rule is an IRS provision that affects when your Medicare coverage is considered to have started for HSA contribution purposes. When you enroll in Medicare Part A, the IRS may treat your coverage as having begun up to six months before your actual enrollment date, or from your 65th birthday, whichever is later.
This retroactive coverage period means you could be considered ineligible to contribute to your HSA for months before you actually signed up for Medicare. Any HSA contributions made during this lookback period become excess contributions, subject to a 6% annual penalty tax until removed.
How the Lookback Period is Calculated
The lookback period begins either:
- Six months before your Medicare enrollment date, or
- The first day of the month you turn 65
The IRS uses whichever date is later. For example, if you turn 65 in January but don’t enroll in Medicare until July, your lookback period would start in January (your 65th birthday month) rather than six months before July.
When to Stop HSA Contributions
To avoid the six-month lookback issue entirely, you should stop HSA contributions before the potential lookback period begins. Here are the key timing considerations:
If You Plan to Enroll in Medicare at 65
Stop HSA contributions by the last day of the month before you turn 65. This ensures you won’t have any contributions during the potential six-month lookback period. For instance, if you turn 65 in June, stop contributions by May 31st.
If You Delay Medicare Enrollment
If you’re still working and have creditable coverage through your employer, you can delay Medicare enrollment without penalty. In this case, you can continue HSA contributions as long as you remain eligible (enrolled in a qualified high-deductible health plan with no other disqualifying coverage).
However, once you decide to enroll in Medicare, stop HSA contributions at least six months before your intended enrollment date to avoid the lookback issue.
Automatic Enrollment Considerations
Be aware that if you’re receiving Social Security benefits, you’ll be automatically enrolled in Medicare Part A when you turn 65. This automatic enrollment triggers the six-month lookback rule, so plan accordingly if you’re in this situation.

Consequences of Excess Contributions
Making HSA contributions when you’re not eligible creates several problems:
Tax Penalties
Excess contributions are subject to a 6% excise tax for each year they remain in your account. This penalty continues until you remove the excess contributions plus any earnings on those contributions.
Correction Process
To correct excess contributions, you must:
- Remove the excess contribution amount
- Remove any earnings attributable to the excess contribution
- Report the earnings as taxable income for the year the contribution was made
- File amended tax returns if necessary
Special Circumstances and Exceptions
Working Past 65 with Group Coverage
If you continue working past 65 and have creditable coverage through a group health plan with 20 or more employees, you can delay Medicare enrollment without penalty. This allows you to continue HSA contributions as long as you meet all eligibility requirements.
COBRA and HSA Eligibility
If you’re on COBRA continuation coverage when you turn 65, you’re generally not eligible for HSA contributions because COBRA typically doesn’t qualify as a high-deductible health plan for HSA purposes.
Planning Strategies
Maximize Contributions Before Cutoff
Since you’ll lose HSA contribution eligibility, consider maximizing your contributions in the months leading up to your cutoff date. For 2025, individuals 55 and older can contribute up to $4,550 plus a $1,000 catch-up contribution, for a total of $5,550.
Coordinate with Benefits Department
Work closely with your employer’s benefits department to understand your coverage options and ensure your payroll deductions for HSA contributions stop at the appropriate time.
Consider Professional Guidance
The intersection of HSA rules and Medicare can be complex. Consider consulting with a tax professional or financial advisor who specializes in retirement planning to ensure you’re making the best decisions for your situation.
Using Your HSA After Medicare Enrollment
While you can’t contribute to your HSA once you’re enrolled in Medicare, you can still use your existing HSA funds for qualified medical expenses. HSAs become even more valuable in retirement because:
- Funds can pay for Medicare premiums (Parts B, C, and D, but not Medigap)
- Money can cover deductibles, copayments, and other qualified expenses
- After age 65, non-medical withdrawals are penalty-free (though subject to income tax)
Key Takeaways and Action Checklist
Successfully navigating the transition from HSA contributions to Medicare requires careful timing and planning. Remember that the six-month lookback rule can create unexpected penalties if you’re not prepared.

Essential Action Items:
- Stop HSA contributions by the last day of the month before you turn 65 if enrolling in Medicare
- Verify your Medicare enrollment timeline with Social Security Administration
- Coordinate with your employer’s benefits department about stopping payroll deductions
- Consider maximizing contributions before your cutoff date
- Keep detailed records of your contribution cessation date
- Consult with a tax professional if you have complex circumstances
Frequently Asked Questions
Can I make HSA contributions for part of the year I turn 65?
Yes, but you must be careful about timing. You can contribute for the months you were eligible, but remember the six-month lookback rule. If you enroll in Medicare, you may be considered ineligible for six months prior to enrollment, which could make some of your contributions excess contributions.
What happens if I accidentally make HSA contributions after becoming Medicare-eligible?
You’ll need to remove the excess contributions plus any earnings they generated before the tax filing deadline (including extensions). The earnings will be taxable income, and you may owe the 6% excess contribution penalty if not corrected timely.
Can I delay Medicare enrollment to keep contributing to my HSA?
You can delay Medicare enrollment if you have creditable coverage through a current employer’s group health plan (with 20+ employees). However, if you’re receiving Social Security benefits, you’ll be automatically enrolled in Medicare Part A at 65, which ends your HSA contribution eligibility.
Do I need to spend down my HSA before enrolling in Medicare?
No, you don’t need to spend your HSA funds before Medicare enrollment. Your existing HSA remains valuable for paying qualified medical expenses, including Medicare premiums and out-of-pocket costs. The account can even serve as a supplemental retirement account after age 65.