HSA Calculator

Model long-term compounding and triple-tax advantages of Health Savings Accounts through retirement.

Calculate the unmatched wealth-building power of the Health Savings Account (HSA). Model pre-tax paycheck contributions, 100% tax-free investment compounding, and tax-free qualified medical distributions under updated statutory IRS contribution thresholds.

How this calculator works

Ending HSA Balance = P0 * (1 + r)^n + Annual Contribution * [((1 + r)^n - 1) / r]. Triple-Tax Savings = Annual Contribution * (Federal Income Tax Rate + State Tax Rate + 7.65% FICA Payroll Tax).

Key benefits

Assumptions & exclusions

Frequently asked questions

What makes the HSA the only triple-tax-advantaged account?

1) Contributions are tax-deductible or pre-tax via payroll, 2) Investment growth and dividends compound completely tax-free, and 3) Withdrawals for qualified healthcare expenses are 100% tax-free at any age.

What happens to HSA funds after age 65?

After age 65, you can withdraw HSA funds for ANY non-medical purpose without penalty, taxed simply as ordinary income (identical to a Traditional 401(k) or IRA), while medical withdrawals remain completely tax-free.

Who is eligible to contribute to an HSA?

In general, you must be enrolled in an HSA-qualified high-deductible health plan, have no other disqualifying health coverage, not be enrolled in Medicare, and not be claimed as someone else's dependent. Eligibility is determined month by month, and partial-year eligibility prorates the annual limit. IRS Publication 969 sets out the full conditions, which are worth reading before your first contribution rather than after.

What happens if I contribute more than the annual HSA limit?

The excess does not get the account's tax advantages: it is included in income and, if it is not withdrawn by the tax filing deadline along with any earnings it produced, it is subject to an additional tax that repeats each year it remains in the account. This calculator trims contributions to the limit for the selected year before projecting, but your payroll and personal contributions combined are what the real limit applies to.

Can I invest the money in my HSA, or does it have to sit in cash?

Most HSA providers allow investing once your balance passes a threshold they set, though the cash portion typically earns only modest interest. Investing is what makes long projections like this calculator's possible — money left entirely in the cash option will grow far more slowly than the assumed return you enter. Check your own provider's threshold and fund menu before relying on an investment-based projection.

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

Generally, medical care for you, your spouse, and your tax dependents as defined in the tax code — doctor and dentist visits, prescriptions, vision care, and many other services — provided the expense was incurred after the HSA was established. Premiums are usually not qualified, with specific exceptions. IRS Publication 969 and Publication 502 list what qualifies; when an expense is borderline, those publications are the reference to trust.

Formula-Based Calculator · By QalcTools Editorial Team. Formulas tested against independent reference values · Content reviewed November 2026 by the QalcTools Editorial Team.

Methodology note: IRS Revenue Procedure 2024-40 (2025 limits) and Revenue Procedure 2025-19 (2026 limits); Internal Revenue Code Section 223.

Related calculators

About this calculator

A health savings account is the only account in the US tax code that can offer a deduction going in, tax-free growth while invested, and tax-free withdrawals for qualified medical expenses — provided you are eligible to contribute, which generally means being enrolled in an HSA-qualified high-deductible health plan. This calculator projects what disciplined HSA saving can become: it applies the contribution limit for the tax year and coverage type you select, grows your balance year by year net of the medical withdrawals you plan to make, and totals the annual tax savings from contributing. It is built for savers deciding how much to route through payroll, and for anyone weighing an HSA as a long-term savings vehicle alongside its healthcare role.

How it works

You choose a tax year and coverage type, and the calculator loads the corresponding IRS contribution limit, adding the extra catch-up allowance if you are 55 or older; a contribution above the limit is trimmed to the limit before anything else is computed. Each year of the projection, the balance is grown by your assumed return, your (possibly capped) contribution is added, and your planned annual medical withdrawals are subtracted, with the balance never allowed below zero. Alongside the balance path, the calculator prices the tax benefit: your contribution multiplied by your marginal income tax rate plus the payroll tax rate, which defaults to 7.65% because payroll-deducted HSA contributions typically escape that tax too. Finally, it shows the larger balance a taxable account would need to match your HSA after an assumed tax on its gains.

The formula, explained

Contribution used = min(your contribution, IRS limit for the selected year and coverage type, plus catch-up at age 55+); Annual tax savings = contribution used × (income tax rate + payroll tax rate); Each year: balance = balance × (1 + r) + contribution − medical withdrawals, floored at $0; Equivalent taxable balance = ending balance ÷ (1 − 0.15)

The engine caps the contribution first, so entering an amount above your limit changes nothing — the tax savings and projection are computed on the capped figure. Tax savings are a single-year snapshot: capped contribution times the combined income and payroll tax rates. The projection is a year-by-year loop rather than a closed-form formula, applying growth, then the contribution, then withdrawals, twenty or however many years you set, with the balance floored at zero in any year withdrawals would exceed it. Reported investment growth is a residual — ending balance plus total withdrawals, minus your starting balance and total contributions — and the equivalent taxable balance divides the ending balance by 0.85 under the engine's fixed 15% gains assumption.

Inputs and variables

VariableMeaningExample
Tax YearSelects which year's IRS contribution limit table the calculator applies, since limits are set annually. The site's figures are labelled by year for this reason — use the year you are planning for.2026
Coverage TypeWhether your qualifying health coverage is self-only or family. Family coverage carries a substantially higher contribution limit, and the type must match the plan you are actually enrolled in.Family
Annual ContributionWhat you plan to contribute per year. If it exceeds the limit for your year, coverage type, and age, the calculator uses the limit instead — watch for that if the results look lower than expected.$8,000 per year
Your AgeAge matters because savers aged 55 and over may contribute an additional catch-up amount on top of the standard limit. The calculator adds it automatically when your age qualifies.42
Current HSA BalanceWhat is already in the account. Existing balances compound for the full projection, so a head start is worth more than the same dollars contributed later.$15,000
Expected Annual ReturnThe assumed growth rate on invested HSA funds. Money kept in the account's cash option typically earns far less than invested balances — match this input to how you actually hold the money.6.5% per year
Years to GrowThe length of the projection. HSAs have no required distributions and no deadline to spend, which is what makes long horizons realistic for this account type.20 years
Marginal Income Tax RateYour marginal federal rate, used to value the deduction or pre-tax treatment of contributions, together with the payroll tax saving on contributions made through an employer plan.22%
Annual Medical WithdrawalsWhat you expect to take out each year for qualified medical expenses. Withdrawals for qualified expenses are tax-free; this input mainly shows how spending from the account slows its growth.$1,200 per year

Worked example

A 42-year-old with family coverage contributes $8,000 a year for 20 years — within the limit the calculator applies for the selected year and coverage type, so the full amount is used. The account already holds $15,000, investments are assumed to return 6.5% a year, the marginal income tax rate is 22%, and the family withdraws $1,200 a year for qualified medical expenses.

  1. Annual tax savings: $8,000 × (22% income tax + 7.65% payroll tax) = $8,000 × 29.65% = $2,372 per year.
  2. Each projected year applies balance × 1.065 + $8,000 − $1,200. Total contributions over 20 years: $8,000 × 20 = $160,000.
  3. Total tax-free medical withdrawals over the period: $1,200 × 20 = $24,000.
  4. After 20 years the projected balance is $316,867.
  5. Investment growth is the residual: $316,867 + $24,000 withdrawn − $15,000 starting balance − $160,000 contributed = $165,867.
  6. Taxable-account equivalent at the engine's 15% gains assumption: $316,867 ÷ 0.85 ≈ $372,784.

The HSA reaches a projected $316,867 after 20 years — $160,000 contributed, $165,867 of investment growth, $24,000 withdrawn tax-free for medical costs along the way, and $2,372 saved in tax each year.

The striking figure is that growth exceeds total contributions: given two decades, compounding does more work than the deposits. The annual tax saving is easy to overlook because it arrives quietly through payroll, but at this contribution level it returns over $2,300 a year. The taxable-equivalent line frames the account's edge — a regular brokerage account would need roughly $372,784 to leave the same after-tax amount under the model's assumptions.

Understanding your results

Three outputs work together. The projected balance is the goal-line number, but the growth line explains how you got there — and it is the part most sensitive to your return assumption and to leaving the money invested rather than in the account's low-yield cash option. The annual tax savings figure is a per-year snapshot at today's contribution and rates; over a career it recurs annually, which is why funding the HSA through payroll, where the payroll-tax saving applies, beats contributing the same amount from a bank account and deducting it later in most cases the model can represent.

The equivalent taxable balance is a translation device, not a separate projection: it answers how large a taxable account would need to be to match your HSA after the engine's assumed 15% tax on gains. The gap between the two balances is the modeled value of the HSA's tax treatment, and it widens with time and returns. Keep the medical-withdrawal input honest when you experiment — draining the account for current expenses is a legitimate use of an HSA, but every withdrawal removes money that would otherwise compound tax-free, and the projection makes that trade explicit year by year.

Assumptions and limitations

Eligibility is the first limit: HSA contributions require an HSA-qualified high-deductible health plan and no other disqualifying coverage, and the rules — including prorated limits for partial-year eligibility — live in IRS Publication 969, not in this model. The calculator applies the contribution limit for the year you select, but limits change over time, so confirm figures before acting. The projection assumes a constant return, uninterrupted contributions, and withdrawals for qualified expenses; it does not model state tax treatment or investment fees, or taxes and penalties on non-qualified withdrawals. Rules change after age 65 in ways the projection does not value. This is educational modeling of a US tax-advantaged account, not tax or benefits advice.

Common mistakes to avoid

Sources