Skip to main content

HSA Investment Calculator

Project HSA investment growth as a triple-tax-advantaged retirement vehicle. Enter values for instant results with step-by-step formulas.

Skip to calculator
Finance & Investing

HSA Investment Calculator

Project HSA investment growth as a triple-tax-advantaged retirement vehicle. Calculate tax savings, compare to taxable accounts, and plan your long-term HSA strategy.

Last updated: January 2026Reviewed by NovaCalculator Finance Editorial Team

Calculator

Adjust values & calculate
$5,000
$4,150
$500
$500
7%
24%
5%
25 years
Projected HSA Balance
$307,995
after 25 years of tax-free growth
Total Contributed
$121,250
Investment Growth
$186,745
Lifetime Tax Savings
$38,024
Annual Tax Benefit
$1,521
HSA vs Taxable Advantage
$121,840

Growth Milestones

Year 1
$9,791(saved: $1,521 tax)
Year 3
$20,401(saved: $4,563 tax)
Year 5
$32,549(saved: $7,605 tax)
Year 7
$46,457(saved: $10,647 tax)
Year 9
$62,381(saved: $13,689 tax)
Year 11
$80,611(saved: $16,731 tax)
Year 13
$101,484(saved: $19,773 tax)
Year 15
$125,381(saved: $22,815 tax)
Year 17
$152,740(saved: $25,857 tax)
Year 19
$184,064(saved: $28,899 tax)
Year 21
$219,927(saved: $31,940 tax)
Year 23
$260,986(saved: $34,982 tax)
Year 25
$307,995(saved: $38,024 tax)
Disclaimer: This calculator is for educational purposes only. HSA contribution limits, HDHP requirements, and tax laws change annually. Consult a financial advisor or tax professional for personalized guidance.
Your Result
HSA Balance: $307,995 | Tax Savings: $38,024 | HSA Advantage vs Taxable: $121,840
Share Your Result
Understand the Math

Formula

HSA FV = Balance x (1+r)^t + Annual Contribution x [(1+r)^t - 1] / r

Where FV is future value, Balance is current HSA balance, r is annual return rate, t is years of growth, and Annual Contribution is net yearly amount invested after medical spending. Tax savings are calculated separately using your combined marginal tax rate plus FICA rate.

Last reviewed: January 2026

Worked Examples

Example 1: Maximizing HSA as Retirement Vehicle

You contribute $4,150/year to your HSA with a $500 employer match. You invest everything at 7% return for 25 years. Tax rate is 29% combined. You spend $500/year on medical.
Solution:
Annual total contribution: $4,150 + $500 = $4,650 Net invested after medical: $4,650 - $500 = $4,150/year Annual tax savings: $4,150 x 29% + $4,150 x 7.65% = $1,203 + $317 = $1,520 HSA after 25 years at 7%: $5,000 starting + $4,150/yr invested FV = $5,000(1.07)^25 + $4,150 x [(1.07^25 - 1)/0.07] = $27,137 + $263,397 = $290,534 Total tax savings over 25 years: $1,520 x 25 = $38,008
Result: HSA Balance: $290,534 | Tax Savings: $38,008 | All medical withdrawals tax-free

Example 2: HSA vs Taxable Investment Account Comparison

Compare investing $4,150/year in an HSA vs a taxable brokerage account over 25 years at 7% return with a 29% combined tax rate.
Solution:
HSA: Full $4,150 invested pre-tax, grows tax-free FV = $4,150 x [(1.07^25 - 1)/0.07] = $263,397 Taxable account: After-tax contribution = $4,150 x (1 - 0.29) = $2,947 After-tax return = 7% x (1 - 0.145) = 5.985% FV = $2,947 x [(1.05985^25 - 1)/0.05985] = $166,489 HSA advantage: $263,397 - $166,489 = $96,908
Result: HSA: $263,397 | Taxable: $166,489 | HSA Advantage: $96,908 (58% more)
Expert Insights

Background & Theory

The HSA Investment Calculator applies the following established principles and formulas. Finance and investing rest on the foundational concept of the time value of money: a dollar received today is worth more than a dollar received in the future, because present funds can be deployed to earn a return. This principle underlies virtually every valuation technique in modern finance. The future value of a present sum P growing at rate r over n periods is expressed as FV = P(1 + r)^n, while the present value of a future cash flow FV is PV = FV / (1 + r)^n. Compound growth amplifies returns significantly over long horizons, a dynamic often described as the eighth wonder of the world. Net Present Value (NPV) extends these mechanics to evaluate investment projects by summing the present values of all expected cash flows minus the initial outlay: NPV = sum[CF_t / (1 + r)^t] - C_0. A positive NPV indicates the project creates value above the required return. The Internal Rate of Return (IRR) is the discount rate that sets NPV to zero, providing a single percentage benchmark for project comparison. The risk-return tradeoff is the central tension of investment theory. Higher expected returns generally require accepting greater uncertainty. Harry Markowitz formalized this in Modern Portfolio Theory by demonstrating that portfolio variance can be reduced through diversification when assets are imperfectly correlated. The efficient frontier represents the set of portfolios offering the maximum return for a given level of risk. The Capital Asset Pricing Model (CAPM) extends this by introducing the market portfolio as a reference, defining expected return as E(r) = r_f + beta * (E(r_m) - r_f), where beta measures an asset's sensitivity to systematic market risk. Asset classes โ€” equities, fixed income, real assets, and alternatives โ€” differ in their return profiles, liquidity, and correlations. Strategic asset allocation determines long-run target weights based on investor objectives and risk tolerance, while tactical allocation permits short-run deviations to exploit perceived mispricings. Discount rates used in valuation models must reflect the cost of capital appropriate to the risk of the cash flows being discounted, a point stressed in corporate finance texts from Brealey, Myers, and Allen through to Damodaran.

History

The history behind the HSA Investment Calculator traces back through the following developments. The formal practice of lending at interest dates to ancient Mesopotamia, where the Code of Hammurabi around 1750 BCE regulated interest rates on grain and silver loans. Banking as an institutional activity took root in medieval Italy, with merchant bankers in Florence and Venice financing trade across Europe through instruments such as bills of exchange. The Medici family operated one of the most sophisticated banking networks of the fifteenth century, pioneering double-entry bookkeeping and correspondent banking relationships. Organized equity markets emerged in the early seventeenth century. The Dutch East India Company (VOC), chartered in 1602, issued shares to the public and created the Amsterdam Stock Exchange โ€” widely regarded as the world's first formal stock exchange. The VOC allowed investors to buy and sell shares freely, establishing the template for the joint-stock company. The period also produced the Dutch tulip mania of 1636 to 1637, one of history's first recorded speculative bubbles, in which tulip bulb futures contracts reached extraordinary prices before collapsing. England's financial revolution followed in the late seventeenth century with the founding of the Bank of England in 1694 and the development of government bond markets. The South Sea Bubble of 1720 illustrated the dangers of speculative excess and contributed to early securities regulation. Throughout the eighteenth and nineteenth centuries, industrialization created enormous demand for capital, fueling the expansion of stock exchanges in London, Paris, New York, and beyond. The New York Stock Exchange, formalized in 1817, became the world's dominant equities market by the twentieth century. The Great Crash of 1929 and subsequent Great Depression prompted the US Securities Act of 1933 and Securities Exchange Act of 1934, establishing the SEC and mandatory disclosure requirements. Harry Markowitz published his landmark portfolio selection paper in 1952, launching quantitative finance. The CAPM emerged in the 1960s through work by Sharpe, Lintner, and Mossin. John Bogle launched the first retail index fund in 1976, democratizing diversified investing and challenging active management orthodoxy.

Share this calculator

Explore More

Frequently Asked Questions

An HSA provides three distinct tax benefits that no other account offers. First, contributions are tax-deductible, reducing your taxable income in the year you contribute. Second, investment growth within the HSA is completely tax-free, meaning dividends, interest, and capital gains accumulate without any tax drag. Third, withdrawals for qualified medical expenses are tax-free at any age. This triple tax advantage makes the HSA potentially more powerful than both traditional and Roth retirement accounts. When contributed through payroll deduction, HSA contributions also avoid FICA taxes of 7.65%, providing a fourth tax benefit that further enhances their value.
For 2024, the HSA contribution limit is $4,150 for individual coverage and $8,300 for family coverage. Those age 55 and older can make an additional catch-up contribution of $1,000. These limits include both employee and employer contributions combined. The limits are adjusted annually for inflation. You must be enrolled in a high-deductible health plan (HDHP) to be eligible to contribute. For 2024, an HDHP must have a minimum deductible of $1,600 for individual coverage or $3,200 for family coverage, with maximum out-of-pocket limits of $8,050 and $16,100 respectively.
If you can afford to pay current medical expenses out of pocket, investing your HSA for long-term growth is generally the optimal strategy. The tax-free growth potential over decades can be enormous. A common approach is to keep one to two years of expected medical expenses in cash within the HSA and invest the remainder in low-cost index funds. By paying medical expenses from your regular checking account and keeping receipts, you can let your HSA grow tax-free for decades and reimburse yourself in retirement. This strategy maximizes the compounding benefit of the triple tax advantage and can build a substantial tax-free medical fund.
Yes, the HSA functions exceptionally well as a retirement account. After age 65, you can withdraw HSA funds for any purpose, not just medical expenses. Non-medical withdrawals after 65 are taxed as ordinary income, similar to traditional IRA distributions, but without the 20% penalty that applies before age 65. For medical expenses, withdrawals remain tax-free at any age. Since healthcare is typically the largest expense in retirement, having a dedicated tax-free medical fund is invaluable. Many financial advisors recommend maximizing HSA contributions before contributing beyond the employer match in a 401k, due to the superior triple tax benefit.
The IRS defines qualified medical expenses broadly under Section 213(d). Common eligible expenses include doctor visits, hospital stays, prescription medications, dental work including cleanings and fillings, vision care including glasses and contacts, mental health services, chiropractic care, and medical equipment. Over-the-counter medications and menstrual products became eligible after 2020 tax law changes. Long-term care insurance premiums are also eligible up to certain age-based limits. Cosmetic procedures, general health items like gym memberships, and health insurance premiums are generally not eligible, with some exceptions like COBRA premiums and Medicare premiums after age 65.
The HSA is significantly more powerful than a Flexible Spending Account (FSA) in almost every way. While both offer tax-free contributions, the HSA has no use-it-or-lose-it provision, meaning funds roll over indefinitely from year to year. HSA balances can be invested in stocks, bonds, and mutual funds, whereas FSA funds typically cannot be invested. HSAs are portable and stay with you regardless of employment changes, while FSAs are tied to your employer. The HSA contribution limit is also higher than the FSA limit of $3,200. The only advantage of an FSA is that it does not require enrollment in a high-deductible health plan.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Finance Editorial Team โ€” Reviewed against CFPB, IRS, and Federal Reserve guidance. Last reviewed: January 2026. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

HSA FV = Balance x (1+r)^t + Annual Contribution x [(1+r)^t - 1] / r

Where FV is future value, Balance is current HSA balance, r is annual return rate, t is years of growth, and Annual Contribution is net yearly amount invested after medical spending. Tax savings are calculated separately using your combined marginal tax rate plus FICA rate.

Worked Examples

Example 1: Maximizing HSA as Retirement Vehicle

Problem: You contribute $4,150/year to your HSA with a $500 employer match. You invest everything at 7% return for 25 years. Tax rate is 29% combined. You spend $500/year on medical.

Solution: Annual total contribution: $4,150 + $500 = $4,650\nNet invested after medical: $4,650 - $500 = $4,150/year\nAnnual tax savings: $4,150 x 29% + $4,150 x 7.65% = $1,203 + $317 = $1,520\nHSA after 25 years at 7%: $5,000 starting + $4,150/yr invested\nFV = $5,000(1.07)^25 + $4,150 x [(1.07^25 - 1)/0.07] = $27,137 + $263,397 = $290,534\nTotal tax savings over 25 years: $1,520 x 25 = $38,008

Result: HSA Balance: $290,534 | Tax Savings: $38,008 | All medical withdrawals tax-free

Example 2: HSA vs Taxable Investment Account Comparison

Problem: Compare investing $4,150/year in an HSA vs a taxable brokerage account over 25 years at 7% return with a 29% combined tax rate.

Solution: HSA: Full $4,150 invested pre-tax, grows tax-free\nFV = $4,150 x [(1.07^25 - 1)/0.07] = $263,397\nTaxable account: After-tax contribution = $4,150 x (1 - 0.29) = $2,947\nAfter-tax return = 7% x (1 - 0.145) = 5.985%\nFV = $2,947 x [(1.05985^25 - 1)/0.05985] = $166,489\nHSA advantage: $263,397 - $166,489 = $96,908

Result: HSA: $263,397 | Taxable: $166,489 | HSA Advantage: $96,908 (58% more)

Frequently Asked Questions

What makes an HSA a triple-tax-advantaged account?

An HSA provides three distinct tax benefits that no other account offers. First, contributions are tax-deductible, reducing your taxable income in the year you contribute. Second, investment growth within the HSA is completely tax-free, meaning dividends, interest, and capital gains accumulate without any tax drag. Third, withdrawals for qualified medical expenses are tax-free at any age. This triple tax advantage makes the HSA potentially more powerful than both traditional and Roth retirement accounts. When contributed through payroll deduction, HSA contributions also avoid FICA taxes of 7.65%, providing a fourth tax benefit that further enhances their value.

What are the HSA contribution limits?

For 2024, the HSA contribution limit is $4,150 for individual coverage and $8,300 for family coverage. Those age 55 and older can make an additional catch-up contribution of $1,000. These limits include both employee and employer contributions combined. The limits are adjusted annually for inflation. You must be enrolled in a high-deductible health plan (HDHP) to be eligible to contribute. For 2024, an HDHP must have a minimum deductible of $1,600 for individual coverage or $3,200 for family coverage, with maximum out-of-pocket limits of $8,050 and $16,100 respectively.

Should I invest my HSA or keep it in cash?

If you can afford to pay current medical expenses out of pocket, investing your HSA for long-term growth is generally the optimal strategy. The tax-free growth potential over decades can be enormous. A common approach is to keep one to two years of expected medical expenses in cash within the HSA and invest the remainder in low-cost index funds. By paying medical expenses from your regular checking account and keeping receipts, you can let your HSA grow tax-free for decades and reimburse yourself in retirement. This strategy maximizes the compounding benefit of the triple tax advantage and can build a substantial tax-free medical fund.

Can I use my HSA as a retirement account?

Yes, the HSA functions exceptionally well as a retirement account. After age 65, you can withdraw HSA funds for any purpose, not just medical expenses. Non-medical withdrawals after 65 are taxed as ordinary income, similar to traditional IRA distributions, but without the 20% penalty that applies before age 65. For medical expenses, withdrawals remain tax-free at any age. Since healthcare is typically the largest expense in retirement, having a dedicated tax-free medical fund is invaluable. Many financial advisors recommend maximizing HSA contributions before contributing beyond the employer match in a 401k, due to the superior triple tax benefit.

What qualifies as an eligible medical expense for HSA withdrawals?

The IRS defines qualified medical expenses broadly under Section 213(d). Common eligible expenses include doctor visits, hospital stays, prescription medications, dental work including cleanings and fillings, vision care including glasses and contacts, mental health services, chiropractic care, and medical equipment. Over-the-counter medications and menstrual products became eligible after 2020 tax law changes. Long-term care insurance premiums are also eligible up to certain age-based limits. Cosmetic procedures, general health items like gym memberships, and health insurance premiums are generally not eligible, with some exceptions like COBRA premiums and Medicare premiums after age 65.

How does the HSA compare to a Flexible Spending Account?

The HSA is significantly more powerful than a Flexible Spending Account (FSA) in almost every way. While both offer tax-free contributions, the HSA has no use-it-or-lose-it provision, meaning funds roll over indefinitely from year to year. HSA balances can be invested in stocks, bonds, and mutual funds, whereas FSA funds typically cannot be invested. HSAs are portable and stay with you regardless of employment changes, while FSAs are tied to your employer. The HSA contribution limit is also higher than the FSA limit of $3,200. The only advantage of an FSA is that it does not require enrollment in a high-deductible health plan.

References

Reviewed by Sahil, Senior Finance & Tax Editor ยท Editorial policy