You can invest HSA funds the same way you invest a retirement account, but the rules about when and how differ

A Health Savings Account (HSA) holds money you set aside for medical expenses, but once you have more than a certain amount in the account—usually $1,000 to $2,500 depending on your provider—you can invest the excess in mutual funds, stocks, bonds, or other securities instead of leaving it sitting in a cash balance. The investment earnings grow tax-free, and you can withdraw them tax-free when you use the money for may have access to medical costs. If you withdraw for non-medical reasons before age 65, you pay income tax plus a 20% penalty on the earnings (though not the contributions you made).

The mechanics work like this: your HSA custodian—the bank or financial institution that holds your account—offers an investment menu, usually similar to a 401(k) plan. You move money from your cash balance into one or more of those investments. The money stays invested until you sell it or withdraw it. You control the timing and the choice of what to buy. Unlike a 401(k), there is no employer match, no annual contribution limit beyond the IRS maximum ($4,150 for individual coverage in 2024, $8,300 for family coverage), and no required withdrawals at any age.

Key Takeaways

  • You can only invest HSA money after you meet your account provider's minimum balance requirement, which typically ranges from $1,000 to $2,500 in uninvested cash.
  • Investment earnings in an HSA grow tax-free and can be withdrawn tax-free for may have access to medical expenses, making the account a long-term wealth tool if you do not need the money when ready.
  • Withdrawing invested HSA money for non-medical reasons before age 65 triggers income tax on the earnings plus a 20% penalty, so this is not a flexible savings account once money is invested.
  • Your HSA custodian determines which investments are available to you; common options include target-date funds, index funds, and individual stocks, but the menu varies by provider.
  • You can move money between your cash balance and investments as often as you want, so you can adjust your strategy if your medical spending patterns change.

How to move money from your HSA cash balance into investments

Log into your HSA provider's website or mobile app and look for a section labeled "Investments," "Investment Center," or "Brokerage." You will see your current cash balance and the list of available investments. Select the investment you want to buy, enter the dollar amount you want to move from cash into that investment, and confirm the transaction. The money moves out of your cash balance and into the investment within one to three business days.

Some providers let you set up automatic transfers—for example, moving $200 per month into a target-date fund—so you do not have to log in each time. Others require you to initiate each transfer manually. Check your provider's documentation or call their customer service line to see which option is available to you. If your provider does not offer investments at all, you may need to switch to a different HSA custodian; some banks and brokerages like Fidelity, Charles Schwab, and Lively offer HSA accounts with robust investment options.

What types of investments HSA providers typically offer

Most HSA custodians offer a menu similar to a 401(k) plan: target-date funds (which automatically shift from stocks to bonds as you approach a target retirement year), index funds tracking the S&P 500 or total stock market, bond funds, money market funds, and sometimes individual stocks or exchange-traded funds (ETFs). A few providers offer self-directed investing, meaning you can buy almost any stock or fund you want, though this usually comes with higher fees.

The specific menu depends entirely on your provider. Fidelity HSA accounts, for example, offer access to thousands of mutual funds and ETFs. A smaller regional bank might offer only five or ten target-date funds. Before opening an HSA or moving to a new custodian, ask what investments are available and whether there are transaction fees for buying or selling. Some providers charge $1 to $3 per trade; others charge nothing.

The tax advantage of investing in an HSA versus a regular brokerage account

If you invest $5,000 in a regular brokerage account and it grows to $8,000, you owe capital gains tax on the $3,000 gain when you sell—either 15% or 20% depending on your income, plus state tax in most states. If you invest the same $5,000 in an HSA and it grows to $8,000, you owe no tax on the gain if you withdraw it to pay for a may have access to medical expense. That difference compounds over decades.

This is why financial advisors often recommend treating an HSA as a retirement account rather than a short-term medical fund. If you have the cash to pay for medical expenses out of pocket and can leave your HSA contributions invested, the account becomes a powerful wealth-building tool. You get a tax deduction when you contribute, the money grows tax-free, and you withdraw it tax-free. No other account offers all three benefits.

When to keep money in cash versus when to invest it

Keep money in your HSA cash balance if you expect to use it for medical expenses within the next year or two. Medical costs are unpredictable—a surgery, a new prescription, dental work—and you do not want to be forced to sell investments at a loss because you need the money suddenly. Once you have enough in cash to cover your expected out-of-pocket costs for the year, move the rest into investments.

If you are young, healthy, and do not anticipate major medical expenses, you can invest most or all of your HSA contributions when ready. The longer the money stays invested, the more time it has to grow. Someone who invests $3,000 per year starting at age 30 and leaves it untouched until age 65 will have significantly more than someone who keeps it in cash. But if you have a chronic condition, take multiple medications, or know you have a planned procedure coming up, keep three to six months of expected medical costs in cash and invest the rest.

How investment losses and market downturns affect your HSA

If you invest your HSA in stocks or stock funds and the market drops 20%, your account balance drops 20% too. Unlike a 401(k), there is no employer match to cushion the loss. If you need to withdraw money during a downturn, you are selling at a loss. This is why time horizon matters: if you will not need the money for 10 or 20 years, short-term market swings do not matter. If you might need it in two years, a stock-heavy portfolio is risky.

A common strategy is to use a target-date fund that matches the year you expect to stop working. These funds automatically shift from aggressive (mostly stocks) to conservative (mostly bonds) as the target date approaches, reducing the risk of a big loss right when you need the money. Another approach is to keep one year of expected medical expenses in cash, one to three years in bonds or a stable value fund, and the rest in stocks.

Fees and costs that reduce your HSA investment returns

HSA investment fees come in three categories: custodian fees (charged by your bank or provider for maintaining the account), investment fees (charged by the mutual fund or ETF company), and transaction fees (charged when you buy or sell). Custodian fees range from $0 to $150 per year depending on the provider. Investment fees, called expense ratios, typically range from 0.03% per year for a low-cost index fund to 1% or more for an actively managed fund.

Over time, fees compound. A 1% annual fee on a $50,000 account costs you $500 per year, and that $500 would have grown if invested. Over 20 years, a 1% fee can reduce your balance by 15% to 20% compared to a 0.1% fee. When choosing an HSA provider or selecting investments, compare the total cost: custodian fee plus investment fee. Fidelity and Charles Schwab are known for low fees; smaller regional banks sometimes charge more. If your employer offers an HSA through a specific provider, you may not have a choice, but you can still choose low-cost investments within that provider's menu.

Frequently Asked Questions

Can I invest my HSA if I am still contributing to it each year?

Yes. You can contribute to your HSA and invest it at the same time. Many people set up automatic monthly contributions and automatic monthly transfers into investments. The money you contribute this year is added to your cash balance, and you can move it into investments when ready if you want, or keep it in cash for near-term medical expenses.

What happens to my HSA investments if I change jobs or switch health plans?

Your HSA stays with you and your investments stay invested. Unlike a 401(k), an HSA is not tied to your employer. If you change jobs or switch to a different health plan, your HSA account and all its investments remain yours. You can keep the same custodian or move the account to a new one through a trustee-to-trustee transfer, which takes a few weeks but does not trigger any taxes or penalties.

Can I withdraw money from my HSA investments without penalty if I have a medical emergency?

Yes, but you may have to sell at a loss. If you need the money and the market is down, you sell your investments at their current value, not what you paid for them. There is no penalty for withdrawing HSA money for may have access to medical expenses at any age, but you do realize any losses. This is why keeping some cash in your HSA is important—it lets you avoid forced sales during downturns.

Is there a limit to how much I can invest in my HSA?

No limit on the amount you invest, but there is a limit on how much you can contribute each year. For 2024, the IRS limit is $4,150 for individual coverage or $8,300 for family coverage. You can invest all of it, but you cannot contribute more than the annual limit. If you have been contributing for many years and have accumulated a large balance, you can invest as much of it as you want.

Should I invest my HSA if I am close to retirement?

It depends on when you will need the money. If you are 62 and plan to retire at 65, keep most of your HSA in cash or conservative investments because you will likely need it soon. If you are 62 and healthy with no major medical expenses expected, you can invest more aggressively because you can leave the money untouched until you actually need it. At age 65, you can withdraw HSA money for any reason without the 20% penalty, though you still pay income tax on earnings used for non-medical expenses.