Nestward
← Back to Blog
July 25, 2026

Your HSA Is a Better Retirement Account Than Your 401(k). Here's the Math.

Every tax-advantaged account you've heard of asks you to pay tax somewhere. A traditional 401(k) skips tax now and collects it later, on every withdrawal, forever, via required minimum distributions you can't avoid. A Roth flips it: pay tax now, never again. Both are a genuine bargain. But there's a third account that isn't a bargain at all, it's a loophole, and most people who have access to it are leaving it on the table.

It's the Health Savings Account, and it's the only account in the entire tax code with a triple tax advantage: money goes in tax-free, grows tax-free, and comes out tax-free, all three, at once, forever, as long as it's spent on qualified medical care.1 No other account does all three. This post is the case for treating your HSA as a retirement account, not a checking account for co-pays, and the specific mechanics that make it work.

The account nobody explains correctly

An HSA isn't insurance, and it isn't an FSA. Three things distinguish it, and mixing any of them up is where the confusion starts:

  • You need an HDHP to contribute. Only people enrolled in a qualifying High-Deductible Health Plan can put new money into an HSA, a plan with a minimum deductible and maximum out-of-pocket set annually by the IRS.2 No HDHP, no new contributions, though you keep and can still spend whatever is already in the account.
  • It's yours, and it never expires. Unlike a Flexible Spending Account, which is typically "use it or lose it" each year and belongs to your employer, an HSA is owned by you personally. The balance rolls over every year with no limit, follows you between jobs, and stays yours even if you later switch off an HDHP or leave your employer entirely.3
  • Contributions are capped, not matched. There's no employer match to chase here (though some employers do kick in money on top of your limit). For 2026, the IRS contribution limit is $4,400 for self-only coverage and $8,750 for family coverage, plus a $1,000 catch-up for anyone 55 or older, a flat dollar figure fixed in the original statute since 2009 and never adjusted for inflation.4

The triple tax advantage, spelled out

Compare the three main account types on exactly one thing: how many of the three possible tax events (contribution, growth, withdrawal) are tax-free.

AccountMoney inGrowthQualified withdrawalTax-free events
Traditional 401(k) / IRAPre-taxTax-deferredTaxed as ordinary income2 of 3
Roth 401(k) / IRAAfter-taxTax-freeTax-free2 of 3
HSA (medical use)Pre-taxTax-freeTax-free3 of 3

A traditional account defers the tax bill to withdrawal. A Roth prepays it and skips the rest. The HSA is the only one of the three where, used correctly, no tax event ever happens at all. Contributions made through payroll also skip FICA (Social Security and Medicare payroll tax), on top of income tax, an advantage even a traditional 401(k) doesn't offer, since 401(k) deferrals still get hit with FICA.5

The move that turns it into a retirement account: don't spend it

Here's the strategy, and it's legal, well-documented, and almost nobody uses it: pay medical bills out of pocket today, if you can afford to, and let the HSA balance invest and compound untouched for decades. Then reimburse yourself, tax-free, for that decades-old medical expense whenever you want, including in retirement.

The mechanism that makes this work is a quirk of the tax code: HSA reimbursements have no deadline. As long as the expense was incurred after you opened the account, and you kept the receipt, you can reimburse yourself tax-free this year for a bill from 15 years ago.6 The common name for this is the "shoebox strategy": keep every qualified medical receipt (a literal shoebox, a folder, a spreadsheet, anything), let the HSA invest and grow untouched, and cash in that stack of receipts as a tax-free withdrawal whenever you actually need the money, ideally in retirement, when every other account is forcing taxable distributions on you.

This is also why the account is chronically underused as an investment vehicle rather than a checking account: research from HSA administrators and industry trackers consistently finds that only a small minority of accountholders, on the order of one in ten, ever invest their balance rather than leaving it sitting in cash earning close to nothing.7 Most HSA custodians require a minimum cash cushion, often $1,000 to $2,000, before letting you invest the rest; check yours, and don't let money sit uninvested past that threshold.

After 65, it quietly turns into a better traditional IRA

Two more things change once you turn 65, and both work in your favor:

  1. The 20% penalty for non-medical withdrawals disappears. Before 65, spending HSA money on anything other than qualified medical expenses costs you ordinary income tax plus a 20% penalty, a real deterrent. After 65, that penalty vanishes entirely, non-medical withdrawals are simply taxed as ordinary income, exactly like a traditional IRA withdrawal.8 Medical withdrawals, at any age, remain permanently tax-free, no penalty ever applied.
  2. There are no Required Minimum Distributions, ever. A traditional 401(k) or IRA forces you to start withdrawing (and paying tax on) money at 72, whether you need it or not, as we cover in the Lifetime Financial Planner. The HSA has no such rule. It can sit and compound for your entire life if you don't need it, and pass to a spouse as an HSA (inheriting all its tax benefits) or to another heir as taxable income.9

Put those together and, functionally, an HSA held past 65 behaves like a traditional IRA with a bonus mode: ordinary income tax on anything, still fully tax-free on medical, which for most retirees is a large and growing share of spending anyway.

Where it fits in the order of operations

The personal-finance community has converged on a rough savings priority order, and the HSA usually sits above everything except free money.10 A common version:

  1. 401(k) up to the employer match. Never leave a match on the table, it's an instant, guaranteed return no HSA or IRA can match.
  2. Max the HSA, if you have access to one. Triple tax advantage, no other account beats it.
  3. Max a Roth or traditional IRA, depending on your current versus expected future tax bracket (our Roth Conversion Planner walks through that tradeoff in detail).
  4. Go back and max the 401(k) beyond the match.
  5. Taxable investing for anything left over.

The logic for ranking the HSA above the IRA specifically: dollar for dollar, the HSA saves you income tax and payroll tax going in, where an IRA only saves income tax, and unlike the IRA, a portion of an HSA's eventual use is guaranteed to be tax-free no matter what happens to your tax bracket, because you will have medical expenses.

The math, worked through

Say you're 30, contribute the full $4,400 individual limit every year through age 65 (35 years), invested at a 7% nominal return, and never touch it. That's $154,000 in contributions. At 7% over 35 years, the balance compounds to roughly $608,000, entirely from a pre-tax, never-taxed-again contribution stream.11 Run the same contribution through a taxable brokerage account instead, losing it to income tax and payroll tax on the way in and to capital gains drag along the way, and you'd need a meaningfully larger contribution to land in the same place. That gap, not a rounding error, is the entire argument for maxing the HSA before a taxable account, and often before an IRA.

What it doesn't fix

A few honest limits, so this doesn't read as a free lunch:

  • You need an HDHP to contribute new money, and HDHPs mean higher out-of-pocket exposure before insurance fully kicks in. If a high deductible would force you into debt during a bad medical year, that's a real cost to weigh against the tax benefit.
  • Not everyone has access. Employer plan design decides whether an HDHP, and therefore an HSA, is even on the menu.
  • Administrator fees and investment menus vary widely. A high-fee custodian with a thin fund lineup can eat into the advantage; shop for a low-cost provider the same way you'd shop for a 401(k) with a bad fund lineup, and consider rolling old HSA balances into a better one (allowed, similar to an IRA rollover).
  • Keep real records. The tax-free-forever reimbursement trick only works with genuine documentation of a genuine qualified expense. Don't manufacture receipts; keep the real ones.

The bottom line

The HSA is the only account that's never taxed at all when used as intended, and the way to actually capture that is the part almost nobody does: stop treating it as a co-pay fund and start treating it as a retirement account you happen to also be allowed to raid tax-free for medical bills. Pay small medical costs out of pocket if you can, invest the HSA balance instead of holding cash, keep your receipts, and let it compound for decades. Model how a bigger pre-tax contribution changes your year-by-year numbers in the Lifetime Financial Planner, and see how it stacks against Roth contributions in the Roth Conversion Planner.


This article is for educational purposes only and is not financial or tax advice. Contribution limits and rules are set by the IRS and change periodically; confirm current figures before acting. Consult a qualified tax professional about your specific situation.


Sources & Footnotes

Footnotes

  1. IRS, "Publication 969: Health Savings Accounts and Other Tax-Favored Health Plans," the authoritative source on HSA contribution, eligibility, and qualified-distribution rules, including the tax treatment of contributions, earnings, and qualified withdrawals.

  2. IRS Publication 969, definition of a High-Deductible Health Plan (HDHP) and the annual minimum-deductible / maximum-out-of-pocket thresholds that determine HSA eligibility.

  3. On the FSA "use it or lose it" rule (with limited employer-optional carryover or grace-period exceptions) versus the HSA's individual ownership and unlimited rollover, see IRS Publication 969 and the IRS FSA overview.

  4. 2026 HSA contribution limits and the $1,000 catch-up contribution (fixed by statute since 2009, not inflation-indexed) per IRS annual inflation-adjustment guidance under IRC Section 223; see IRS Revenue Procedure guidance summarized at irs.gov.

  5. On payroll (Section 125 cafeteria plan) HSA contributions avoiding both federal income tax withholding and FICA (Social Security and Medicare) tax, versus traditional 401(k) deferrals which reduce federal taxable wages but remain subject to FICA, see IRS Publication 969 and IRS Publication 15-B, Employer's Tax Guide to Fringe Benefits.

  6. On the absence of a deadline for HSA reimbursement of a qualified medical expense, so long as the expense was incurred after the HSA was established and adequate records are kept, see IRS Publication 969's rules on qualified medical expense distributions.

  7. Devenir's semiannual HSA Research Reports and the Employee Benefit Research Institute's (EBRI) HSA database studies have repeatedly found that only a small share of HSA accountholders, commonly cited in the range of roughly one in ten, invest any portion of their balance beyond cash; see Devenir Research and EBRI's HSA research.

  8. IRS Publication 969 on the 20% additional tax for non-qualified HSA distributions before age 65, and its elimination (leaving only ordinary income tax) for distributions after age 65, Medicare enrollment, or disability.

  9. On the absence of Required Minimum Distributions for HSAs, and spousal-beneficiary versus non-spouse-beneficiary tax treatment on inheritance, see IRS Publication 969's section on HSA distributions after the account owner's death.

  10. This savings-priority ("waterfall") ordering is a widely used personal-finance heuristic; see the Bogleheads wiki "Prioritizing investments" article for a representative version and its reasoning on where HSAs and employer matches rank.

  11. Illustrative compounding calculation: $4,400 contributed annually for 35 years at a constant 7% nominal annual return, ordinary annuity timing, no fees or catch-up contributions included. Actual results depend on markets, contribution consistency, and costs; model your own numbers in the Lifetime Financial Planner.

Get new posts by email

A note whenever we publish something new. No spam, unsubscribe anytime.

Discussion

Comments aren't set up yet.