HSA Triple-Tax-Benefit Calculator

Quantify all three HSA tax benefits — upfront deduction, tax-free growth, and tax-free qualified withdrawals — versus a comparable taxable account.

Inputs

$

Your annual HSA contribution. 2025 statutory limits: $4,300 (self-only) / $8,550 (family), plus $1,000 catch-up if age 55+. Verify current limits at IRS.gov.

%

Your federal marginal income tax bracket. HSA contributions reduce taxable income dollar-for-dollar at this rate.

%

Expected average annual investment return inside the HSA once funds are invested beyond the cash minimum. Historical US stock market average is roughly 7–10% before inflation.

How many years you plan to let the HSA grow before drawing it down for qualified medical expenses.

$

Annual out-of-pocket medical costs you pay directly (not reimbursed). Used for context; the shoebox strategy lets you defer reimbursement indefinitely.

%

When HSA contributions are made via payroll deduction, they also avoid FICA taxes (Social Security 6.2% + Medicare 1.45% = 7.65% for most employees). Set to 0 if self-employed or contributing directly.

Results update as you type, and the address bar keeps your numbers so the link you share reopens this exact calculation.

Annual upfront tax savings

$1,266

Saves 31.65% of your contribution on day one.

Detailed results
HSA balance at horizonHSA balance after 20 years at 7% annual return.$163,982
Total tax advantage over horizonUpfront deduction savings over 20 years plus tax-free growth advantage.$85,314
Annual deduction + FICA savingsIncome tax + FICA savings on this year's contribution.$1,266

What this result means

Annual upfront tax savings: $1,266.

Contributing $4,000 to your HSA saves you $1,266 in taxes this year alone — that's a 31.6% instant return. After 20 years of tax-free growth at 7%, your HSA reaches $163,982. The total estimated tax advantage over your 20-year horizon is $85,314, compared to a taxable account subject to income tax on contributions and capital-gains drag on growth.

Year-by-year HSA vs. taxable account schedule

Annual snapshot of the HSA balance, comparable taxable account balance, and cumulative tax advantage at each year of the investment horizon.

Year-by-year HSA vs. taxable account schedule. 20 rows, first 12 shown.
YearHSA balanceTaxable account balanceCumulative tax advantage
1$4,000$3,040$2,226
2$8,280$6,242$4,570
3$12,860$9,614$7,044
4$17,760$13,165$9,659
5$23,003$16,906$12,427
6$28,613$20,845$15,364
7$34,616$24,994$18,484
8$41,039$29,364$21,804
9$47,912$33,966$25,340
10$55,266$38,813$29,113
11$63,134$43,918$33,143
12$71,554$49,294$37,452

How this is calculated

Benefit 1 — Upfront: savings = contribution × (marginal_rate + fica_rate) / 100

Benefit 2 — Tax-free growth:
  FV_HSA     = contribution × FV_annuity(r_gross, n)
  FV_taxable = contribution × (1 − t) × FV_annuity(r_gross × (1 − t), n)
  growth_advantage = FV_HSA − FV_taxable
  where FV_annuity(r, n) = ((1+r)^n − 1) / r

Benefit 3 — Withdrawal (simplified):
  withdrawal_saved = contribution × years × marginal_rate / 100

Total advantage = upfront_savings × years + growth_advantage

The three HSA tax advantages

A Health Savings Account is the only savings vehicle in the US tax code that offers a triple tax benefit: contributions are tax-deductible, growth is tax-free, and withdrawals for qualified medical expenses are tax-free. No other account — not a 401(k), not a Roth IRA — offers all three simultaneously.

Benefit 1: Upfront deduction (and FICA savings)

When you contribute to an HSA, those dollars are excluded from your taxable income. Unlike a traditional IRA, HSA contributions made via payroll deduction also escape FICA taxes (Social Security at 6.2% and Medicare at 1.45%), giving employed workers an additional 7.65% in savings on top of their income-tax bracket. A 24% federal taxpayer using payroll deduction effectively gets a 31.65% discount on their contribution from dollar one.

Benefit 2: Tax-free growth

Once your HSA balance exceeds your plan's investment threshold (typically $1,000–$2,500), most HSA custodians allow you to invest the excess in mutual funds or ETFs. Unlike a taxable brokerage account where dividends are taxed annually and capital gains are taxed upon sale, HSA investment gains accumulate completely free of federal tax. Over a 20-year horizon, the difference between compound growth at 7% versus after-tax growth at roughly 5.3% (for a 24% bracket holder) creates a significant gap — this calculator shows you exactly how large that gap is for your numbers.

Benefit 3: Tax-free qualified withdrawals

Withdrawals for qualified medical expenses — including premiums for long-term care insurance, Medicare premiums after 65, and thousands of IRS-approved out-of-pocket costs — are completely tax-free. In a taxable account, you would pay your marginal rate on the same money when you earned it, and then potentially capital-gains tax on accumulated growth. The HSA eliminates both.

High-Deductible Health Plan (HDHP) requirement

You can only contribute to an HSA if you are enrolled in a qualifying High-Deductible Health Plan. For 2025, the IRS defines an HDHP as a plan with a minimum deductible of $1,650 (self-only) or $3,300 (family) and maximum out-of-pocket limits. You cannot contribute during any month when you have other disqualifying coverage such as a spouse's low-deductible plan or Medicare.

Investing your HSA: the wealth-building strategy

Most HSA holders use their account as a pass-through for current medical expenses, missing its power as a long-term investment vehicle. The optimal strategy is to pay medical bills out of pocket while investing HSA contributions, letting the balance compound tax-free for decades. This requires carrying sufficient liquid savings to cover your deductible.

The shoebox strategy

IRS rules allow no time limit for HSA reimbursements — you can pay a medical expense today and reimburse yourself from the HSA years or even decades later, as long as you keep the receipt and the expense was incurred after your HSA was established. Many savvy savers collect receipts in a digital "shoebox," invest all HSA funds aggressively, and reimburse themselves with grown, tax-free dollars in retirement. This transforms years of small medical bills into a large, tax-free withdrawal.

Non-medical withdrawals after age 65

Before age 65, non-qualified HSA withdrawals trigger income tax plus a 20% penalty. After you turn 65, the penalty disappears and the account behaves like a traditional IRA for non-medical withdrawals — you owe only ordinary income tax. This makes a well-funded HSA a versatile retirement asset: it pays medical expenses tax-free and non-medical expenses at the same tax cost as a 401(k), while having provided decades of tax-free compounding.

Assumptions

  • Contributions are made at the end of each year (ordinary annuity) for the full investment horizon.
  • The HSA is invested immediately and earns the stated annual return with no cash drag.
  • The taxable account comparison uses after-tax contributions (marginal income tax applied at contribution) and after-tax growth (investment return reduced by marginal tax rate annually).
  • FICA savings apply only to payroll deductions; direct contributions to an HSA do not avoid FICA taxes.
  • State income taxes are not included; actual savings may be higher (most states) or different (CA, NJ).
  • Contribution limits per IRS statutory rules must be verified for the current tax year; this calculator does not enforce them.
  • The withdrawal tax-savings figure uses a simplified model assuming withdrawals proportional to contributions; actual savings depend on the growth component of each withdrawal.
  • No HSA withdrawals occur during the investment horizon — the balance compounds uninterrupted.
  • Inflation is not modeled; all figures are in nominal dollars.

Frequently asked questions

Can I contribute to an HSA and a Flexible Spending Account (FSA) at the same time?

Generally no — if you have a standard Health FSA, you cannot contribute to an HSA in the same year. The exception is a Limited-Purpose FSA restricted to dental and vision expenses, which is HSA-compatible. Some employers offer this combination specifically to let employees use both accounts.

What counts as a qualified medical expense for tax-free HSA withdrawal?

The IRS defines qualified medical expenses broadly in Publication 502. They include doctor visits, prescriptions, dental and vision care, mental health services, certain over-the-counter medications (since 2020), and long-term care insurance premiums up to age-based limits. After age 65, Medicare premiums are also qualified expenses. Cosmetic procedures and gym memberships generally do not qualify.

What happens to my HSA if I switch to a non-HDHP plan?

Your existing HSA balance is yours to keep and use indefinitely — the account does not disappear. You simply cannot make new contributions during any month you are not enrolled in a qualifying HDHP. You can still invest the existing balance, let it grow tax-free, and withdraw it tax-free for qualified medical expenses at any time in the future.

Does this calculator include state income tax savings?

No. Most states conform to federal law and allow the HSA deduction, which would increase the real-world advantage shown here. However, California and New Jersey do not recognize HSAs for state tax purposes, so residents of those states receive no state deduction and must pay state tax on HSA growth. Check your state's rules to adjust the total advantage accordingly.

How does the HSA compare to a Roth IRA for retirement savings?

An HSA used for qualified medical expenses is strictly superior to a Roth IRA: contributions are pre-tax (Roth uses after-tax dollars), growth is tax-free in both, and HSA qualified withdrawals are also tax-free. The constraint is that HSA funds work best when earmarked for healthcare costs, which tend to grow significantly in retirement. The optimal strategy for many savers is to max out the HSA first, then contribute to a Roth IRA, then a 401(k) — subject to your specific income, employer match, and expected medical needs.

Related calculators and guides