Yes, you can invest money inside an HSA, and for many households it is one of the most tax-efficient ways to build long-term savings.
I grew up watching my parents juggle business cash flow and unexpected expenses, and healthcare costs were always the kind of “surprise bill” that could wreck a month. That is why I love HSAs for the right person: they can cover near-term medical costs and quietly grow into a serious, retirement-adjacent investment account if you use them intentionally.

That said, whether you can invest depends on your HSA custodian’s rules and your plan setup. Let’s walk through how it typically works, what the tax rules look like inside the account, and the big “don’t do this” transactions that can accidentally erase the tax benefits.
How an HSA holds cash and investments
An HSA is a type of tax-advantaged account used for qualified medical expenses when you are covered by an eligible high-deductible health plan. (As a quick reminder, eligibility to contribute generally requires HSA-eligible HDHP coverage and no disqualifying coverage.) Inside the HSA, the custodian usually provides:
- A cash account (often called the HSA “deposit” or “spend” account) that functions a bit like a bank account.
- An investment account (sometimes built in, sometimes through a linked brokerage platform) where you can buy investments.
The most common setup is a two-step system:
- You keep a required minimum cash balance in the cash side.
- Once you are above that threshold, you can move the “excess” into the investment side.
What is the minimum balance requirement?
Many custodians require you to maintain a minimum cash balance before investing. The amount varies by provider and employer plan design. Some plans require a cash cushion, some allow investing from dollar one, and some restrict the investment menu or charge extra fees.
Practically, think of the cash minimum as your HSA’s “checking account buffer.” It is there so you can pay routine medical expenses without having to sell investments every time you get a bill.

Investing does not change the HSA
This is a common point of confusion: investing does not turn your HSA into a taxable brokerage account. It remains an HSA the entire time, just with investments held inside it.
That matters because the HSA’s core tax benefits generally still apply:
- Contributions may be tax-deductible or pretax through payroll, depending on how you contribute.
- Growth can compound tax-free at the federal level inside the account.
- Withdrawals used for qualified medical expenses are tax-free.
Many people call this the “triple tax advantage.” Whether it is optimal for you depends on your cash flow, your health expenses, and how disciplined you are about saving receipts and following the rules.
Are HSA trades taxed?
In most cases, selling investments inside an HSA is not taxed federally the way a normal brokerage sale is. In a standard taxable brokerage account, selling a fund for a gain can trigger capital gains taxes. Inside an HSA, those internal sales generally do not create current-year federal capital gains taxes.
Three important nuances:
- Withdrawals are where taxes can show up, if you take money out for non-qualified expenses.
- After age 65, the penalty usually goes away for non-medical withdrawals, but the distribution is generally still taxable as ordinary income (similar to a traditional IRA).
- State rules can differ. A couple of states, notably California and New Jersey, do not treat HSA earnings as tax-free at the state level, which can affect the benefit of investing inside the account.
If you are investing for the long run, this “no annual federal capital gains tax drag” is one of the big reasons HSAs can be so powerful.
What can you invest in?
The investment menu depends on your custodian and employer plan. Common options include:
- Mutual funds (often a curated lineup similar to a 401(k) menu)
- Index funds (a type of mutual fund or ETF that tracks an index)
- ETFs (more common when the HSA uses a brokerage-style platform)
- Target-date funds (set-it-and-forget-it funds that rebalance automatically)
- Money market funds (sometimes available on the investment side)
Some custodians also allow individual stocks or other assets, while others restrict you to a preselected list. Before you move money over, check:
- What funds or ETFs are available
- Expense ratios and trading fees
- Account maintenance fees
- Minimums to buy funds or to open the investment side

A simple way to invest your HSA
Most people do best when they match the HSA strategy to how they actually use healthcare:
If you use the HSA to spend
If you expect regular medical bills and you want simplicity, you may keep more in cash and invest little or nothing. The tradeoff is lower long-term growth, but fewer forced sales.
If you can cash flow costs and invest
Some higher-income households choose to pay current medical expenses out of pocket and leave the HSA invested for years. They save receipts and later reimburse themselves tax-free. This approach can supercharge compounding, but it requires strong recordkeeping and the discipline not to raid the account. (Also note: reimbursements must be for qualified expenses incurred after the HSA was established.)
If you are in between
A middle path is common: keep a comfortable cash cushion for deductibles and expected costs, and invest anything above that.
Mistakes to avoid
HSAs have rules, and certain transactions can trigger taxes and penalties. You do not need to be scared of the account, but you do need to respect the guardrails.
1) Using HSA money for non-qualified expenses
If you withdraw money for a non-qualified expense, the distribution is generally taxable, and it can also face an additional penalty depending on your age and circumstances. Keep documentation for medical expenses you plan to reimburse.
2) Treating your HSA like a personal checking account
Do not use the HSA debit card for “maybe it counts” purchases. When in doubt, pay out of pocket and reimburse after you confirm the expense qualifies.
3) Mixing up reimbursement timing and records
Reimbursing yourself years later can be legitimate, but only if you can substantiate the qualified expense and show it happened after the HSA was opened. Create a system for receipts and explanations of benefits so you are not guessing later.
4) Contributing when you are not eligible
Eligibility is tied to having qualifying coverage and no disqualifying coverage. If your situation changes midyear, you may need to adjust contributions to avoid excess contributions.
5) Prohibited transactions and self-dealing
HSAs are tax-advantaged accounts with strict rules around prohibited transactions. Avoid arrangements that look like self-dealing, meaning you are using the account for personal benefit outside qualified medical spending. Prohibited transactions can jeopardize the account’s tax-advantaged status. If you are considering anything unusual beyond standard funds and ETFs, ask the custodian and a tax professional first.
How to start investing
- Confirm you have an investment option. Log in to your HSA portal and look for an “Investments” tab or a linked brokerage platform.
- Check the cash minimum. Find the required balance that must stay in cash before investing.
- Review fees and fund expenses. Small administrative fees matter more when your HSA balance is still growing.
- Choose a simple allocation. Many people start with a diversified index fund or a target-date fund that matches their time horizon.
- Automate if you can. Some custodians let you automatically sweep balances above the cash minimum into investments.
- Revisit once or twice a year. Make sure the cash cushion still fits your medical spending and your deductible.
What about an FSA?
A health FSA is different. In general, health FSAs cannot be invested like an HSA. They are designed primarily as spending accounts for eligible healthcare expenses within plan rules, not long-term investing vehicles.
If you are deciding between accounts as a small business owner, HSAs and FSAs can both be useful, but only the HSA is built to potentially grow through investing.
FAQ
Do I have to invest my HSA?
No. You can keep your HSA entirely in cash. Investing is optional, and it should fit your risk tolerance and your need for near-term medical liquidity.
Can I invest my entire HSA balance?
Only if your custodian allows it. Many require you to keep a minimum cash balance. Some allow investing from the first dollar.
Do dividends and capital gains inside the HSA create a tax bill?
Typically, no current-year federal tax bill is triggered inside the HSA the way it would be in a taxable brokerage account. Taxes generally come into play if you take non-qualified distributions. State taxes may apply in states that do not follow the federal HSA rules.
If I move money into investments, can I still pay medical bills?
Yes, but you may need to sell investments and transfer cash back to the spending side first, depending on how your custodian processes payments. This is why maintaining a cash cushion matters.
The bottom line
An HSA can hold cash and, once your custodian’s minimum balance is met, you can often invest in mutual funds, ETFs, or other options offered on the platform. The account remains an HSA, and trades inside it are generally not taxed federally like normal brokerage trades. The big win is tax-advantaged compounding, as long as you avoid prohibited moves like taking non-qualified withdrawals and keep solid documentation for reimbursements.
If you are not sure how much to invest versus keep in cash, start simple: cover your deductible and expected out-of-pocket costs in cash, then invest the rest in a diversified, low-cost option you can stick with.