Retirement accounts
HSA Investment: The Only Triple-Tax-Free Account in the Code
An HSA is the only US account where contributions deduct, growth is untaxed, and qualified withdrawals come out untaxed. Here is how HSA investment works.

A health savings account is the only account in the US tax code that goes untaxed at all three points: the money is deductible going in, the growth is untaxed while it sits there, and qualified withdrawals come out untaxed. Every other account in the code gives you two of the three at most.
That third leg is why the account behaves more like a retirement wrapper than like a way to pay for glasses. It is worth real money over a long horizon, and no other account has it.
Every account is taxed at three gates
Think of any account as passing your money through three checkpoints. Gate one is the contribution. Gate two is the growth. Gate three is the withdrawal. The tax code lets each account through some of those gates for free, and stops it at the others.
A traditional 401(k) or IRA clears gates one and two. You deduct the contribution, the balance compounds without annual tax, and then every dollar you pull out in retirement is ordinary income. A Roth reverses it: you pay tax at gate one, then gates two and three are free. A traditional pension shifts the funding to your employer but still taxes the benefit as ordinary income when it arrives. A taxable brokerage account is the worst of the set, taxed at gate one, again on dividends along the way, and again on gains at the exit.
An HSA clears all three. Contributions are deductible whether or not you itemize. Interest and earnings on the assets in the account are tax free. And distributions used exclusively for qualified medical expenses are excluded from income entirely.
Laid out across the three gates, the whole argument fits in one row.
| Account | Deductible going in | Growth untaxed | Qualified withdrawal untaxed |
|---|---|---|---|
| HSA | Yes | Yes | Yes |
| Traditional 401(k) or IRA | Yes | Yes | No |
| Roth 401(k) or IRA | No | Yes | Yes |
What that third gate is actually worth
Take the 2026 self-only limit of $4,400, held for 25 years at a 7% nominal return. The balance grows to about $23,881 in every version of this comparison, because the compounding math does not care which wrapper you used.
What differs is what you keep. Hold the marginal rate at 24% at both ends so the comparison isolates the wrapper rather than a bet on future tax brackets. In the HSA, all $23,881 is spendable on medical costs with no tax. In a traditional 401(k) funded with the same $4,400 of pre-tax salary, tax at withdrawal leaves roughly $18,150. In a Roth, that same $4,400 of gross pay only buys about $3,344 of contribution after tax, which compounds to roughly $18,149.
Notice that the traditional and the Roth land in the same place. At a constant rate they always do, which is the standard result. The HSA finishes about $5,730 ahead of both, on a single year of contributions. That gap is not a return advantage. It is the tax leg the other two cannot avoid.
Who can actually open one
Eligibility is a monthly test, measured on the first day of each month, and it has four parts.
- You must be covered by a high deductible health plan. For 2026, that means an annual deductible of at least $1,700 for self-only coverage or $3,400 for family coverage, with annual out-of-pocket expenses capped at $8,500 and $17,000 respectively.
- You must have no other health coverage that overlaps. Standalone dental, vision, long-term care, disability and accident coverage are all disregarded, so those do not break eligibility.
- You must not be enrolled in Medicare. Note the word the IRS uses. The test is enrollment, not eligibility, which is a meaningful distinction for anyone working past 65 who has not filed for benefits.
- You must not be claimable as a dependent on someone else's return.
There is a softening rule worth knowing. If you are an eligible individual on the first day of the last month of your tax year, you are treated as eligible for the entire year, which lets a mid-year HDHP enrollee fund the full annual limit. The catch is a testing period running through the last day of the twelfth month after that, and failing it pulls the excess back into income.
Most of the money sits in cash unless you move it
Here is where the theory meets the account statement. An HSA is a custodial account, and the default posture at most custodians is a cash sweep paying deposit-account interest. Many hold a required cash floor, often somewhere between a few hundred and a couple of thousand dollars, and only let you invest the balance above it.
Nothing in the tax rules requires that. It is a custodian design choice. But it means the difference between an HSA that compounds at equity-like rates and one that earns a savings rate is a form you never filled in.
Run the full self-only limit down both paths for twenty-five years and that unfilled form has a price.
The investment menu matters more here than in a 401(k), because HSA custodians are chosen by your employer's benefits department rather than by anyone optimizing for expense ratios. If the menu is thin and expensive, the fees you cannot see on a statement come straight out of the compounding advantage the account was supposed to give you. Some custodians also charge a flat monthly administrative fee, which on a small balance is a large percentage.
An HSA does not expire, and that is not a small detail
A health FSA is use it or lose it. Money left at the end of the plan year is forfeited, subject at most to a limited carryover if the plan allows one. That structural deadline is what forces the December scramble for spare eyeglasses.
An HSA has no deadline of any kind. The balance rolls forward indefinitely, stays yours if you change employers, and stays yours if you stop being eligible to contribute. There is no rollover decision attached to a job change either, unlike the four options a 401(k) leaves you with when you leave a job. That last point about eligibility is the one people miss: once you lose eligibility, you can no longer add money, but you can still take tax-free distributions to pay or reimburse qualified medical expenses out of what is already in there.
The receipt shoebox
This is the mechanism that turns a medical account into a compounding vehicle, and it rests on an absence rather than a rule.
Qualified medical expenses must be incurred after the HSA is established. Expenses from before you opened the account never qualify. That sets a start point. What the code and the IRS guidance never set is an end point. There is no stated deadline by which you must take the distribution, and the IRS has addressed deferred distributions for expenses incurred in prior years as a permitted thing rather than an exception.
The sequence that exploits this runs in four steps. A qualified expense is incurred, it is paid from ordinary savings rather than from the HSA, the receipt is filed, and the account stays invested. Ten or twenty years later a distribution equal to that old receipt comes out tax-free, and in the meantime the money compounded untouched.
The obligation that falls on you is documentary. You must keep records sufficient to show that the distributions went exclusively to qualified medical expenses, that those expenses were not previously paid or reimbursed from another source, and that you never took them as an itemized deduction. That is three separate conditions on the same receipt, and no custodian tracks them for you. The account is self-substantiating, which is a polite way of saying the burden is entirely yours if anyone asks.
In practice that is a folder, a scan, and a record of date, provider, amount and payment method. A receipt from 2026 reimbursed in 2046 is worth the tax avoided on twenty years of growth, which is what makes the filing discipline the load-bearing part of the whole mechanism.
Payroll deduction adds a layer the IRA deduction cannot
If you fund the HSA yourself from a bank account, you get the deduction on your return. That is gate one, and it is the same benefit an IRA deduction gives you.
If you fund it through your employer's cafeteria plan by salary reduction, something else happens. Those amounts are treated as employer contributions, and employer HSA contributions up to the limits are exempt from federal income tax withholding, from social security and Medicare taxes, and from federal unemployment tax.
That payroll tax exemption is money that no deductible IRA contribution and no pre-tax 401(k) deferral will ever give you, because both of those still run through social security and Medicare withholding. It is the reason the routing of the contribution, not just the amount, changes the answer. Contributions made outside payroll can be deducted later on Form 8889, but the payroll tax portion is gone.
What changes at 65
Non-qualified distributions from an HSA carry an additional 20% tax on top of ordinary income. That is double the 10% early distribution penalty on an IRA, the same 10% that usually lands on a hardship withdrawal from a 401(k), and it is the sharpest edge on the account.
That 20% tax disappears in three situations: after the account beneficiary turns 65, becomes disabled, or dies. From 65 onward, a withdrawal for a non-medical reason is simply included in income and taxed at your ordinary rate, with no penalty on top.
Which means the floor under an HSA is a traditional IRA. Worst case, you never have the medical expenses you expected, and after 65 the account behaves like any other pre-tax retirement balance. Best case, you do have the expenses, and the same balance comes out untaxed. There is no version where the deduction you took at gate one is clawed back.
Two more things change at 65. Insurance premiums are generally not qualified medical expenses, but Medicare and other health coverage premiums become qualified once you are 65 or older, with Medicare supplemental policies such as Medigap specifically excluded. And enrolling in Medicare sets your contribution limit to zero for that month onward, so the account flips from accumulation to distribution the moment you sign up.
The honest constraints
The account is small. The 2026 limits are $4,400 for self-only coverage and $8,750 for family coverage, plus $1,000 more if you are 55 or older. Set that against the $24,500 elective deferral limit on a 401(k) and the scale problem is obvious. An HSA is a high-quality wrapper with a narrow mouth.
You have to accept an HDHP to use it. Real out-of-pocket exposure of up to $8,500 for an individual or $17,000 for a family is not a rounding error, and the plan that unlocks the HSA is the same plan that can hand you a large bill in a bad year.
The receipt strategy only works if you can afford it. The entire advantage comes from paying current medical costs with other money so the HSA stays invested. If you have to spend the balance as it accumulates, you have a tax-efficient checking account for medical bills, which is genuinely useful and completely different from the compounding machine described above.
The estate treatment is worse than a Roth. Who inherits it is set by the designation on file with the custodian, in the same way that the beneficiary form on a 401(k) overrides whatever the will says. If your spouse is the designated beneficiary, the account simply becomes their HSA. If anyone else is, the account stops being an HSA and its full fair market value becomes taxable to that beneficiary in the year you die, reduced only by your qualified medical expenses that the beneficiary pays within one year of death. A large HSA passing to a child is a large ordinary-income event in a single tax year.
Finally, all of the above is federal. Your state's income tax treatment of HSA contributions and earnings is set separately by state law and does not automatically follow the federal rules.
The mechanism in one line
The HSA is not a better investment. It is the same investment with one fewer tax gate, and the value of removing that gate scales with time and with your marginal rate.
That framing explains why the account behaves oddly in practice. Its power comes from not spending it, which is the opposite of what the word "health" on the statement suggests, and the discipline it actually demands is filing receipts rather than picking funds.