HSA calculator
An HSA is the only account in the tax code that is never taxed going in, never taxed as it grows, and never taxed coming out for medical costs. This works out what that's worth — and where it sits against your 401(k).
Projected HSA balance
—
Enter your numbers above.
How the math works
There are two calculations here, one for each half of what an HSA does for you.
The first is the tax a contribution saves in the year you make it. A dollar into an HSA skips federal income tax at your marginal rate. If it goes in through payroll, it also skips the 7.65% employee FICA — 6.2% Social Security plus 1.45% Medicare — which a 401(k) or IRA contribution never avoids.
The second is what the balance grows to if you invest it and leave it alone. Your current balance compounds, and each year's contribution joins as an ordinary annuity. Growth inside the account is never taxed.
Where PV is your current balance, C is the annual contribution, r is the expected annual return, and n is the number of years. The calculator checks your contribution against the 2026 limit — $4,400 for self-only coverage, $8,750 for a family — and adds the $1,000 catch-up if you're 55 or older.
Worked example
Take a 40-year-old with family high-deductible coverage who maxes the 2026 family limit of $8,750 through payroll, in the 22% marginal bracket.
The tax saved in year one: $8,750 × 22% is $1,925 of income tax, plus $8,750 × 7.65%, or about $669 of FICA. Call it $2,594 back. The real cost of that $8,750 contribution is closer to $6,156.
Now invest it. At the S&P 500's long-run real return of 7.0%, $8,750 a year for the 25 years to age 65 grows to roughly $553,000. About $335,000 of that is growth — and if it goes to medical costs, none of it is ever taxed. A traditional 401(k) would tax every dollar of that withdrawal as income.
The catch is in the phrase "invest it and leave it alone." That number only appears if the balance is actually invested and the current medical bills get paid some other way. Spend the HSA each year and you keep the deduction but lose the $335,000.
When this calculator is wrong
The projection assumes the money is invested at 7.0%. Most HSA balances aren't. They sit in the cash sweep paying close to the FDIC national average of 0.41% APY, often because the provider requires a minimum cash balance before it will let you invest, and the holder never flips the switch. Run the calculator at 0.41% and the "stealth retirement account" is just a checking account with a tax form.
Three more ways the number above misleads:
- It shows the HSA in isolation, but it isn't your first dollar. If your employer matches 401(k) contributions, that match is an instant return the HSA can't beat. The order that holds up under the math is: capture the full employer match first, then max the HSA, then come back and fill the rest of the 401(k) up to the $24,500 2026 limit. The calculator can't see your match, so it can't tell you it's modeling the second call on your money, not the first.
- It assumes the FICA break is the full 7.65%. Above the Social Security wage base, only the 1.45% Medicare portion is left to save — the 6.2% Social Security piece stops at the cap. High earners get a smaller payroll break than the headline suggests.
- It assumes your state plays along. The federal triple advantage is universal, but California and New Jersey tax HSA contributions and earnings at the state level. If you're in either, shave the state leg off the tax saved.
What to do with the result
If the projected balance looks large, the move that makes it real is the one the growth projectors never mention: pay your current medical bills out of pocket, keep every receipt, and let the HSA stay invested. There's no deadline to reimburse yourself. A qualified expense from this year can be paid back from the account tax-free in 20 years, after the balance behind it has compounded the whole time. The receipt is the claim ticket.
If the projected balance looks small, check two things before writing the HSA off. First, whether the balance is invested at all or sitting in cash at 0.41%. Second, whether you've taken the 401(k) match — because if you haven't, that's the dollar to move first, and the HSA is the next one, ahead of the rest of the 401(k).
Common questions
- Can I open an HSA without a high-deductible health plan?
- No. HSA eligibility requires HDHP coverage. For 2026 the plan needs a deductible of at least $1,700 (self-only) or $3,400 (family), with out-of-pocket maximums no higher than $8,500 and $17,000. No qualifying plan, no HSA.
- What happens to HSA money I don't spend?
- It rolls over indefinitely. There's no use-it-or-lose-it rule — that's the FSA, a different account people often confuse it with. Unspent HSA money stays yours and stays invested.
- Is an HSA better than a 401(k)?
- For the employer match, no — the match is free money, so take it first. After the match, the HSA's triple advantage beats the 401(k) for money you'll eventually spend on healthcare, because the 401(k) taxes withdrawals and the HSA doesn't. Then go back to the 401(k) for the rest.
- What's the penalty for using HSA money on non-medical expenses?
- Before age 65, a 20% penalty plus ordinary income tax on the amount. At 65 the penalty disappears and non-medical withdrawals are taxed as ordinary income only — the same treatment as a traditional IRA. Medical withdrawals stay tax-free at any age.
- Can I invest my HSA like a brokerage account?
- Most providers let you invest the balance above a cash threshold, often in index funds. Whether you should depends on whether you can cover current medical costs from elsewhere. If every dollar is needed for this year's bills, the money belongs in cash and the growth projection doesn't apply to you.