How the triple tax advantage works
Every other tax-advantaged account makes you pick one break. A traditional 401(k) skips tax on the way in but taxes withdrawals; a Roth taxes contributions but not withdrawals; a brokerage account taxes the growth in between. An HSA — available only while you are enrolled in a qualifying high-deductible health plan (HDHP) — takes all three breaks at once for medical spending. And there is a fourth, less-known layer: contributions made through your employer's payroll under a cafeteria plan also avoid the 7.65% employee-side FICA tax, something not even a 401(k) offers. At a 30% combined marginal rate, a payroll dollar into an HSA costs you roughly 62 cents of take-home pay.
The IRS sets annual HSA contribution limits — for 2026 they are $4,400 for self-only HDHP coverage and $8,750 for family coverage, plus a $1,000 catch-up from age 55 (IRS Rev. Proc. 2025-19). Limits adjust with inflation, so checkIRS Publication 969for the current year before setting your contribution.
The projection and the three layers
FV = B₀(1 + r)ⁿ + (C + E − S) × [(1 + r)ⁿ − 1] ÷ r
Layer 1: tax saved in = C × (t + 7.65% if payroll)
Layer 2: growth untaxed → no drag on r
Layer 3: qualified withdrawals S taxed at 0%
where B₀ is today's balance, C your annual contribution, E the employer's, S annual qualified spending, r the return, n the years, andt your combined marginal tax rate. The calculator simulates this year by year (grow, contribute, spend) and, for comparison, grows the after-tax version of your contributions — C × (1 − t) per year — in a taxable account with capital-gains tax applied once on exit.
Worked example
Take the default scenario: $5,000 already saved, $4,000 a year contributed via payroll plus $500 from the employer, $500 a year spent on medical bills, 7% returns for 20 years at a 30% combined marginal rate:
| Step | Amount |
|---|---|
| Layer 1 — money in, untaxed$4,000/yr via payroll skips 37.65% (30% income tax + 7.65% FICA) for 20 years | $30,120 saved |
| Layer 2 — growth, untaxed$5,000 start + $90,000 contributed (employer adds $500/yr free), compounding at 7% | $183,330 |
| Layer 3 — money out, untaxed$500/yr of qualified medical spending withdrawn tax-free along the way | $10,000 |
| The taxable alternativethe same pay after 30% income tax invests $2,800/yr; gains taxed 15% on exit | $105,969 |
| = HSA ends $77,361 aheadplus the $30,120 of upfront tax savings, counted separately | $77,361 |
Computed with this calculator's default settings — open the tool above and you'll see the same numbers, then swap in your own contribution, tax rate, and timeline.
The stealth retirement account strategy
The projection above assumes you spend a little from the HSA each year. Many savers go further: they pay medical bills out of pocket, leave the HSA fully invested, and file the receipts. There is no deadline for reimbursing yourself — a qualified expense from 2026 can be reimbursed tax-free in 2046, after two decades of untaxed compounding on money you technically already spent. Set the “medical spending from the HSA” input to zero to model this. At 65 the account softens further: non-qualified withdrawals drop the 20% penalty and are simply taxed as income, like a traditional IRA — while medical withdrawals, including Medicare premiums, stay tax-free for life. Until 65, though, the penalty makes the HSA a poor place for money you may need for non-medical emergencies.
See how an HSA stacks up against your workplace plan with the401(k) calculator, isolate the pure growth math with thecompound interest calculator, or check what a payroll contribution actually does to your paycheck with thetake-home pay calculator.
Frequently asked questions
What makes an HSA triple tax advantaged?
A Health Savings Account is the only mainstream US account that is untaxed at all three stages. Contributions go in pre-tax (and skip 7.65% FICA too when made through payroll), the balance grows with no tax on interest, dividends, or capital gains, and withdrawals come out tax-free when spent on qualified medical expenses. A traditional 401(k) taxes you on the way out; a Roth taxes you on the way in; a taxable account taxes you in the middle. An HSA, used for medical costs, is never taxed — but you must be enrolled in a qualifying high-deductible health plan (HDHP) to contribute.
Should I fund an HSA or my 401(k) first?
A common ordering among planners: contribute to your 401(k) up to the full employer match first, because a match is an instant 50–100% return. Then max the HSA, since its triple tax treatment beats the 401(k)’s double treatment dollar for dollar — payroll HSA contributions even skip FICA, which 401(k) deferrals do not. Then return to the 401(k) or an IRA for the rest. The order shifts if your HSA has poor investment options or high fees, or if you cannot afford your deductible in cash. Your situation may differ; this is a framework, not advice.
What happens to my HSA at age 65?
At 65 the 20% penalty on non-qualified withdrawals disappears, and the HSA starts to behave like a traditional IRA with a bonus. Withdrawals for qualified medical expenses — including Medicare premiums, though not Medigap — stay completely tax-free. Withdrawals for anything else owe ordinary income tax but no penalty, exactly like a traditional 401(k) or IRA distribution. Before 65, non-qualified withdrawals are hit with income tax plus a 20% additional tax, so the account is genuinely locked to medical use until then unless you accept that cost.
Do HSA funds expire if I don’t spend them?
No. This is the key difference from a Flexible Spending Account (FSA), which is generally use-it-or-lose-it each plan year apart from small carryover allowances. HSA money is yours permanently: the balance rolls over every year, the account follows you when you change jobs or health plans, it can be invested in mutual funds or ETFs at most custodians, and it passes to a beneficiary at death (spouses inherit it as their own HSA). You can even stop being HDHP-eligible and keep spending the existing balance tax-free — you just cannot add new contributions.
Are HSAs tax-free in every state?
Not quite. HSAs are a federal creation, and two states do not follow the federal treatment: California and New Jersey tax HSA contributions as income at the state level and tax the interest, dividends, and capital gains earned inside the account each year. The federal benefits still apply in full, so an HSA usually remains worthwhile there, but the "combined marginal rate" you enter in this calculator should exclude your state rate if you live in one of those states, and record-keeping is heavier. A few states have also differed on small details historically, so check your state’s current rules.
Sources
- IRS Publication 969 — Health Savings Accounts and Other Tax-Favored Health Plans
- IRS Revenue Procedure 2025-19 — 2026 inflation-adjusted amounts for HSAs
The official figures this page quotes are drawn from the primary sources above — check them (or a qualified professional) before relying on a result.
Disclaimer: This calculator is foreducation and illustration only. It assumes a constant return, constant tax rates, and current federal HSA rules — HDHP eligibility requirements, contribution limits, state treatment (California and New Jersey tax HSAs), and the 20% penalty plus income tax on non-qualified withdrawals before age 65 all apply and can change. Nothing here is tax, investment, or health-insurance advice; consult IRS Publication 969 and a qualified professional for your situation.