HSA and Medicare: What Changes When You Enroll

Enrolling in Medicare ends HSA contributions from your first month of enrollment. Your existing balance stays and you can withdraw it tax-free for qualified medical expenses.

7 minute read

Burst guide cover, for shoppers: the headline "HSA and Medicare" over the line "Worked examples, sourced to the IRS." with three tags: Medicare and HSAs, Contributions stop, Money stays yours.

Short answer

Enrolling in Medicare ends your eligibility to contribute to an HSA starting the first month of coverage. Your contribution limit for that year is pro-rated based on the months you were eligible. The balance you already have stays in your account and carries forward indefinitely, and you can withdraw it tax-free for qualified medical expenses at any age.

After 65, Medicare Part B and Part D premiums become qualified medical expenses you can pay directly from your HSA. Medigap supplemental policies are not qualified expenses. The 20% additional tax on non-medical HSA withdrawals also ends at 65, though medical withdrawals remain tax-free throughout your life.

Medicare enrollment stops HSA contributions

"Beginning with the first month you are enrolled in Medicare, your contribution limit is zero", according to IRS Publication 969. This means you cannot contribute any new money to your HSA once Medicare coverage begins, whether you enroll in Part A or Part B.

Your pro-rated limit for the enrollment year

If you enroll in Medicare partway through the year, your limit for that year shrinks. You can only count the months before enrollment began. Take the annual limit, divide by 12, and multiply by the months you were eligible. The worked example below runs the numbers for 2026.

Part A can start before you apply

If you sign up for Medicare after 65, Part A coverage can begin months before the day you applied. Publication 969 says the zero limit covers those earlier months too, so they count against you. Check your Part A start date before you contribute, because contributions made in months you weren't eligible can trigger the 6% excise tax. The excess contributions guide covers how to fix that.

Your existing HSA balance stays yours

Enrolling in Medicare ends new contributions, but it does not touch the money already in your account. "Amounts that remain at the end of the year are generally carried over to the next year", and this carryover continues at any age. Your HSA balance is yours indefinitely and carries forward with no deadline.

What you can spend it on

Spending from your existing HSA balance continues to be tax-free for qualified medical expenses at any age. The definition of a qualified medical expense does not change when you turn 65 or enroll in Medicare. Your medical costs in retirement, dental work, prescription medicines, and other eligible expenses can all be paid from your HSA tax-free.

Medicare premiums and your HSA after age 65

Once you turn 65, Medicare premiums become a special category of qualified expense. You can pay them directly from your HSA, which is not the case for most insurance premiums. The exceptions are specific.

Premiums you can pay from your HSA

"You may not use HSA funds to pay for insurance, except for the following. ... Medicare and other health care coverage if you were 65 or older" are expressly permitted. This includes "Premiums you pay for Medicare Part B" and "premiums you pay for Medicare Part D".

Insurance premiums you cannot pay from your HSA

Medigap supplemental insurance policies are not qualified medical expenses, even after 65. These are private insurance policies designed to fill gaps in Original Medicare. Medicare Part B and Part D premiums are the ones the IRS names, and your HSA can pay those after 65.

The penalty tax disappears at 65

Before age 65, withdrawing from your HSA for non-medical expenses costs you: "You may have to pay an additional 20% tax on your taxable distribution" on top of income tax. This penalty discourages using HSA funds for anything other than medical care.

"There is no additional tax on distributions made after the date you are disabled, reach age 65, or die". This means that at age 65, the 20% penalty no longer applies. You can withdraw money for non-medical reasons and owe only income tax, just like withdrawing from a regular retirement account. Medical withdrawals remain tax-free at any age.

Can you contribute to an HSA after retirement?

The answer depends on your Medicare enrollment and your health plan coverage. You can contribute to an HSA after retirement only if you meet two conditions: you do not have Medicare coverage, and you are enrolled in an HSA-qualified high deductible health plan (HDHP).

If you retire before age 65

If you retire before turning 65 and do not enroll in Medicare, you can continue to contribute to an HSA as long as you keep your HDHP coverage. Some retirees maintain HDHP coverage through a spouse's employer plan, a marketplace plan, or a retiree health plan that qualifies as an HDHP. You can contribute for as long as you remain eligible, up until the month you enroll in Medicare.

If you retire at or after age 65

At age 65, most people enroll in Medicare, which immediately makes you ineligible to contribute to an HSA. If you delay Medicare enrollment past 65 and stay on an employer plan or marketplace plan that qualifies as an HDHP, you can continue contributing. However, once you enroll in Medicare, your contribution eligibility ends.

Worked example: pro-rated contributions in the Medicare enrollment year

Let's walk through a concrete scenario to see how the pro-ration works.

Your situation

  • You have self-only HDHP coverage and you turn 65 in July.

  • Your 2026 HSA contribution limit is $4,400 (self-only) plus $1,000 catch-up for being 55 and older, for a total of $5,400.

  • In July, you turn 65 and enroll in Medicare Part B.

Your pro-rated limit

You were eligible to contribute for January through June, which is 6 months. Your pro-rated limit is calculated by dividing your annual limit by 12 and multiplying by 6: ($5,400 ÷ 12) × 6 = $2,700. You can contribute a total of $2,700 to your HSA for 2026. Any contributions you made from January through June count toward this limit. If you contributed $2,000 already, you have $700 of contribution room left before your July enrollment date.

Spending your HSA after Medicare starts

Withdrawals from your HSA work the same way before and after Medicare. You take the money out for a qualified medical expense and keep the receipt in case the IRS asks. For the steps and what administrators look for once you're past 65, see withdrawals after 65. To plan the year you enroll, contribution limits has the 2026 numbers, and catch-up contributions explains the extra $1,000 at 55.

Where Burst fits

Where a purchase needs a letter of medical necessity to be reimbursed (gym memberships, massage, fitness and recovery equipment, sleep products), Burst writes the letter and files the claim. $35, refunded if no letter is issued or the claim is denied. See how a letter works.

Frequently asked questions

Can I contribute to my HSA after I enroll in Medicare?

No. Once you enroll in Medicare (Part A or Part B), your contribution eligibility ends. Any contributions after enrollment are not deductible and may be subject to a 6% excise tax.

Do I lose my HSA balance when I turn 65?

No. Your HSA balance stays in your account and carries forward indefinitely. You can withdraw it tax-free for qualified medical expenses at any age.

Can I use my HSA to pay my Medicare premiums?

Yes. After 65, you can pay Medicare Part B and Part D premiums directly from your HSA. Medicare supplemental (Medigap) premiums are not qualified expenses.

Do I still owe the 20% penalty if I withdraw for non-medical reasons after 65?

No. The 20% additional tax no longer applies after age 65. You can withdraw for any reason and owe only income tax. Medical withdrawals continue to be tax-free at any age.

How is my HSA contribution limit calculated if I enroll in Medicare mid-year?

Your limit is pro-rated by the number of months you were eligible. If you enroll in July, you can contribute for 6 months: (annual limit ÷ 12) × 6. See the worked example for details.

Can I keep an HSA if I have both Medicare and an HDHP?

You keep the account. Medicare enrollment ends your eligibility to contribute, even with HDHP coverage, but the balance stays yours and you can still withdraw it for qualified medical expenses.

Keep reading: HSA Withdrawals After You Turn 65, HSA Contribution Limits, HSA Catch-Up Contribution at 55, and all guides on this topic.

Sources

Make every dollar count

Start saving on your healthcare with a single connection.

Get Burst

Make every dollar count

Start saving on your healthcare with a single connection.

Get Burst

Make every dollar count

Start saving on your healthcare with a single connection.

Get Burst