A health savings account (HSA) is the only account with three tax benefits: contributions are tax-deductible, the money grows tax-free, and withdrawals for qualified medical costs are tax-free. This calculator shows the tax you save each year, what the account grows to over time, and how much better it does than putting the same money into a taxable account.
How the calculation works
- Tax saved each year = contribution × (federal rate + state rate + 7.65 % if through payroll)
- HSA balance = contribution × ((1 + return)^years − 1) ÷ return
- Taxable account: the after-tax contribution is invested at the same return, and the gains are taxed at the capital gains rate
- Advantage = HSA balance − the taxable account’s after-tax balance
The HSA balance is assumed to be spent on medical costs, so withdrawals are tax-free.
Example
You contribute $4,400 a year through payroll, at a 22 % federal rate, 5 % state rate and 7.65 % payroll tax, which saves $1,525 a year in tax. After 20 years at 6 %, the account holds $161,857. Putting the same take-home cost into a taxable account, after tax on the gains, gives $98,534. The HSA comes out $63,323 ahead.
Why it matters
An HSA is valuable beyond paying this year’s bills. Medical costs in retirement are large, and HSA money is usable tax-free for them. Some people treat the account as an extra retirement account: they pay today’s costs from cash, invest the HSA and keep the receipts, which can be reimbursed at any later date.
Good to know
You can only contribute with a qualifying high-deductible health plan, and not when you are enrolled in Medicare. The limits shown are for 2026 and change yearly. Employer contributions count toward the limit. Some states, such as California and New Jersey, do not give the state tax break. Keep receipts for qualified expenses. This tool is for education and is not tax advice.
Related tools
The retirement savings calculator projects a nest egg, the insurance deductible calculator compares plans, and the Roth versus traditional calculator compares tax treatments.