How to Invest Your HSA for Long-Term Growth

The health savings account is the only account in the U.S. tax code with three separate tax advantages: contributions reduce your taxable income, growth is untaxed, and qualified medical withdrawals are untaxed. Not the Roth IRA, not the 401(k) — only the HSA. And yet the large majority of HSA dollars in America sit in a cash sweep account earning close to nothing.

Treating an HSA as a checking account for copays throws away its best feature. This guide covers how to invest an HSA properly: how much cash to keep liquid, which funds to hold, the receipt-saving strategy that turns the account into a stealth retirement vehicle, and the traps — state taxes, provider fees, and Medicare timing — that catch people who only read the headline.

Disclosure: CreditMaze publishes educational information, not investment or tax advice. Contribution limits, tax treatment, and provider terms change; verify current figures with the IRS or a tax professional before acting.

Why the HSA is the best account you have

Compare the tax treatment directly. A dollar contributed to a traditional 401(k) escapes income tax now and is taxed on withdrawal. A dollar in a Roth IRA is taxed now and never again. A dollar in an HSA, spent on qualified medical care, is never taxed at all — and contributions made through payroll deduction also escape FICA payroll taxes, which no retirement account does.

Account Contribution Growth Qualified withdrawal Payroll tax
HSA (payroll) Pre-tax Tax-free Tax-free Exempt
Traditional 401(k) Pre-tax Tax-deferred Taxed Not exempt
Roth IRA After-tax Tax-free Tax-free Not exempt
Taxable brokerage After-tax Taxed annually Capital gains Not exempt

After age 65, the HSA loses its penalty for non-medical withdrawals and simply behaves like a traditional IRA — taxable as income, no penalty. So the downside case for over-funding an HSA is “it becomes a 401(k),” which is not much of a downside. That asymmetry is the whole argument for investing it aggressively.

Pro tip: Contribute through payroll deduction whenever your employer offers it. A direct contribution you deduct on your tax return saves income tax only; payroll contributions also avoid Social Security and Medicare taxes, worth an extra 7.65% for most workers.

Step 1: Confirm you’re eligible and funded correctly

You can contribute to an HSA only while covered by a qualifying high-deductible health plan and not enrolled in other disqualifying coverage, including Medicare. Eligibility is evaluated monthly, so mid-year changes prorate your limit. Our guide to choosing a health insurance plan covers when an HDHP genuinely makes sense — it usually does for healthy households with cash reserves, and often does not for those managing chronic conditions.

Two funding rules worth knowing:

  • The catch-up contribution for account holders 55 and older is per person, and spouses cannot combine it in one account. A couple who both qualify need two HSAs to capture both catch-ups.
  • Family coverage limits are per family, not per account, even if both spouses hold their own HSAs.

Step 2: Decide how much cash to keep

Nearly every provider requires a cash threshold before investing — commonly $500 to $2,000 — and you also want liquidity for bills you actually intend to pay from the account. Pick one of three postures.

Approach Cash to hold Best for
Spender Full annual deductible Frequent medical spending, thin outside savings
Hybrid Provider minimum + $1,000-$2,000 Most households
Investor Provider minimum only Strong emergency fund, ability to pay bills from cash flow

The investor approach is only appropriate if you have a real cash buffer outside the HSA. If a $3,000 medical bill would force you to sell investments at a bad moment or reach for a credit card, build the buffer first — see our emergency fund guide. Investing the HSA is an optimization, not a foundation.

Step 3: Build the portfolio

An HSA is a long-horizon account for most people, so the portfolio should look like a retirement portfolio, not a rainy-day fund. Keep it simple: broad, low-cost index funds. Expense ratios matter enormously over a 25-year horizon, and HSA menus often include a few expensive legacy funds alongside cheap index options.

Three workable portfolios

  • One fund: a target-date fund matched to your retirement year, or a total-world stock index fund. Rebalances itself; ideal if you will not maintain it.
  • Two funds: 70-80% total U.S. stock market, 20-30% total international. Add bonds only as you approach the point of drawing on the account.
  • Three funds: total U.S. stock, total international stock, total bond market, with the bond share rising as your spending horizon shortens.

If you are new to fund selection, our primers on index fund investing and the best ETFs for beginners cover the mechanics. The overall allocation should be considered alongside your other accounts, not in isolation — see how to build an investment portfolio.

Pro tip: Check whether your provider charges an “investment account” fee on top of the monthly maintenance fee. A $3 monthly investing fee on a $4,000 balance is a 0.9% annual drag — more than the funds themselves cost. Some providers waive fees above a balance threshold; others never do.

Step 4: The receipt strategy

Here is the mechanic that separates casual HSA users from people who treat it as a wealth vehicle. There is no deadline for reimbursing yourself from an HSA. A qualified medical expense incurred today can be reimbursed tax-free in twenty years, provided the expense was incurred after the HSA was established and was never deducted or reimbursed elsewhere.

So the strategy is:

  1. Pay current medical expenses out of pocket from regular cash flow.
  2. Leave the HSA fully invested and compounding.
  3. Save every receipt and explanation of benefits, digitally, in a dedicated folder.
  4. Decades later, reimburse yourself tax-free for the accumulated total — effectively a tax-free withdrawal at any age, for any purpose.

The math is compelling. Paying $2,000 of medical bills out of pocket at 35 rather than from the HSA leaves that $2,000 invested; at a 7% real return it becomes roughly $7,600 by 55 and about $15,000 by 65 — and you can still withdraw $2,000 of it tax-free at any point using the old receipts. Our explainer on compound interest shows why the early years dominate this outcome.

Discipline requirements: back up receipts in two places, log each expense in a simple spreadsheet with date, provider, amount, and whether it was reimbursed, and never double-dip by also claiming the expense as an itemized deduction.

Step 5: Move the account if the provider is bad

Employer-selected HSA custodians are often chosen for payroll integration, not for investors. If yours has high fees, a poor fund menu, or a large cash minimum, you are not stuck.

  • Trustee-to-trustee transfer: unlimited, does not count as a contribution or a distribution, and is the preferred method. Many employers permit periodic transfers of the invested portion while payroll contributions continue to the employer’s custodian.
  • 60-day rollover: allowed once per 12 months and easy to fumble. Avoid it unless the receiving provider requires it.

Evaluate a receiving provider on four things: monthly fee, investment account fee, required cash minimum, and whether the menu includes broad index funds with low expense ratios. Our comparison of the best HSA accounts of 2026 covers what to look for.

Traps to avoid

Trap Consequence Fix
Contributing after Medicare enrollment Excess contribution penalties Stop contributions 6 months before applying for Medicare
State income tax on HSAs A few states tax contributions and earnings Favor low-turnover funds; check your state’s rules
Non-qualified withdrawal before 65 Income tax plus a 20% penalty Reimburse only documented qualified expenses
Losing receipts Cannot substantiate tax-free reimbursement Cloud folder plus a local backup
Naming a non-spouse beneficiary Account becomes fully taxable income to them in one year Name a spouse where possible; otherwise plan for the tax
Overlooking the last-month rule Testing-period failure triggers taxes and penalties Maintain HDHP coverage through the following December

The Medicare timing rule catches many people: enrollment in Part A can be retroactive up to six months, which retroactively disqualifies contributions made during that window. Stopping HSA contributions six months before you apply is the standard defense.

The beneficiary rule is equally sharp. A surviving spouse inherits the HSA as their own HSA with full tax treatment intact. Anyone else receives the entire balance as taxable income in the year of death. If a non-spouse will inherit, consider spending the account down first — and review the designation itself, as covered in our guide to beneficiary designations.

Where the HSA fits in your priority order

A defensible sequence for most households:

  1. Capture the full employer 401(k) match — an immediate guaranteed return. See our 401(k) guide.
  2. Pay off high-interest debt. No investment reliably beats a 24% credit card rate; see how to get out of credit card debt.
  3. Build a starter emergency fund.
  4. Max the HSA — the best remaining tax treatment available.
  5. Fund an IRA, choosing between Roth and traditional.
  6. Return to the 401(k) up to the annual limit.
  7. Taxable brokerage.

Step 4 lands above the IRA specifically because of the payroll tax exemption and the tax-free withdrawal for medical costs — and healthcare is among the largest expenses most retirees face. Our guide to saving for retirement by age puts these targets on a timeline.

The 25-year math, run three ways

The case for investing an HSA is easy to state and easier to ignore, so it helps to see the outcomes side by side. Assume a 40-year-old contributing $4,000 a year for 25 years, with $2,500 in annual medical expenses, and a 7% average annual return on invested balances.

Strategy Balance at 65 What happened
Cash, spent as you go ~$40,000 Contributions minus expenses, near-zero yield
Invested, expenses paid from HSA ~$100,000 Only the $1,500 annual surplus compounds
Invested, expenses paid out of pocket ~$253,000 Full contribution compounds untouched

The gap between the first and third rows is roughly $213,000 on identical contributions. Nothing separates them except two decisions: where the money sat, and which pocket paid the doctor.

The third strategy also carries a hidden asset. Twenty-five years of $2,500 in documented out-of-pocket expenses totals $62,500 in accumulated reimbursement rights. That entire amount can be withdrawn tax-free at any age, for any purpose, on the strength of the receipts alone. It functions as an emergency reserve that is invested, growing, and completely untaxed on the way out — something no other account structure offers.

Two honest caveats. First, the third strategy requires the cash flow to absorb medical bills without reaching for a credit card; if paying out of pocket means carrying a balance at 24%, the arithmetic reverses immediately and you should simply pay from the HSA. Second, returns are not guaranteed, and an HSA invested in equities can fall sharply in a bad year — which is why the cash cushion for near-term expenses is not optional.

The strategy scales down cleanly, too. Even investing half your balance and paying half your expenses out of pocket captures a large share of the benefit. This is not an all-or-nothing decision, and starting late still beats not starting.

Frequently asked questions

How much of my HSA should I invest?

Everything above the cash you would need for near-term medical bills plus the provider’s minimum. If you have a solid emergency fund, that often means investing nearly the entire balance.

What happens to my HSA if I change jobs or lose HDHP coverage?

The account is yours permanently. You simply cannot make new contributions while ineligible. Existing balances stay invested and remain available for qualified expenses tax-free.

Can I use HSA money for non-medical expenses?

Before 65, yes but with income tax plus a 20% penalty. After 65, non-medical withdrawals are taxed as ordinary income with no penalty — like a traditional IRA.

Is there a deadline to reimburse myself for an old expense?

No. As long as the expense was incurred after the HSA was opened and was not otherwise reimbursed or deducted, you can reimburse yourself years later — provided you kept documentation.

Can I pay Medicare premiums from my HSA?

Yes. Once you are 65 and enrolled, Medicare Part B, Part D, and Medicare Advantage premiums are qualified expenses. Medigap premiums are not.

Should I invest my HSA if I have chronic medical expenses?

Partially. Keep enough cash to cover your realistic annual out-of-pocket maximum, then invest the remainder. The account still grows tax-free even at a smaller invested balance.

The bottom line

An uninvested HSA is a savings account with paperwork. An invested one is the most tax-efficient long-term account available to American savers, and the setup takes about twenty minutes: confirm eligibility, contribute through payroll, keep a modest cash cushion, put the rest into a broad low-cost index fund, and move providers if fees are eating the returns.

Then add the receipt habit. Paying today’s medical bills out of pocket while the HSA compounds — and keeping every receipt for a tax-free withdrawal decades later — converts a healthcare account into a flexible, tax-free reserve for your sixties and beyond. Few financial moves offer this much return for this little effort.