HSA Triple Tax Advantage Calculator
The HSA is the most tax-advantaged account in America. Stop using it as a spending account and see what happens when you invest it instead.
Your HSA Inputs
HSA Invested (Pay Medical Out-of-Pocket)
$327,661
$103,750 contributed + $223,911 growth
HSA Spent on Medical Each Year
$169,752
$53,750 net contributed + $116,002 growth
Investing instead of spending costs you $50,000 out-of-pocket over 25 years but your HSA grows $157,909 more by keeping every dollar invested and compounding tax-free.
Growth Over Time
Triple Tax Advantage Breakdown
$41,137
Income tax + FICA saved
$33,587
Capital gains tax avoided
$16,000
On medical reimbursements
HSA vs. Taxable Brokerage
HSA (Invested, Tax-Free)
Pre-tax contribution, tax-free growth & withdrawal
$327,661
Taxable Brokerage
After-tax contribution, taxed annually on gains
$185,240
HSA Advantage
+$142,420
Taxable brokerage assumes after-tax contributions (32.0% marginal rate) and 15% tax on annual gains.
Total Contributed
$103,750
Investment Growth
$223,911
Effective Value
$327,661
100% after-tax
Tax Savings
$90,723
$327,661 growing tax-free — make sure you're picking the right stocks with a real DCF model.
Build a professional DCF model with working Excel formulas in under 2 minutes.
The HSA Stealth Wealth Strategy
1. Max Your HSA Contributions
Contribute the annual maximum every year. The money goes in pre-tax (or tax-deductible), reducing your taxable income immediately.
2. Invest, Don't Spend
Move HSA funds out of the default cash position and into low-cost index funds. Pay medical bills out-of-pocket instead of from the HSA.
3. Save Every Receipt
Keep documentation of every medical expense you pay out-of-pocket. There is no time limit on reimbursement from your HSA.
4. Reimburse Yourself Later
Years (or decades) later, withdraw from the HSA to reimburse yourself for those old medical expenses. The withdrawal is completely tax-free.
HSA Triple Tax Advantage: The Complete Guide
Everything you need to know about using your Health Savings Account as a wealth-building tool, not just a medical spending account.
The HSA triple tax advantage refers to the three distinct tax benefits that make the Health Savings Account the most tax-advantaged account available to Americans. No other account (not a 401(k), not a Roth IRA, not a traditional IRA) offers all three tax breaks simultaneously.
The three tax benefits are:
- Tax-deductible contributions — Money goes in pre-tax (via payroll deduction) or is tax-deductible (if contributed directly). This reduces your federal income tax, state income tax (in most states), and FICA taxes (Social Security + Medicare) when contributed through payroll. A $4,150 contribution at a 32% marginal rate saves you roughly $1,328 in income taxes alone, plus an additional $317 in FICA taxes.
- Tax-free growth — All investment gains inside the HSA (dividends, interest, and capital gains) grow completely tax-free. Unlike a taxable brokerage account, you never pay annual capital gains taxes or taxes on dividends. Over 20-30 years of compounding, this tax-free growth can add tens of thousands of dollars compared to a taxable account.
- Tax-free withdrawals — When you withdraw money for qualified medical expenses, the withdrawal is 100% tax-free. This is unlike a traditional 401(k) or IRA, where withdrawals are taxed as ordinary income. Critically, there is no time limit on reimbursing yourself for past medical expenses, so you can let the money compound for decades and withdraw tax-free later.
Comparison to other accounts: A traditional 401(k) gives you tax benefits 1 and 2, but not 3 (withdrawals are taxed). A Roth IRA gives you benefits 2 and 3, but not 1 (contributions are after-tax). Only the HSA gives you all three, making it the single most powerful tax-advantaged account in the U.S. tax code.
The invest and reimburse later strategy is how savvy savers turn their HSA into a stealth retirement account. Most people use their HSA like a medical debit card, spending from it whenever they have a doctor visit. That approach leaves enormous money on the table.
Here is how the strategy works step by step:
- Step 1: Contribute the maximum — For 2025, the limits are $4,300 for self-only coverage and $8,550 for family coverage. If you are 55 or older, add a $1,000 catch-up contribution.
- Step 2: Invest the funds — Move your HSA balance out of the default cash or money market position and into low-cost index funds (like a total stock market fund). Many HSA providers require a minimum cash balance (often $1,000-$2,000) before allowing investing.
- Step 3: Pay medical expenses out-of-pocket — When you have a medical bill, pay it with your regular checking account or credit card instead of your HSA. This keeps your HSA balance fully invested and growing.
- Step 4: Save every receipt — Document every qualified medical expense you pay out-of-pocket. Store receipts digitally in a folder. The IRS requires you to keep records, but there is no time limit on when you can reimburse yourself.
- Step 5: Reimburse yourself years later — After your HSA has grown for 5, 10, 20+ years, you can withdraw money and reimburse yourself for those old medical expenses. The entire withdrawal is tax-free because it matches documented qualified medical expenses.
Why this is so powerful: By paying $2,000/year in medical expenses out-of-pocket instead of from the HSA, and investing that $2,000 at an 8% return, after 25 years that money alone grows to over $146,000. If you withdrew that from a taxable account, you would owe capital gains taxes. From your HSA, it is completely tax-free.
Important caveats: You must be enrolled in a high-deductible health plan (HDHP) to contribute to an HSA. You also need enough cash flow to cover medical bills out-of-pocket. If you cannot comfortably pay a medical bill without HSA funds, it is perfectly fine to use the HSA for that expense.
HSA contribution limits are set annually by the IRS and adjusted for inflation. To be eligible to contribute, you must be enrolled in a qualifying high-deductible health plan (HDHP) and cannot be enrolled in Medicare or claimed as a dependent on someone else's tax return.
2025 HSA contribution limits:
- Self-only coverage: $4,300 per year
- Family coverage: $8,550 per year
- Catch-up contribution (age 55+): Additional $1,000 per year
HDHP requirements for 2025:
- Minimum deductible: $1,650 (self-only) or $3,300 (family)
- Maximum out-of-pocket: $8,300 (self-only) or $16,600 (family)
Key eligibility rules:
- Must have an HDHP — You cannot have any other non-HDHP health coverage (with some exceptions for dental, vision, and specific-disease insurance).
- Cannot be on Medicare — Once you enroll in Medicare (typically at age 65), you can no longer contribute to an HSA. However, you can still use existing HSA funds tax-free for medical expenses.
- Employer + personal contributions combined — The limits above include both your contributions and any employer contributions. If your employer contributes $500, you can only contribute up to $3,800 for self-only coverage.
- Pro-rata if mid-year eligible — If you become eligible mid-year, your contribution limit is prorated by month. However, there is a "last month rule" that can let you contribute the full annual amount if you are eligible on December 1st (you must remain eligible for the following 12 months).
Each tax-advantaged account has strengths, but the HSA is uniquely powerful because it is the only account that combines pre-tax contributions, tax-free growth, and tax-free withdrawals. Here is how they stack up side by side.
Tax treatment comparison:
- Traditional 401(k)/IRA — Contributions are pre-tax (reduces taxable income), growth is tax-deferred, but withdrawals are taxed as ordinary income. You pay taxes eventually, just later. Required minimum distributions (RMDs) force withdrawals starting at age 73.
- Roth IRA/401(k) — Contributions are after-tax (no immediate deduction), growth is tax-free, and qualified withdrawals are tax-free. You pay taxes now but never again. No RMDs for Roth IRAs (Roth 401(k) RMDs eliminated starting 2024).
- HSA — Contributions are pre-tax (like a traditional 401(k)), growth is tax-free (like a Roth), and withdrawals for medical expenses are tax-free (like a Roth). No RMDs. After age 65, non-medical withdrawals are taxed as ordinary income (effectively becoming a traditional IRA at that point), so there is no penalty for non-medical use in retirement.
Optimal contribution order for most people:
- 1. 401(k) up to employer match — Free money. Always capture the full match first.
- 2. Max out HSA — The triple tax advantage makes this the next highest priority for anyone eligible.
- 3. Max out Roth IRA — Tax-free growth and withdrawals with more flexibility than a 401(k).
- 4. Max out remaining 401(k) — Fill up the rest of your 401(k) space.
- 5. Taxable brokerage — After all tax-advantaged space is used.
The HSA "secret weapon" in retirement: Even if you never have enough medical expenses to empty your HSA, after age 65 you can withdraw for any purpose and pay ordinary income tax (no penalty). This makes the HSA functionally identical to a traditional IRA as a fallback, but with the upside of tax-free withdrawals if used for medical costs. Given that the average couple retiring at 65 spends roughly $315,000 on healthcare in retirement (according to Fidelity estimates), there is a good chance you will use every dollar for qualified expenses.
The IRS defines qualified medical expenses in Section 213(d) of the Internal Revenue Code. The list is broad and covers most healthcare costs you would expect, plus some you might not. Withdrawals for qualified expenses are completely tax-free at any age.
Common qualified expenses include:
- Doctor and specialist visits — Co-pays, deductibles, and coinsurance for any licensed medical professional.
- Prescription medications — Any drug that requires a prescription, plus insulin (even without a prescription).
- Dental care — Cleanings, fillings, crowns, braces, dentures, and oral surgery.
- Vision care — Eye exams, prescription glasses, contact lenses, and LASIK surgery.
- Mental health — Therapy, psychiatry, substance abuse treatment, and prescribed mental health medications.
- Lab work and diagnostics — Blood tests, X-rays, MRIs, and other diagnostic procedures.
- Hospital and surgical costs — Inpatient and outpatient procedures, ambulance fees, and emergency room visits.
- Over-the-counter items (since 2020) — Menstrual products, sunscreen, first aid supplies, allergy medicine, and pain relievers are now HSA-eligible thanks to the CARES Act.
- Medicare premiums (age 65+) — Medicare Part B, Part D, and Medicare Advantage premiums can be paid tax-free from an HSA.
Expenses that do NOT qualify:
- Cosmetic procedures — Teeth whitening, hair transplants, and elective cosmetic surgery are not eligible.
- Gym memberships — Unless specifically prescribed by a doctor for a diagnosed condition.
- Health insurance premiums — Generally not eligible, with exceptions for COBRA, long-term care insurance, and health coverage while receiving unemployment compensation.
Pro tip: IRS Publication 502 provides the full list. When in doubt, keep the receipt and check later. It is better to have documentation for a questionable expense than to miss a legitimate deduction.
One of the most important features of an HSA is that you own it. Unlike a Flexible Spending Account (FSA), which is tied to your employer and has a "use it or lose it" rule, your HSA belongs to you regardless of your employment status or health plan.
Key portability rules:
- The money is always yours — If you leave your job, get fired, or retire, every dollar in the HSA stays with you. You can continue using it for qualified medical expenses indefinitely.
- Switch to non-HDHP = stop contributing, keep spending — If you switch to a PPO or other non-HDHP plan, you can no longer make new contributions to the HSA. But you can still use the existing balance for qualified medical expenses and continue investing the funds.
- Transfer to a new HSA provider — You can transfer or roll over your HSA to any provider you choose. Many employer-sponsored HSAs have limited investment options and high fees. Once you leave, you can move to a provider with better investment options (like Fidelity, which offers zero-fee HSA investing with access to all Fidelity funds).
- No time limit on funds — HSA balances roll over year after year. There is no annual deadline to use the money, no forfeiture, and no expiration. This is the opposite of an FSA.
Common scenarios:
- Switching employers — Keep your current HSA or transfer it. New employer may have a different HSA provider, but you are not required to use it.
- Going self-employed — You can contribute to your HSA if you have an individual HDHP. The contribution is deductible on your tax return (above the line).
- Turning 65 / enrolling in Medicare — You stop contributing but keep the funds. After 65, non-medical withdrawals are taxed as income but have no penalty, making the HSA behave like a traditional IRA for non-medical spending.
Using HSA funds for non-qualified expenses comes with a steep penalty if you are under 65. The IRS imposes this to discourage people from treating the HSA as a general-purpose savings account, since it receives such generous tax treatment.
Penalty structure:
- Under age 65: Non-qualified withdrawals are subject to ordinary income tax PLUS a 20% penalty. So if you are in the 32% bracket and withdraw $1,000 for a vacation, you would owe $320 in income tax plus a $200 penalty, for a total of $520 in taxes on $1,000. That is a 52% effective tax rate.
- Age 65 and older: The 20% penalty is waived. Non-qualified withdrawals are simply taxed as ordinary income, identical to a traditional IRA distribution. This makes the HSA a flexible retirement tool since, in the worst case, it functions like a traditional IRA.
- Disability: If you become disabled (as defined by the IRS), the 20% penalty is also waived regardless of age.
- Death: If the HSA owner dies and the beneficiary is a spouse, the spouse inherits the HSA and can continue using it as their own. If the beneficiary is a non-spouse, the account is distributed and taxed as income in the year of death.
How to avoid penalties: The simplest approach is to only withdraw for qualified medical expenses (which have no time limit). By saving receipts for out-of-pocket medical expenses over the years, you build up a "receipt balance" that you can reimburse tax-free at any point in the future.
The answer depends on your financial situation, but if you can afford to pay medical expenses out-of-pocket, investing your HSA long-term is almost always the mathematically superior strategy. The numbers are stark.
The case for investing (not spending):
- Compounding is exponential — $4,150 invested annually at 8% for 25 years grows to approximately $317,000. If you spent $2,000/year from that account on medical bills (leaving only $2,150 to invest), you would end up with roughly $171,000. That is $146,000 less.
- Tax-free growth is rare — Very few accounts offer truly tax-free investment growth. Every dollar of gains inside your HSA avoids the 15-20% long-term capital gains tax and any taxes on dividends. Over decades, this tax drag reduction compounds significantly.
- Medical costs spike in retirement — Fidelity estimates that an average 65-year-old couple will spend roughly $315,000 on healthcare in retirement. A well-invested HSA can cover a large portion of that, all tax-free.
When it makes sense to spend from the HSA:
- You cannot afford out-of-pocket costs — If a $500 medical bill would stress your emergency fund or go on a credit card, use the HSA. Avoiding credit card interest at 20%+ is more important than tax-free growth at 8%.
- You have high-deductible plan exposure — If you face a $3,000 deductible and have a medical event, using the HSA is completely reasonable.
- You are close to retirement — If you have only a few years until retirement, the compounding benefit is smaller. Using HSA funds for current expenses may simplify your finances.
Bottom line: If you have the cash flow to cover medical bills out-of-pocket and a multi-decade time horizon, invest the HSA. The triple tax advantage is too powerful to waste on routine expenses.
Not all HSA providers are created equal. Many employer-sponsored HSAs charge monthly fees, offer limited investment options, and require a large cash minimum before investing. Choosing the right provider and investment strategy matters enormously over a multi-decade time horizon.
Top HSA providers for investing:
- Fidelity — No monthly fees, no minimum cash balance requirement for investing, access to all Fidelity mutual funds and ETFs (including zero-expense-ratio index funds). Widely considered the gold standard for HSA investing.
- Lively — No monthly fees, partners with Schwab for self-directed investing. Good option with access to the full Schwab brokerage platform.
- HSA Bank — Offers TD Ameritrade integration for investing. Monthly fee waived above certain balance thresholds. Common employer-sponsored provider.
What to invest in:
- Total stock market index fund — A single low-cost fund like FSKAX (Fidelity) or VTI (Vanguard) gives you broad U.S. stock exposure. This is the simplest and often best approach for a long time horizon.
- Target-date fund — If you want a hands-off approach that gradually shifts to bonds as you age, a target-date fund is a reasonable choice.
- Three-fund portfolio — For more control, split across U.S. stocks, international stocks, and bonds in your preferred allocation.
Key considerations: Keep expense ratios as low as possible (under 0.10% for index funds). Avoid the default cash position, which typically earns minimal interest. If your employer-sponsored HSA has poor investment options, you can transfer funds to a personal HSA (like Fidelity) once per year via a trustee-to-trustee transfer.
The taxable brokerage comparison in this calculator models what would happen if you invested the same dollars in a regular taxable brokerage account instead of an HSA. The comparison highlights just how much the triple tax advantage is worth over time.
Assumptions used in the comparison:
- After-tax contributions — In a taxable brokerage, contributions come from after-tax dollars. If your marginal tax rate is 32%, a $4,150 gross contribution becomes $2,822 after tax. In contrast, the HSA gets the full $4,150 pre-tax.
- Annual tax drag on gains — Investment gains in a taxable account are partially taxed each year (dividends are taxed annually, and any rebalancing triggers capital gains). The calculator uses a simplified 15% annual tax on gains, which approximates the long-term capital gains rate for most investors.
- HSA: no annual tax drag — All gains inside the HSA compound tax-free. No capital gains taxes, no dividend taxes, no tax drag. This is the same advantage that Roth accounts provide.
- Same investment return assumption — Both accounts are assumed to earn the same gross return on investments. The difference in outcomes comes entirely from the tax treatment.
What the comparison reveals: Over a 25-year period with typical assumptions, the HSA can accumulate 40-60% more wealth than a taxable brokerage account investing the same gross dollars. The advantage comes from three sources: (1) more money invested upfront (pre-tax vs. after-tax), (2) no annual tax drag on growth, and (3) no taxes on withdrawal for medical expenses.
Simplifications to be aware of: The model assumes a constant return rate and a simplified annual capital gains tax in the taxable account. Real-world returns vary, and actual tax drag depends on turnover, dividend yield, and when you sell. The directional conclusion (HSA beats taxable) holds under virtually all realistic scenarios.
Ready to build a professional valuation model?