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.

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