Finance calculators

HSA Calculator

Updated Nov 12, 2026 By Infinity Calculator Formulas Sources
Rate
Coverage & Eligibility
2026 IRS Max: $4,400 (Individual)
Adds $1,000 to maximum annual contribution limit.
$4,400
Base: $4,400 + Catch-up: $0
Contribution Details
Your current HSA account balance. $0 if new.
Balance must be $0 or greater
Your annual contribution (excluding employer).
Exceeds IRS maximum
Amount your employer contributes annually.
Combined contributions exceed IRS max
Out-of-pocket qualified medical expenses/year.
Must be $0 or greater
Growth & Tax Assumptions
Time horizon: 1 to 50 years.
Enter a value between 1 and 50
Average annual rate of return on investments.
Enter a value between 0% and 20%
Your federal marginal income tax bracket.
Enter a value between 0% and 50%
Your state income tax rate. Enter 0 if none.
Enter a value between 0% and 15%
Social Security + Medicare (typically 7.65%).
Enter a value between 0% and 15%
Payroll contributions avoid FICA. Direct contributions do not.
Increase contributions each year by this %.
Annual contribution increase can't be less than -100%.
Expected annual increase in medical costs.
Medical cost inflation can't be less than -100%.
Taxable Account Comparison
Part of the annual return, not added to it. The S&P Composite index's yield in June 2026 was 1.10%.
Enter a yield between 0% and 20%
Qualified dividends and long-term gains are taxed at 0%, 15% or 20%. Add your state's rate, and 3.8% if the net investment income tax applies: modified AGI over $200,000 single or head of household, $250,000 married filing jointly or qualifying surviving spouse, $125,000 married filing separately.
Enter a rate between 0% and 40%

Estimated Total Tax Savings Over 20 Years
$0
HSA's Triple Tax Advantage: Tax-Free In, Tax-Free Growth, Tax-Free Out
Tax-Free Contributions
$0
Income tax saved on contributions, plus FICA on employer and payroll contributions
Tax-Free Growth
$0
Dividend tax a taxable account pays each year, plus tax on its gains when sold
Tax-Free Withdrawals
$0
Gains tax a taxable account pays on shares sold for medical bills (included in growth)

HSA Projection Summary

Ending HSA Balance
$0
Total Contributions
$0
Total Employer Contributions
$0
Total Investment Growth
$0
Total Medical Withdrawals
$0
Net Deposits (After Withdrawals)
$0
Effective Annual Tax Savings
$0
Total Tax Savings
$0
HSA vs. Taxable Account Comparison
HSA (Triple Tax Advantage)
Ending Balance$0
Total Tax Savings$0
Effective Value$0
HSA Advantage
$0
Taxable Account (No Tax Benefits)
Balance Before Selling$0
Cost Basis$0
Capital Gains Tax$0
Taxes Paid$0
Effective Value$0
HSA Balance Growth Over Time
Annual Tax Savings Breakdown
Ending Balance Composition
Year-by-Year Breakdown
Year Employee Contrib. Employer Contrib. Medical Expense Investment Growth Tax Savings HSA Balance Taxable Balance

Introduction

A Health Savings Account (HSA) is a special account that lets you save money for medical costs while paying less in taxes. If you have a high-deductible health plan, an HSA is one of the best ways to grow your savings. The money you put in is tax-free, it grows tax-free, and you can take it out tax-free when you use it for health expenses.1 This HSA Calculator helps you see how much your account could grow over time. Just enter your yearly contributions, expected rate of return, and how long you plan to save. The calculator will show you your total savings, including tax benefits, so you can plan ahead and make smart choices with your money.

How to Use Our HSA Calculator

Enter your health savings account details below to see how much your HSA could grow over time, including tax savings and investment returns.

Annual Employee Contribution: Enter the amount you plan to put into your HSA yourself each year. Money your employer puts in goes in the Annual Employer Contribution box. Together, the two should not exceed the IRS contribution limit for your coverage type (individual or family).

Coverage Type: Select whether you have individual or family health insurance coverage. This determines your maximum yearly contribution limit.

Current HSA Balance: Enter the amount of money you already have saved in your HSA right now. If you are opening a new account, enter zero.

Expected Annual Return: Enter the percentage you expect your HSA investments to grow each year. From 1928 to 2025, the S&P 500 with dividends grew at a compound average of 10.02% a year, and 10-year US Treasury bonds at 4.53% a year.11 A mix of stocks and bonds falls between the two.

Federal Tax Rate: Enter your federal income tax bracket as a percentage. This is used to calculate how much you save in taxes by contributing to your HSA.

State Tax Rate: Enter your state income tax rate as a percentage. It is added to your federal rate for the tax you save on contributions. Enter zero if your state has no income tax, or if it taxes HSA contributions, as California and New Jersey do. California also taxes HSA earnings each year, so leave its rate out of the dividend and gains tax rate too.

Dividend Yield (%): Enter the yearly dividend yield of what you would hold in the taxable account. It is part of your annual return, not added to it. The default is the S&P Composite index's latest published yield in Robert Shiller's stock market data, its dividends over the past twelve months divided by its price.8 In June 2026 that was 1.10%.

Dividend & Gains Tax Rate: Enter your tax rate on qualified dividends and long-term capital gains, plus your state's rate. Qualified dividends are taxed at the lower capital gain rates.9 The taxable account pays this rate on its dividends each year, and on its growth above the cost basis when shares are sold, for a medical bill or at the end.7 Dividends that were already taxed count toward the cost basis, so they are not taxed twice. Add 3.8% if the net investment income tax applies to you: it applies when your modified adjusted gross income is over $200,000 if you are single or head of household, $250,000 if you are married filing jointly or a qualifying surviving spouse, or $125,000 if you are married filing separately.10

Number of Years: Enter how many years to project, from 1 to 50. A contribution is added in every year. You can't contribute once you are enrolled in Medicare, so a period that runs past that point counts contributions you won't be able to make. A longer time period means more growth from compound interest.

Est. Annual Medical Expenses: Enter the amount you expect to withdraw from your HSA each year to pay for qualified medical expenses. The amount grows each year by the Medical Cost Inflation rate. This reduces the balance that stays invested and grows over time.

What Is a Health Savings Account (HSA)?

A Health Savings Account, or HSA, is a special savings account that lets you set aside money before taxes to pay for qualified medical expenses. To contribute to one, you must be covered by a high-deductible health plan (HDHP).1 The money you put in, the growth it earns, and the money you take out for medical costs are all free from federal income tax.1 This is often called the "triple tax advantage," and it makes the HSA one of the most powerful savings tools available.

How the Triple Tax Advantage Works

The HSA gives you three separate tax benefits that work together to help your money grow faster:

  • Tax-free contributions: The money you put into your HSA is deducted from your income before taxes are calculated.1 Contributions made through an employer's Section 125 cafeteria (payroll) plan are also exempt from Social Security and Medicare taxes.2 So is money your employer puts in.2
  • Tax-free growth: Any interest, dividends, or investment gains your HSA earns are never taxed as long as the money stays in the account.1 In a regular brokerage account, you would owe tax on dividends each year.9 You would also owe tax on your gains when you sell.7
  • Tax-free withdrawals: When you take money out to pay for qualified medical expenses (things like doctor visits, prescriptions, dental work, and vision care), you pay zero tax on those withdrawals.1

HSA Contribution Limits for 2026 and 2025

The IRS sets a maximum amount you can contribute to your HSA each year. For 2026, the limits are:

  • Individual coverage: $4,400 per year.1
  • Family coverage: $8,750 per year.1
  • Catch-up contribution: If you are age 55 or older, you can add an extra $1,000 per year on top of the standard limit.1

For 2025, the limits were $4,300 for individual coverage and $8,550 for family coverage.1 These limits include both your own contributions and any money your employer puts in.1 So if your employer contributes $1,000 and you have individual coverage in 2026, you can only contribute up to $3,400 yourself.

HSA vs. a Regular Taxable Account

When you save money in a normal investment account, you deposit after-tax dollars, pay tax on dividends each year, and owe tax on your gains when you sell. With an HSA, you skip taxes at every step when used for medical expenses. Over 10, 20, or 30 years, this difference adds up to thousands of dollars in extra savings. The calculator above shows you exactly how much more your money can grow in an HSA compared to a taxable account with the same contributions and returns. In that account, your employer's contributions arrive as pay, after income tax and FICA. That account pays tax on its dividends each year at the dividend and gains tax rate you enter, and on its gains when shares are sold to pay medical bills or at the end of the period.

Why HSAs Are Great for Long-Term Savings

Many people use their HSA only for current medical bills, but the real power comes from investing your HSA for the long term. There is no rule that says you must spend your HSA money right away. The balance rolls over every year, and it never expires.1 If you can afford to pay small medical bills out of pocket now, you can let your HSA grow and use it later in retirement when medical costs are typically much higher. According to Fidelity's 2026 Retiree Health Care Cost Estimate, a 65-year-old individual may need $185,500 in after-tax savings to cover health care expenses in retirement, so a well-funded HSA is extremely valuable.3

The HSA works especially well alongside other tax-advantaged accounts. For example, you might maximize your 401k contributions for general retirement savings and your Roth IRA for tax-free retirement income, while using your HSA specifically to cover future healthcare costs. Together, these accounts create a powerful, diversified tax strategy.

After Age 65

Once you turn 65, your HSA becomes even more flexible. You can still withdraw money tax-free for qualified medical expenses, including Medicare premiums, but not premiums for a Medicare supplemental policy such as Medigap.1 If you withdraw money for non-medical purposes after age 65, you pay regular income tax on it but no penalty, much like a withdrawal from a traditional IRA.1 This makes the HSA a strong backup retirement account on top of its primary role as a medical savings tool. Once you enroll in Medicare, you can no longer contribute. Your contribution limit is zero starting with the first month you are enrolled.1

Key Rules to Remember

  • To contribute to an HSA, you must be covered by a high-deductible health plan, have no other health coverage except the kinds the IRS permits, not be enrolled in Medicare, and not be someone who can be claimed as a dependent on another person's tax return.1
  • If you withdraw money for non-medical expenses before age 65, you pay income tax plus a 20% penalty, unless you are disabled.1
  • Keep receipts for all medical expenses in case you need to prove your withdrawals were qualified.1
  • HSA funds belong to you, not your employer. If you change jobs, the money goes with you.1
  • Not every state follows the federal tax treatment. California allows no deduction for HSA contributions and taxes HSA earnings in the year they are earned.6 New Jersey also taxes HSA contributions.

Building an emergency fund alongside your HSA is also a smart strategy. It ensures you can cover unexpected non-medical expenses without dipping into your tax-advantaged health savings.


Formulas used

HSA Balance (Year-End)
B_t = \left(B_{t-1} + C_t^{\text{emp}} + C_t^{\text{er}}\right) \times (1 + r) - M_t
Contribution Tax Savings (Per Year)
S_t^{\text{contrib}} = C_t^{\text{emp}} \times \begin{cases} \tau_f + \tau_s + \tau_{\text{FICA}}, & \text{if payroll (Sec.\ 125)} \\ \tau_f + \tau_s, & \text{otherwise} \end{cases} + C_t^{\text{er}} \left(\tau_f + \tau_s + \tau_{\text{FICA}}\right)
Growth Tax Savings (Per Year)
S_t^{\text{growth}} = T_t' \, d \, \tau_g + X_t \, g_t \, \tau_g, \quad \text{plus } \max(0,\ T_N - \text{Basis}_N) \, \tau_g \text{ in year } N
Tax-Free Withdrawal Savings (Per Year)
S_t^{\text{withdraw}} = X_t \, g_t \, \tau_g, \quad X_t = \min\left(\frac{M_t}{1 - g_t \tau_g},\ T_t''\right), \quad g_t = \frac{\max(0,\ T_t'' - \text{Basis}_t'')}{T_t''}
Taxable Account Balance (Comparison)
T_t' = T_{t-1} + C_t^{\text{emp}}(1 - \tau_c) + C_t^{\text{er}}(1 - \tau_f - \tau_s - \tau_{\text{FICA}}), \quad T_t'' = T_t'(1 + r) - T_t' \, d \, \tau_g, \quad T_t = T_t'' - X_t, \quad \text{Basis}_t = \left(\text{Basis}_{t-1} + C_t^{\text{emp}}(1 - \tau_c) + C_t^{\text{er}}(1 - \tau_f - \tau_s - \tau_{\text{FICA}}) + T_t' \, d \, (1 - \tau_g)\right)\left(1 - \frac{X_t}{T_t''}\right)
HSA Advantage Over Taxable Account
\text{Advantage} = B_N - \left(T_N - \max(0,\ T_N - \text{Basis}_N) \, \tau_g\right)
Annual Contribution & Medical Escalation
C_t^{\text{emp}} = C_1^{\text{emp}} \times (1 + g_c)^{t-1}, \quad M_t = M_1 \times (1 + g_m)^{t-1}

Frequently asked questions

What should I enter for expected annual return?

This is the average yearly return you expect from your HSA investments. From 1928 to 2025, the S&P 500 with dividends grew at a compound average of 10.02% a year, and 10-year US Treasury bonds at 4.53% a year.11 A mix of stocks and bonds falls between the two. If you keep your HSA in cash, use the interest rate the account pays. The default is 6%.

What is the FICA tax rate and why does it matter?

FICA stands for Federal Insurance Contributions Act. It covers Social Security and Medicare taxes. For most workers, the employee share is 6.2% for Social Security plus 1.45% for Medicare.4 That adds up to 7.65%. When you contribute to an HSA through your employer's Section 125 cafeteria plan, that money is not subject to FICA taxes.2 Contributions you make on your own, outside such a plan, do not get this break.2

What if my state does not have income tax?

Enter 0% in the state tax rate field. The calculator will then use your federal rate, plus FICA where it applies, for the tax saved on contributions. Leave a state rate out of the dividend and gains tax rate too. States like Texas, Florida, and Nevada have no state income tax.5

What happens if my combined contributions exceed the IRS limit?

The calculator will show an error message if your employee and employer contributions together go over the IRS maximum. You need to lower one or both amounts before the calculator will run. In real life, excess contributions are generally subject to a 6% excise tax for each year they remain in the account.1


Sources

  1. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans. Internal Revenue Service. 2025. Accessed September 10, 2026.
  2. Publication 15 (2026), (Circular E), Employer's Tax Guide. Internal Revenue Service. 2026;Health savings accounts (HSAs) and medical savings accounts (MSAs). Accessed September 10, 2026.
  3. How to plan for rising health care costs. Fidelity Investments. 2026. Accessed September 10, 2026.
  4. Topic no. 751, Social Security and Medicare withholding rates. Internal Revenue Service. Accessed September 10, 2026.
  5. 2025 State Income Tax Rates and Brackets. Tax Foundation. 2025. Accessed September 10, 2026.
  6. 2025 Instructions for Schedule CA (540). California Franchise Tax Board. 2025;Line 2, Taxable Interest; Line 13, Health Savings Account Deduction. Accessed September 10, 2026.
  7. Topic no. 409, Capital gains and losses. Internal Revenue Service. Accessed September 11, 2026.
  8. Shiller RJ. US Stock Price, Earnings and Dividends as well as Interest Rates and Cyclically Adjusted Price Earnings Ratio (CAPE) since 1871. Robert J. Shiller. 2026;ie_data.xls, Data sheet. Accessed November 2, 2026.
  9. Topic no. 404, Dividends. Internal Revenue Service. Accessed November 2, 2026.
  10. Topic no. 559, Net investment income tax. Internal Revenue Service. Accessed November 7, 2026.
  11. Damodaran A. Historical Returns on Stocks, Bonds, Bills, Real Estate and Gold 1928-2025. NYU Stern School of Business. 2026;Geometric Average Historical Return, 1928-2025. Accessed November 12, 2026.