HSA vs Taxable Account Calculator
Example: Annual contribution: 4000 $ · Expected annual return: 7 % · Years invested: 20 · Your marginal tax rate: 24 % · Annual tax drag on the taxable account: 0.5 %
| HSA advantage | $45,953 |
| HSA ending value | $163,982 |
| Taxable account ending value | $118,029 |
Worked example
Put $4,000 a year into an HSA earning 7% for 20 years and it grows to about $163,982, because nothing is taxed along the way. Save the same $4,000 in a taxable brokerage account and two frictions eat into it: you fund it with after-tax dollars (so only about $3,040 of each $4,000 actually goes in at a 24% marginal rate) and a 0.5% annual tax drag on dividends and gains lowers the effective return to 6.5%. That taxable account ends at roughly $118,029. The HSA finishes about $45,953 ahead — the price of taxes on the exact same savings and the exact same market return.
Frequently asked questions
Why does the HSA end up so far ahead?
Three tax breaks compound at once. Your contribution is pre-tax, so more money starts working from day one; the growth is never taxed as it compounds; and qualified medical withdrawals are tax-free. A taxable account loses to income tax on the way in and a yearly drag on dividends and realized gains on the way through, and both frictions compound over decades.
What is the tax drag on the taxable account?
Even a buy-and-hold index investor pays tax each year on dividends and any realized capital gains, which quietly lowers the compounding rate. That annual leak is the tax drag — commonly a few tenths of a percent to over 1% depending on the fund and your bracket. The HSA has zero drag, which is why a small percentage difference turns into thousands of dollars over 20 years.
Do I have to spend HSA money on medical costs?
To keep withdrawals tax-free, yes — but the definition is broad, and the typical retiree faces large lifetime medical and long-term-care costs anyway. You can also pay out of pocket now, save the receipts, and reimburse yourself tax-free years later. After age 65 you can withdraw for any reason and simply pay ordinary income tax, which makes the HSA behave like a traditional IRA at worst.
Is an HSA better than a 401(k) or IRA?
For money you will spend on healthcare, the HSA is the most tax-efficient account there is because qualified medical withdrawals are tax-free, which no 401(k) or traditional IRA offers. A common priority is to capture any 401(k) employer match first, then max the HSA, then return to the 401(k) or IRA. This tool isolates the HSA-versus-taxable gap; the match changes the ranking against a 401(k).
What return should I enter?
Use a long-run expected return for how the money is actually invested. A diversified stock-heavy portfolio has historically returned roughly 7% after inflation, while cash sitting in the HSA's default sweep earns almost nothing. The advantage this tool shows only appears if you invest the HSA balance rather than leaving it uninvested.