Most people treat their HSA like a medical checking account. Money goes in, medical bills come out, and the balance hovers somewhere between $500 and $3,000. The account exists to cover copays and prescriptions, not to build wealth.
For people who can afford to pay medical expenses out of pocket and leave the HSA untouched, the account functions completely differently. It becomes a third tax-advantaged retirement account — one with a tax structure that is arguably better than either a 401k or a Roth IRA.
This strategy is sometimes called the stealth IRA. It is not a loophole or a workaround. It is exactly what the HSA was designed to do. It just requires a different relationship with the account than most people have.
Why the HSA Tax Treatment Is Unusual
Tax-advantaged accounts generally give you one tax benefit: either a deduction now or tax-free growth later. The traditional 401k gives you a deduction on contributions and taxes withdrawals. The Roth IRA gives you no deduction but tax-free growth and withdrawals. Each account saves you taxes at one point in the cycle. For a full comparison of how to sequence contributions across all three, see 401k vs IRA vs HSA — which to max first.
The HSA gives you both. Contributions are tax-deductible. Growth inside the account is tax-free. Withdrawals for qualified medical expenses are tax-free. Used correctly, you contribute pre-tax dollars, they grow without being taxed, and you spend them without being taxed. No other account does all three.
The catch is the "qualified medical expenses" requirement on withdrawals. Spend HSA money on anything else before age 65 and you owe income tax plus a 20% penalty. That penalty is what makes most people nervous about investing their HSA aggressively.
After age 65, the penalty disappears. At that point an HSA withdrawal for non-medical expenses is taxed exactly like a traditional 401k withdrawal — ordinary income tax, no penalty. The account effectively becomes a traditional IRA with better contribution rules and the bonus that medical withdrawals remain completely tax-free.
After 65, the HSA is a traditional IRA with an added benefit: medical withdrawals stay tax-free. Non-medical withdrawals are taxed as ordinary income, just like a 401k. The 20% penalty only applies before 65.
The Receipt Strategy
There is one more piece of the HSA tax structure that most people do not know: there is no time limit on reimbursing yourself for qualified medical expenses.
If you pay a $400 medical bill out of pocket today and save the receipt, you can reimburse yourself from your HSA at any point in the future — five years from now, twenty years from now, in retirement. The IRS requires that the expense occurred after the HSA was opened and that you have documentation, but there is no deadline.
This means you can spend decades accumulating medical receipts while your HSA grows invested, then withdraw the accumulated receipt total as a tax-free lump sum in retirement. Every out-of-pocket medical expense you pay today is a future tax-free withdrawal waiting to happen.
For someone who pays $3,000 to $5,000 per year in out-of-pocket medical costs and saves every receipt, this can represent $60,000 to $100,000 in future tax-free withdrawal capacity over a 20-year accumulation period — on top of whatever the HSA has grown to.
Keep a spreadsheet or a folder of receipts. The recordkeeping is simple. The tax benefit is real.
What the Numbers Look Like Over Time
In 2026, the HSA contribution limit is $4,300 for individuals and $8,550 for families. There is an additional $1,000 catch-up contribution available starting at 55. These limits have grown consistently over time — the full history of IRA and HSA contribution limit increases shows why modeling future limit growth matters for long projections.
If you contribute the individual maximum of $4,300 per year starting at 35 and invest it at 7% annual return, the balance at 65 is approximately $430,000. That entire balance is available for medical expenses tax-free, or for any purpose with ordinary income tax after 65.
For a family contributing $8,550 per year from 35 to 65 at 7%, the balance approaches $855,000. A balance that size, used for medical expenses in retirement — which are substantial for most people — could cover a significant portion of healthcare costs entirely tax-free.
The contribution limits are smaller than a 401k, but the triple tax advantage means each dollar contributed is worth more on an after-tax basis than the same dollar in a traditional 401k, assuming you eventually use it for medical expenses.
How to Actually Invest Your HSA
Most HSA providers default to a cash account. The money sits there earning near-zero interest, which is appropriate if you are using it to cover current medical bills but wasteful if your plan is to let it grow for 20 or 30 years.
To use the HSA as an investment account, you need to move the balance into the investment portion of your HSA — most providers offer this as a separate step from the cash account. Some providers require a minimum cash balance (typically $500 to $1,000) before allowing investments. The investment options vary by provider and are one of the most important factors in choosing where to hold your HSA.
If your employer-assigned HSA provider has poor investment options or high fees, you can transfer the balance to a different provider with better options. The transfer process is similar to a 401k rollover — it requires paperwork but is straightforward. Fidelity, Lively, and a few other providers offer HSA investment accounts with access to low-cost index funds comparable to what you would find in a good IRA.
Once invested, treat the HSA like any other long-term retirement account. A low-cost total market index fund is appropriate for most people. The investment horizon is long, the tax treatment rewards growth, and there is no reason to be conservative with money you do not plan to touch for decades.
Who This Strategy Works For
The invest-and-hold HSA strategy requires one prerequisite: you need to be able to pay current medical expenses from other funds. If you cannot cover a $2,000 medical bill without tapping the HSA, the strategy does not work — the money needs to be liquid and accessible, not invested in equities.
For people with a solid emergency fund and modest annual medical costs, the bar is lower than it might seem. You are not committing to never using the HSA for medical expenses. You are committing to paying current expenses out of pocket when you reasonably can, and saving the receipts. In years with unusually high medical costs, you can always reimburse yourself — either immediately or from the accumulated receipt pool.
The strategy also requires access to an HSA, which means being enrolled in a high-deductible health plan. HDHPs are not right for everyone. People with chronic conditions, high expected medical utilization, or dependents with significant healthcare needs may find that the higher out-of-pocket costs of an HDHP outweigh the HSA tax benefits. The math depends on your actual healthcare usage and your specific plan options.
The HDHP trade-off is real. The HSA is only available with a high-deductible health plan. For healthy people with low medical utilization, the premium savings from an HDHP plus the HSA tax benefit usually wins. For people with predictable high medical costs, a lower-deductible plan may be cheaper overall despite the lost HSA access.
The HSA in Your Retirement Plan
Healthcare is one of the largest expenses in retirement and one of the least predictable. Fidelity estimates that a 65-year-old couple retiring today will spend roughly $300,000 on healthcare over the course of retirement, not including long-term care. That figure grows with inflation and is highly variable depending on health status.
An HSA balance specifically earmarked for medical expenses in retirement is worth more than the same balance in a 401k, because HSA medical withdrawals are tax-free while 401k withdrawals are taxed as ordinary income. On a $200,000 HSA balance used for medical expenses in a 22% tax bracket, the tax-free treatment is worth about $44,000 compared to drawing the same amount from a 401k.
This is why financial planners increasingly treat the HSA as the first account to draw for medical expenses in retirement — the tax efficiency is unmatched. The 401k and IRA cover living expenses. The HSA covers healthcare. That sequencing, done right, reduces lifetime taxes on retirement withdrawals.
How to Model It in a Calculator
Most retirement calculators either ignore the HSA entirely or treat it as a pass-through — money in, money out for medical bills, zero balance growth. Neither is useful for someone using the HSA as an investment account.
NumberToRetire.com models the HSA as a full investment account with its own balance, annual contribution, and return rate override. You can set the contribution to the annual maximum, apply the family limit if you are married, and assign a return rate that reflects your actual HSA investment allocation rather than a default cash rate. The balance compounds year over year alongside your 401k and IRA in the projection.
The catch-up contribution at 55 is applied automatically once you enter an age that qualifies. The HSA balance is included in the total portfolio figure and in the stacked area chart, so you can see exactly how much of your projected retirement balance comes from the HSA versus other accounts.
If you have been paying medical expenses out of pocket and accumulating receipts, the HSA balance in the calculator is a reasonable proxy for the tax-free withdrawal capacity you are building — even if the actual reimbursements happen over time rather than as a lump sum.