Skip to main content

How to Invest Your HSA Balance Instead of Leaving It in Cash

You can invest HSA money the same way you invest other retirement savings, but most people don't know it's an option

A Health Savings Account starts as a cash bucket. You put money in, you pay medical bills from it, and the balance sits there. But after you've covered your immediate medical expenses, the money that remains can be invested in stocks, bonds, and mutual funds—just like a 401(k) or IRA. Most HSA custodians offer an investment menu alongside the cash option, though you have to move money from the cash portion into investments yourself. The tax treatment stays the same: money grows tax-free, and withdrawals for medical expenses are never taxed.

The catch is that HSAs are not set up for investing by default. Your employer's plan or the custodian you chose may not have mentioned it, and the investment option may be buried in the account settings. You also need enough money sitting aside to cover near-term medical costs—investing money you'll need in the next few months defeats the purpose and locks you into selling at the wrong time.

Key Takeaways

  • HSA money can be invested through the same mutual funds and exchange-traded funds your custodian offers, and investment earnings grow tax-free.
  • You must keep enough cash in your HSA to cover medical expenses you expect in the next 6 to 12 months, since selling investments to pay a bill may force you to lock in a loss.
  • Investment options vary by custodian—some offer only a handful of funds, while others provide the full range available through a brokerage account.
  • Withdrawals for medical expenses remain tax-free and penalty-free regardless of whether the money came from cash or investments, but non-medical withdrawals after age 65 are taxed like traditional IRA withdrawals.

How HSA investing works at the account level

Your HSA custodian holds two separate buckets: cash and investments. Money arrives in the cash bucket when you or your employer contributes. To invest, you transfer cash from the cash bucket into one or more investments offered by that custodian. The investments then grow or shrink based on market performance. When you need to pay a medical bill, you can withdraw from either bucket—the custodian doesn't care which.

The tax treatment is the same regardless of which bucket the money came from. Withdrawals for may have access to medical expenses are never taxed and never penalized, whether you're pulling from cash or selling an investment at a gain or loss. Non-medical withdrawals before age 65 are taxed as income plus hit with a 20% penalty. After age 65, non-medical withdrawals are taxed as income but the penalty disappears—making the HSA function like a traditional IRA at that point.

Investment earnings inside the HSA are never taxed while the money stays in the account. This is the main advantage over investing the same money in a taxable brokerage account, where you'd owe tax on dividends and capital gains every year.

What investments are actually available in an HSA

The menu depends entirely on your custodian. Some HSA custodians—often those run by smaller banks or insurance companies—offer only a few mutual funds, sometimes just a money market fund and a balanced fund. Others, particularly those run by major brokerages like Fidelity or Charles Schwab, offer hundreds of mutual funds and ETFs, sometimes including individual stocks.

Common investment options include target-date funds (which automatically shift from stocks to bonds as you approach a certain year), index funds tracking the S&P 500 or total stock market, bond funds, and balanced funds mixing stocks and bonds. Some custodians also allow you to invest in money market funds that pay slightly higher interest than a regular savings account—useful if you want to earn something without taking stock market risk.

Before opening an HSA or moving money into investments, check what your custodian actually offers. If your employer chose the custodian, ask your benefits administrator for the investment menu or log into the account and look for an "Investments" or "Brokerage" tab. If the options are too limited and that matters to you, some people open a second HSA with a custodian that offers broader choices, though this requires tracking two accounts.

How much to keep in cash versus investments

The rule of thumb is to keep 6 to 12 months of expected medical expenses in cash, then invest the rest. If you have a high-deductible health plan with a $2,000 deductible and you typically spend $200 a month on copays and prescriptions, keeping $2,400 to $2,400 in cash covers your deductible plus a year of routine costs. Any balance above that can be invested.

The reason for this buffer is simple: if you invest money you need in three months and the market drops 15%, you either have to sell at a loss or delay paying your medical bill. Keeping enough cash on hand means you can pay bills without touching investments, giving your invested money time to recover from downturns.

Your expected medical costs may change year to year. If you're planning a surgery or know you'll need expensive medications, increase your cash buffer that year. If you're healthy and your costs are predictable, you can be more aggressive about investing the surplus.

Moving money from cash to investments

The process varies slightly by custodian, but the basic steps are the same. Log into your HSA account online or through the mobile app. Look for a section labeled "Investments," "Brokerage," "Transfer Funds," or "Move Money." Select the amount you want to move from cash into investments. Choose which investment or investments you want to buy. Confirm the transaction.

Some custodians let you set up automatic transfers—for example, moving $500 from cash to investments every month. This is useful if you want to invest gradually rather than all at once, which can reduce the risk of investing a large sum right before a market drop.

There are no taxes or penalties for moving money between the cash and investment portions of your HSA. The transfer itself is not a withdrawal, so it doesn't trigger any tax consequences. You can move money back from investments to cash anytime, though selling investments to move back to cash may lock in a gain or loss depending on the market.

Tax-free growth and withdrawal rules for invested HSA money

Investment earnings inside an HSA are never taxed while the money stays in the account. If you invest $5,000 and it grows to $8,000, that $3,000 gain is tax-free. You don't report it on your tax return, and you don't owe tax on it unless you withdraw it for a non-medical reason.

Withdrawals for may have access to medical expenses are always tax-free and penalty-free, whether the money came from your original contributions or from investment gains. may have access to expenses include deductibles, copays, coinsurance, prescription drugs, dental work, vision care, and many other costs defined by the IRS. You can find the full list in IRS Publication 969.

If you withdraw invested money for a non-medical reason before age 65, you owe income tax on the entire amount plus a 20% penalty. After age 65, the penalty disappears but income tax remains. This makes the HSA a powerful retirement savings tool if you can afford to leave the money invested and pay medical bills from other sources—you're essentially getting a tax-free investment account with no required withdrawals.

Choosing an investment strategy for your HSA

Your strategy should match how long you plan to leave the money invested. If you're in your 30s or 40s and expect to use your HSA as a retirement account, a stock-heavy portfolio makes sense because you have decades for market downturns to recover. If you're within 10 years of retirement, a mix of stocks and bonds reduces the risk of a market drop forcing you to sell at a loss right when you need the money.

Many people use target-date funds, which automatically shift from aggressive to conservative as you approach a target retirement year. Others build a simple portfolio of two or three index funds—for example, 70% total stock market index and 30% bond index. The specific allocation matters less than having a plan and sticking to it rather than chasing performance or panicking during downturns.

Remember that you don't have to invest all your HSA money the same way. You might keep three years of expected medical costs in cash or a money market fund, invest another five years' worth in a balanced fund, and put the rest in a stock index fund. This ladder approach lets you avoid selling stocks to pay medical bills during a market downturn.

Common mistakes when investing HSA money

The biggest mistake is investing money you'll need soon. If you invest your entire HSA balance and then face a $3,000 medical bill three months later, you're forced to sell investments at whatever price they're trading at that day. If the market has dropped, you lock in a loss. Keep that cash buffer.

The second mistake is not investing at all. Many people leave their entire HSA in cash earning little to no interest, missing out on decades of tax-free growth. If you're healthy and your HSA balance is growing year after year, investing the surplus is one of the most tax-efficient moves available.

A third mistake is over-complicating the portfolio. You don't need individual stocks, sector funds, or international investments in an HSA. A simple mix of a total stock market index fund and a bond fund works for most people and requires almost no maintenance.

Frequently Asked Questions

Can I invest my HSA if my employer chose the custodian?

Yes. Your employer chose the custodian, but you control how the money is invested. Log into your account and look for an investments or brokerage section. If your custodian's investment options are limited, you can open a second HSA with a different custodian that offers broader choices, though you'll need to track two accounts.

What happens to my invested HSA money if I change jobs?

Your HSA stays yours. The money and investments don't disappear or get forfeited. You can leave it with the current custodian, roll it to a new custodian when you get a new job, or keep it invested indefinitely. There's no time limit on how long you can hold an HSA.

Can I lose money investing my HSA?

Yes, if you invest in stocks or stock funds, the value can drop. This is why keeping a cash buffer for near-term medical expenses matters—you avoid being forced to sell at a loss. Over long periods, stock investments have historically recovered from downturns, but short-term losses are possible.

Do I have to report HSA investment gains on my tax return?

No. Investment earnings inside the HSA are never reported on your tax return as long as the money stays in the account. You only report withdrawals if they're for non-medical reasons, in which case you report the entire amount withdrawn as income.

Can I invest in individual stocks through my HSA?

Only if your custodian offers it. Some custodians like Fidelity and Charles Schwab allow individual stock purchases, but many smaller custodians restrict you to mutual funds and ETFs. Check your custodian's investment menu before assuming you can buy individual stocks.