Key Takeaways
- Medicare enrollment ends HSA contributions on the first day of the enrollment month, but the existing balance remains fully yours to spend or invest.
- Withdrawing HSA funds for non-qualified expenses before age 65 costs you ordinary income tax plus a 20% penalty. After 65, only ordinary income tax applies, which mirrors a Traditional IRA withdrawal.
- Track every qualified medical expense with receipts dated after HSA establishment, then reimburse yourself years later, tax-free, with no time limit imposed by the IRS. Tool:Run your HSA withdrawal projections in the CalcMoney Retirement Calculator →
Find and Roll Over Your Old 401(k)s
Capitalize finds old 401(k)s and handles the entire rollover for you, free, with zero paperwork on your end.
Medicare Enrollment Stops Contributions. It Does Not Touch the Balance.
The moment you enroll in Medicare Part A, Part B, or both, your eligibility to contribute to a Health Savings Account ends. The IRS ties HSA contribution eligibility to enrollment in a High-Deductible Health Plan. Medicare is not a High-Deductible Health Plan. The two cannot coexist for contribution purposes.
The cutoff date is the first day of the month in which your Medicare coverage begins. If your Part A coverage begins August 1, your last eligible contribution month is July. Any dollar deposited after that date is an excess contribution and subject to a 6% excise tax each year it remains in the account, reported on IRS Form 5329.
The existing balance is untouched by this rule. A $74,000 HSA balance on the day you enroll in Medicare stays at $74,000. You can invest it, spend it, and withdraw it according to the rules below.
The Two Withdrawal Regimes: Before and After Age 65
Under Age 65: Qualified Expenses Only Without Penalty
HSA withdrawals before age 65 fall into two categories. Qualified medical expenses produce zero tax and zero penalty. Non-qualified expenses produce ordinary income tax plus a 20% additional tax, which IRS Publication 969 defines as a statutory penalty, not a standard tax rate.
Qualified medical expenses include Medicare Part B premiums, Medicare Part D premiums, Medicare Advantage plan premiums, dental, vision, long-term care insurance premiums up to an age-based IRS limit, and most out-of-pocket medical costs. Medigap (Medicare Supplement) premiums are not qualified HSA expenses and cannot be paid from an HSA tax-free.
Age 65 and Older: Non-Qualified Withdrawals Lose the Penalty but Keep the Tax
At age 65, the 20% additional tax disappears entirely. A non-qualified withdrawal from an HSA at age 65 or older is taxed only as ordinary income, at whatever marginal federal rate applies to the account holder that year. This mirrors the taxation of a Traditional IRA distribution.
The practical result: after 65, an HSA functions as a hybrid account. Qualified medical expenses remain completely tax-free. Everything else becomes a tax-deferred account with no required minimum distributions, unlike a Traditional IRA which requires distributions beginning at age 73 under the SECURE 2.0 Act.
Worked Example 1: The Early Medicare Enroller at Age 63
A 63-year-old employee accepts early retirement and enrolls in Medicare Part A in October. She has an HSA balance of $41,500. Her marginal federal income tax rate is 22%.
She withdraws $3,200 to pay for dental implants, which qualify as a medical expense under IRS guidelines. Tax owed: $0. Penalty owed: $0.
She then withdraws $5,000 to fund a home renovation. That $5,000 is non-qualified. The tax calculation:
- Federal income tax: $5,000 x 22% = $1,100
- 20% additional tax: $5,000 x 20% = $1,000
- Total cost of that withdrawal: $2,100, leaving her with $2,900 net.
Effective tax rate on the non-qualified withdrawal: 42%. At 63, the HSA is nearly as punishing as an early 401(k) withdrawal for non-medical spending.
Worked Example 2: The Age-65 Reimbursement Strategy
A 67-year-old retiree kept meticulous records of out-of-pocket medical expenses paid from personal checking accounts between 2019 and 2024, totaling $18,400. He never reimbursed himself from his HSA during those years. His current HSA balance is $62,000. His 2026 marginal federal rate is 24%.
The IRS imposes no deadline on HSA reimbursements, provided three conditions are met: the HSA existed at the time of the expense, the expense was qualified, and the expense was not previously deducted or reimbursed from any other source.
He withdraws $18,400 from his HSA in 2026. Tax owed: $0. Penalty owed: $0. He collects $18,400 in tax-free cash.
Had he taken the same $18,400 as a non-qualified withdrawal at age 67, he would owe $18,400 x 24% = $4,416 in federal income tax. The reimbursement strategy saves him $4,416 by matching the withdrawal to documented qualified expenses.
Medicare Retroactive Enrollment and the Six-Month Lookback
Social Security beneficiaries who delay Medicare enrollment past age 65 face a specific trap. When they eventually apply, Medicare Part A retroactively covers the six months prior to the application date, up to the month they turned 65.
This retroactive coverage makes HSA contributions during that retroactive window excess contributions. IRS Publication 969 addresses this directly. A person who applies for Medicare at 66 and receives six months of retroactive Part A coverage must treat contributions made during those six months as excess, subject to the 6% excise tax on IRS Form 5329, unless withdrawn by the tax-filing deadline plus extensions.
The fix is straightforward: contact the HSA custodian before the tax-filing deadline and request a withdrawal of excess contributions. The custodian will calculate any net income attributable to the excess amount, which must also be withdrawn and reported as income.
What to Do With the HSA Balance at Medicare Enrollment
The three most tax-efficient uses of an existing HSA balance after Medicare enrollment, ranked by tax outcome:
- Pay qualified medical expenses directly from the HSA. Federal tax rate: 0%. State tax varies by state.
- Accumulate unreimbursed qualified expense receipts and withdraw as a lump sum in a low-income year. Federal tax rate: 0%.
- Treat the HSA as a supplemental retirement account after age 65 for non-medical spending. Federal tax rate equals ordinary income rate, identical to a Traditional IRA distribution, but with no required minimum distributions.
The worst use: non-qualified withdrawals before age 65. The 42% combined tax and penalty load exceeds nearly every other account type for premature distribution.
Run Your Own Numbers Before the Medicare Clock Starts
The gap between a well-timed HSA withdrawal strategy and a poorly timed one frequently exceeds $10,000 in a single tax year for balances above $50,000. The variables, including your Medicare enrollment date, your existing balance, your marginal rate, and your documented expense history, interact in ways that a single rule of thumb cannot capture.
The CalcMoney Retirement Calculator lets you model qualified versus non-qualified withdrawal scenarios across multiple years, incorporating your specific tax bracket and projected medical expenses. Run the projections before your Medicare enrollment date, not after. The rules change the moment coverage begins.
You Might Also Like
- Roth IRA Early Withdrawal: Exactly How Much Tax and Penalty You Owe
- How to Calculate a Dynamic Withdrawal Rate That Survives Any Market
- how to calculate medicare irmaa surcharge
Results are estimates for informational purposes only. Consult a licensed financial professional before making financial decisions.
Put These Numbers to Work
Open a Fidelity brokerage account. $0 commissions, no account minimums, fractional shares available.
Affiliated. We may earn a commission.
Related Guides
Free Tools
Run the actual numbers
Stop estimating. Plug in your numbers and get a precise answer in seconds. Free, no signup required.
Open the Retirement Income Calculator


