HSA Investment Calculator
Project HSA investment growth as a triple-tax-advantaged retirement vehicle. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Sahil, Senior Finance & Tax Editor
HSA Investment Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: HSA FV = Balance x (1+r)^t + Annual Contribution x [(1+r)^t - 1] / r
Worked example โ HSA Balance: $290,534 | Tax Savings: $38,008 | All medical withdrawals tax-free
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 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
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 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)
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.
What is the HSA receipt shoebox strategy?
The shoebox strategy involves paying current medical expenses out of pocket while saving receipts, then letting your HSA investments grow tax-free for years or decades. There is no time limit on when you can reimburse yourself for qualified medical expenses, as long as the expense occurred after the HSA was established. For example, you could pay a $2,000 dental bill today from your checking account, save the receipt, and reimburse yourself from the HSA twenty years later after the money has grown significantly. This strategy works because you can let your HSA investments compound tax-free while still maintaining the right to withdraw those funds tax-free in the future.
How does an employer HSA contribution work?
Many employers contribute to employee HSAs as a benefit, similar to a 401k match. Employer contributions reduce your available individual contribution limit since the total combined limit applies. For example, if your employer contributes $1,000 toward your individual HSA, you can contribute up to $3,150 of the $4,150 limit. Employer contributions are not subject to income tax, Social Security tax, or Medicare tax, making them extremely valuable. Some employers front-load the entire annual contribution in January, while others distribute it across pay periods. Employer contributions are immediately vested in most cases, meaning the money is yours even if you leave the company.
What happens to my HSA when I turn 65?
At age 65, your HSA becomes even more flexible. You can continue to use funds tax-free for qualified medical expenses including Medicare premiums, prescription drug plans, and long-term care expenses. For non-medical withdrawals, the 20% penalty is eliminated, and distributions are taxed as ordinary income similar to a traditional IRA. You can no longer contribute to your HSA once enrolled in Medicare, but your existing balance continues to grow tax-free. Many people accumulate significant HSA balances by retirement age specifically because healthcare costs tend to increase dramatically. Fidelity estimates the average 65-year-old couple will need approximately $315,000 for healthcare in retirement.
Can I transfer or roll over funds into my HSA?
Yes, there are several ways to move money into an HSA. You can do a trustee-to-trustee transfer from one HSA to another with no limits on frequency or amount, and these transfers are not reported as distributions. You can also do a rollover by withdrawing from one HSA and depositing into another within 60 days, but this is limited to once per 12-month period. Additionally, you can do a one-time qualified HSA funding distribution from a traditional IRA to your HSA, which counts toward your annual contribution limit. This IRA-to-HSA transfer converts pre-tax IRA money into triple-tax-advantaged HSA money, which can be beneficial for those with large traditional IRA balances.
References
Background & Theory
History
Reviewed for accuracy by Sahil, Senior Finance & Tax Editor ยท Editorial policy
Related Calculators
๐งฎBond Yield to Maturity Calculator
Calculate bond yield to maturity with inputs, formulas, and instant results.
๐งฎInvestment Return Calculator
Calculate investment return with inputs, formulas, and instant results.
๐งฎBond Yield Calculator
Calculate current yield, yield to maturity, and yield to call for fixed income investments.
๐งฎBond Duration Convexity Calculator
Calculate bond duration convexity with inputs, formulas, and instant results.
๐งฎBond Price Calculator
Calculate bond price with inputs, formulas, and instant results.
๐งฎPortfolio Rebalance Calculator (3-Asset)
Enter current and target allocations for stocks, bonds, and cash to see exact buy/sell amounts, drift, and turnover.
๐งฎInflation Adjusted Return Calculator
Calculate inflation adjusted return with inputs, formulas, and instant results.
๐งฎCash on Cash Return Calculator
Calculate cash on cash return with inputs, formulas, and instant results.