HSA Retirement Calculator: Your Health Savings Account as a Stealth IRA

A health savings account is usually sold as a way to pay this year’s doctor bills. Used as an investment account instead, it can be the best retirement account you have: no tax going in, no tax on the growth, and no tax coming out for medical costs, which everyone has. Enter your plan, your contributions and your tax rates, and this calculator projects your HSA at retirement and compares it with putting the same paycheck dollars into a 401(k) or a taxable account.

1. You and your plan

2. Your contributions

3. Your tax rates

Your numbers stay in your browser. Nothing is sent or saved.

How the HSA compares

HSATraditional 401(k)Roth IRA
Deductible going inYesYesNo
Skips Social Security and Medicare tax (payroll)YesNoNo
Tax-free growthYesTax-deferredYes
Tax-free withdrawalsFor medical costs, any ageNoAfter 59½ and 5 years
Required minimum distributionsNoYesNo

Worked example

Dana is 41 and has self-only coverage with a high-deductible plan. She has $3,000 in it today, puts the 2026 maximum of $4,400 into her HSA through payroll and pays her $1,500 a year of medical bills out of pocket. In the 24% bracket, each year’s contribution saves her about $1,390 in income, Social Security and Medicare tax, so it costs her take-home pay only about $3,010. Invested at 6% with the $1,000 catch-up from 55, her HSA grows to about $249,000 by 65. Spent on medical costs, every dollar of that is tax-free. The same take-home dollars in a 401(k) would be worth about $176,000 after tax, and in a taxable account about $153,000. Along the way she banks about $36,000 of receipts she can reimburse herself for, tax-free, whenever she wants.

Planning the rest of your retirement money? The retirement withdrawal order calculator shows which account to spend first.

Frequently asked questions

What are the HSA contribution limits for 2026 and 2027?

For 2026, $4,400 with self-only high-deductible coverage and $8,750 with family coverage. For 2027, $4,500 and $9,000. If you're 55 or older, you can add $1,000 a year. Employer contributions count toward the limit.

Why use an HSA as a retirement account?

Contributions are deductible, growth is tax-free and withdrawals for medical costs are tax-free, at any age. Through payroll, contributions also skip Social Security and Medicare tax. No other account gets all of that, and everyone has medical costs in retirement.

What is the HSA receipts strategy?

Pay medical bills out of pocket now, keep the receipts and let the HSA stay invested. There's no deadline to reimburse yourself, so years later you can withdraw the total tax-free for any reason, as long as the expenses came after you opened the HSA.

What happens if I use HSA money for non-medical expenses?

Before 65, you pay income tax plus a 20% penalty. After 65, there's no penalty and the withdrawal is taxed like a traditional IRA, so the HSA is never worse than a traditional account for retirement.

Can I contribute to an HSA after 65?

Only if you have a qualifying high-deductible plan and aren't enrolled in any part of Medicare. Once Medicare starts, contributions stop, but you can keep spending and investing what's there.

Who should not invest their HSA?

If you need the money for this year's medical bills and don't have other savings, use it for that. Investing the HSA works best once you have an emergency fund and are already getting any 401(k) match.

Sources

Reviewed by Michael Jones, EA, CFP®, an Enrolled Agent federally licensed to represent taxpayers before the IRS. Projections use a steady return and today’s contribution limits, which rise with inflation. Past returns don’t guarantee future results. The comparison uses flat tax rates and doesn’t include employer 401(k) matches, which usually come first. This is education, not advice for your situation; book a free call for that.

Not sure whether you need me?

Book a free 15-minute call. Tell me what’s going on, and I’ll tell you honestly whether I can help and what the work would cost. If you don’t need me, I’ll tell you that too.