Yes, you can invest the money in your HSA. Federal law allows Health Savings Account balances to be held in stocks, bonds, mutual funds, and exchange-traded funds rather than sitting only as cash, and the earnings grow tax-free as long as you eventually spend them on qualified medical care.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans Combined with a tax-deductible contribution going in and a tax-free withdrawal for medical costs coming out, the HSA is one of the few accounts in the tax code with a triple tax advantage.2Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts For 2026, you can contribute up to $4,400 with self-only coverage or $8,750 with family coverage, plus an extra $1,000 if you are 55 or older.3Internal Revenue Service. IRS Notice 2026-05 – Expanded Availability of Health Savings Accounts
To fund an HSA in the first place you generally need coverage under a High Deductible Health Plan and cannot be enrolled in Medicare or claimed as someone else’s dependent.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans Starting January 1, 2026, the One, Big, Beautiful Bill Act also treats bronze and catastrophic plans as HSA-compatible even when they don’t meet traditional HDHP deductible thresholds, opening the account to people who were previously locked out.4Internal Revenue Service. Treasury, IRS Provide Guidance on New Tax Benefits for Health Savings Account Participants Under the One, Big, Beautiful Bill
How HSA Investing Actually Works
Most HSA custodians split the account into two parts: a cash account that handles everyday medical spending, and a separate investment account that works like a small brokerage inside your HSA. You choose funds or other assets in the investment side, and that money rises and falls with the market.
Before you can invest anything, your custodian typically requires a minimum cash balance to stay in the liquid portion, often somewhere between $1,000 and $2,000. That floor is set by the provider, not the IRS, and it exists so you have cash on hand for deductibles and copays without needing to sell investments at a bad time. Once your cash balance clears the threshold, the surplus can be moved into investments.
Some custodians offer an auto-invest feature that sweeps cash above the threshold into your chosen investments on a schedule. Turning it on means payroll contributions get put to work automatically instead of piling up as idle cash.
What You Can and Can’t Invest In
The IRS does not limit HSA balances to savings accounts. Funds can be invested in stocks, bonds, mutual funds, and ETFs, and the interest and earnings grow tax-free inside the account.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans The actual menu depends on your custodian. Most mainstream providers offer a curated list of low-cost index funds and target-date funds; some offer a full brokerage window with individual stock trading. If you want less common assets like real estate investment trusts or alternative funds, you may need a self-directed HSA custodian.
Prohibited Investments
Two asset categories are off-limits. HSA funds cannot be invested in life insurance contracts, and they cannot be used to buy collectibles, a category that includes artwork, antiques, gems, stamps, coins, rugs, and alcoholic beverages.5Office of the Law Revision Counsel. 26 USC 408 – Individual Retirement Accounts Buying a prohibited asset is treated as a distribution, so you owe income tax on the amount and potentially the 20% additional tax that applies to non-medical withdrawals before age 65.
Prohibited Transactions
Certain dealings between you and the account are also prohibited: borrowing from the HSA, selling property to it, or using its assets for personal benefit. A prohibited transaction can strip the account of its tax-exempt status entirely, in which case the full balance is treated as distributed and taxed as income. A separate excise tax of 15% of the amount involved applies for each year the violation goes uncorrected, rising to 100% if it is never fixed.6Office of the Law Revision Counsel. 26 USC 4975 – Tax on Prohibited Transactions
Steps to Start Investing
Once your cash balance meets the custodian’s minimum, the process is fairly short:
- Open the investment sub-account through your custodian’s portal. You will complete an enrollment form and may be asked to name a beneficiary for the investment portion.
- Choose your investments. Have the ticker symbols ready and decide what percentage of your investable balance goes to each.
- Move cash from the liquid portion into the investment account. Transfers typically settle in one to two business days.
- Confirm the trade settled, then review your allocations periodically and rebalance as your goals change.
If your custodian offers auto-invest, turning it on removes the need to initiate each transfer by hand.
Fees That Eat Into Returns
HSA custodians can charge in several layers, and small percentages compound over decades. Common charges include an account maintenance fee that ranges from nothing up to about $48 per year (sometimes paid by an employer if the HSA comes through work), an investment advisory fee for managed or robo-advised options that commonly runs around 0.35% of assets, and the underlying expense ratios of the funds themselves, with index funds typically charging the least. Fee structures vary widely, and switching custodians is straightforward.
Getting Money Out of Invested Funds
When a medical bill arrives, you first sell investments and move the proceeds back into the cash portion of the HSA, then pay the expense or reimburse yourself. Distributions used for qualified medical expenses are completely tax-free.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans Qualified expenses cover most costs for diagnosing, treating, or preventing disease for you, your spouse, and your dependents, including doctor visits, prescriptions, dental and vision care, and mental health services.7Internal Revenue Service. Publication 502, Medical and Dental Expenses
Withdraw HSA funds for anything else before age 65, and you owe income tax on the amount plus a 20% additional tax.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans That’s steeper than the 10% early-withdrawal penalty on traditional IRAs.8Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions Once you reach 65, become disabled, or die, the 20% penalty is gone permanently. After 65, non-medical withdrawals are added to taxable income with no extra penalty, so the account behaves like a traditional retirement account for general spending, while medical withdrawals remain tax-free at any age.
Keep Your Receipts, Take Your Time
You need records showing that each tax-free distribution paid a qualified medical expense, that the expense was not reimbursed by insurance, and that you did not also claim it as an itemized deduction. You don’t file these with your return, but you need them if the IRS asks.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans
There is no deadline to reimburse yourself. Pay a medical bill out of pocket today, leave the HSA invested for years or decades, and withdraw the amount tax-free later, as long as the expense occurred after you opened the HSA and you kept the receipt. Investors use this to let the account compound longer while still preserving the tax-free withdrawal.
Medicare Ends New Contributions
Enrolling in any part of Medicare drops your HSA contribution limit to zero starting with the first month of coverage.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans If Medicare enrollment is retroactive, which is common when you sign up for Part A after age 65 because it can be backdated up to six months, any HSA contributions during that retroactive period become excess contributions subject to a 6% excise tax.9Office of the Law Revision Counsel. 26 USC 4973 – Tax on Excess Contributions to Certain Tax-Favored Accounts The existing balance still works normally after Medicare: you can keep it invested and withdraw tax-free for qualified medical costs, including Medicare premiums, deductibles, and copays. You just cannot add new money.
Moving to a Better Custodian
If a different provider offers lower fees or a better investment lineup, you can move your funds two ways. A trustee-to-trustee transfer sends the money directly between custodians; there is no annual limit on these, and they are not reported as distributions or contributions. A 60-day rollover means you receive the funds and deposit them into a new HSA within 60 days. You can only do one rollover per 12-month period, and while it appears on your tax return, it does not count against the annual contribution limit. The trustee-to-trustee transfer is safer because there is no window to miss.
Beneficiaries: Big Difference Depending on Who
Who inherits the account changes the tax outcome dramatically:
- A spouse beneficiary takes over the HSA as their own. They can continue tax-free medical withdrawals, keep the balance invested, and contribute new money if they’re otherwise eligible.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans
- A non-spouse beneficiary sees the account stop being an HSA immediately. Its fair market value becomes taxable income to the beneficiary in the year of the account holder’s death, reduced by any qualified medical expenses of the deceased that the beneficiary pays within one year of the date of death.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans
- If the estate is the beneficiary or no beneficiary is named, the account value goes on the account holder’s final income tax return.1Internal Revenue Service. Publication 969, Health Savings Accounts and Other Tax-Favored Health Plans
Because a spouse inherits a fully functional tax-advantaged account while a non-spouse gets a lump-sum tax bill, checking the beneficiary designation whenever your family situation changes is worth the two minutes.
State Taxes: A Note for California and New Jersey
Federal HSA rules are uniform, but a small number of states do not follow them. California and New Jersey do not recognize HSAs as tax-advantaged at the state level. In those states, contributions do not reduce state taxable income, and investment earnings inside the account, including dividends, interest, and capital gains, may be taxable on your state return each year. The federal benefits still apply, so an HSA can still make sense, but the state tax cost is worth factoring in before you build a large investment balance.