The rule: no HSA contributions once Medicare starts
Medicare says you cannot contribute to your HSA once you are enrolled in Medicare. If you contribute after your Medicare enrollment date, you may have to pay a tax penalty.
The IRS puts it in terms of your limit. Starting with the first month you are enrolled in Medicare, your HSA contribution limit is zero, and that includes any months of retroactive Medicare coverage.
Why you may need to stop 6 months before you apply
Premium-free Part A coverage begins 6 months back from the date you apply for Medicare, or for Social Security or Railroad Retirement Board benefits. It cannot begin earlier than the first month you were eligible for Medicare.
Because your Medicare enrollment date can land 6 months before your application date, Medicare says to stop contributing to your HSA at least 6 months before you apply, to avoid a tax penalty.
If you want to keep contributing
Medicare says that if you would like to keep contributing to your HSA, you should not apply for Medicare, Social Security or Railroad Retirement Board benefits.
Applying for any of the three can start your Medicare enrollment date. If you get Social Security benefits at least four months before you turn 65, you are enrolled in Part A and Part B automatically, so the date is set for you.
If your HSA comes with a job-based plan
Part B can only be started at certain times. Medicare says that if you have an HSA with a High Deductible Health Plan based on your or your spouse's current employment, you may qualify for a Special Enrollment Period. You can then wait to enroll in Part B until you or your spouse stop working or lose that employer coverage, without a lifetime late enrollment penalty.
Check your own dates before you rely on this. Our guides to Medicare enrollment periods and late enrollment penalties explain the deadlines.
What you can still spend from your HSA
The money already in your HSA stays yours. Medicare says you can withdraw it after you enroll to help pay for medical costs such as deductibles, premiums, coinsurance and copayments.
The IRS adds one limit: HSA money can pay Medicare premiums once you are 65 or older, but it cannot pay premiums for a Medicare Supplement (Medigap) policy.
Get help before you stop or start
The tax side belongs with your tax preparer or HSA administrator. For the Medicare side, California's HICAP program (run by the California Department of Aging) gives free, confidential counseling at 1-800-434-0222.
Earl Doucette also offers a free consultation by phone or at his walk-in office at 14315 Corporate Way Ste C in Moreno Valley, and can walk you through when Medicare would start for you.
Common questions
Can I keep contributing to my HSA after I turn 65?
Only while you are not enrolled in Medicare. Once Medicare starts, your contribution limit is zero, and contributing after your enrollment date can mean a tax penalty. If you want to keep contributing, Medicare says not to apply for Medicare, Social Security or Railroad Retirement Board benefits.
When do I need to stop contributing before I apply for Medicare?
Medicare says to stop at least 6 months before you apply. Premium-free Part A starts 6 months back from your application date, but no earlier than the first month you were eligible, so contributions in that window could count after your enrollment date.
Can I spend my HSA money on Medicare costs?
Yes. Medicare says you can withdraw HSA money after you enroll to help pay deductibles, premiums, coinsurance and copayments. The IRS says it cannot pay for Medigap premiums.
Sources
We do not offer every plan available in your area. Any information we provide is limited to the plans we do offer in your area. Please contact Medicare.gov or 1-800-MEDICARE to get information on all of your options.

