Yes, the money in your HSA can be invested. Once your balance clears whatever cash minimum your custodian requires, the rest can go into mutual funds, ETFs, bonds, and (with some custodians) individual stocks, and every dollar of growth inside the account is exempt from federal income tax under Internal Revenue Code Section 223.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts That combination, plus tax-free withdrawals for qualified medical expenses, is why the HSA gets used as an investment account and not just a spending account.
What You Can Invest In
Federal law gives HSAs a broad investment mandate. The account operates as a tax-exempt trust, and most custodians offer a menu similar to what you’d find in a retirement account: index mutual funds, sector-specific funds, bond funds, and ETFs. Some custodians go further and provide a full brokerage window with access to individual stocks and corporate bonds. Others limit you to a handful of preselected mutual funds. The custodian you choose directly controls what’s available to you.
There are federal restrictions on what the account cannot hold. HSAs are subject to the prohibited transaction rules under IRC Section 4975, which prevent self-dealing between the account and “disqualified persons,” meaning you, your family members, and certain related entities.2Office of the Law Revision Counsel. 26 USC 4975 – Tax on Prohibited Transactions In practice, this means you can’t use HSA funds to buy property from yourself, lend yourself money from the account, or use HSA assets for personal benefit outside of qualified distributions.
The IRA rules on collectibles and life insurance also apply. Investing HSA funds in artwork, rugs, antiques, gems, stamps, coins, or alcoholic beverages is treated as a taxable distribution equal to the purchase cost. Life insurance contracts are similarly off-limits within the trust.3Office of the Law Revision Counsel. 26 USC 408 – Individual Retirement Accounts These edge cases won’t affect most account holders picking mutual funds, but they matter if you’re exploring a self-directed HSA.
How to Actually Start Investing
Most HSA custodians require you to keep a minimum cash balance in the account before any money can be moved into investments. This threshold exists to ensure you have liquid funds available for near-term medical expenses. The required minimum varies by custodian, with many setting it somewhere between a few hundred and $2,000. Some custodians charge no threshold at all. When you’re comparing providers, this minimum is one of the most important details to check, because every dollar stuck in cash is a dollar not growing in the market.
Once your balance exceeds the required cash floor, the difference becomes your investable balance. Most custodians provide an online portal or app where you select investments and initiate transfers from the cash side to the investment side of your account. You can typically set up automatic sweeps so that new deposits above the cash threshold move into your chosen funds without manual intervention. After you submit a transfer, the funds usually reach your investment sub-account within one to two business days.
Fees are worth watching. Monthly administrative fees for HSA investment accounts generally run from $0 to about $5, depending on the custodian. Some providers also charge per-trade commissions or require you to hold their proprietary funds. The expense ratios on the funds themselves are another cost layer. A custodian offering free trades but only high-fee funds can end up costing more over time than one with a small monthly fee and access to low-cost index funds.
How the Growth and Withdrawals Are Taxed
Under IRC Section 223(e)(1), an HSA is exempt from federal income tax as long as it remains a valid HSA.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts Interest, dividends, and capital gains all accumulate without triggering any federal tax liability. You can buy and sell investments inside the account as often as you want, and none of those trades generate a taxable event. A regular brokerage account would owe taxes on dividends each year and capital gains on every profitable sale. An HSA owes nothing on either.
When you eventually withdraw the money to pay for qualified medical expenses, those distributions are also tax-free.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts Combined with the upfront deduction on contributions, this creates “triple tax-free” treatment: deductible going in, tax-free while growing, tax-free coming out for medical costs.
Non-qualified withdrawals are treated very differently. If you pull money out for something other than a qualified medical expense, you owe regular federal income tax on the amount plus a 20% additional tax penalty. The penalty is steep enough that using HSA funds for non-medical spending before age 65 is rarely worth it. You also need to keep records proving that every tax-free distribution went toward a qualified medical expense. The IRS doesn’t want the receipts with your return, but you need them on hand if asked.4Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
The California and New Jersey Exception
Almost every state follows the federal treatment, but California and New Jersey do not recognize HSAs for state income tax purposes. If you live in either state, your contributions are not deductible on your state return, and investment earnings inside the account are taxable at the state level in the year they’re earned. Federal treatment is unchanged, but residents of those two states face extra paperwork and a slightly reduced tax benefit.
Selling Investments to Pay a Medical Bill
When a medical bill arrives and your HSA’s cash balance isn’t enough to cover it, you’ll need to sell investments first. The process involves two steps: selling the securities inside the brokerage sub-account, then transferring the proceeds to the cash side of the HSA so they can be spent.
After you sell, the trade must settle before the cash is available. Under SEC Rule 15c6-1, most securities settle on a T+1 basis, meaning the trade completes one business day after the sale.5SEC.gov. Shortening the Securities Transaction Settlement Cycle Once settled, you move the cash to the liquid side, and from there you can pay the bill using your HSA debit card, an online bill pay tool, or a transfer to your personal bank account for reimbursement. The whole process can take two to four business days, so plan ahead when a payment deadline is approaching.
Paying Out of Pocket Now and Reimbursing Later
This is where investing an HSA gets interesting. The IRS lets you reimburse yourself from your HSA for any qualified medical expense incurred after the account was established, with no deadline on when you take the reimbursement.4Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans You could pay a $3,000 dental bill out of pocket in 2026, let your HSA investments grow for 15 years, and then reimburse yourself the $3,000 completely tax-free in 2041.
The key requirement is that the expense must have been incurred after you opened the HSA. Anything before that date doesn’t count, even if it was a legitimate medical cost. You also need to keep receipts and records for every expense you plan to reimburse later, potentially for decades. If you can’t prove the expense was qualified, the distribution becomes taxable income plus the 20% penalty (if you’re under 65). For people who can afford to pay medical bills out of pocket today, this turns the HSA into a long-term tax-free growth vehicle with a built-in reimbursement pipeline.
What Changes at Age 65
Turning 65 shifts how the account works. The 20% penalty for non-medical withdrawals disappears. Medical withdrawals remain completely tax-free, and non-medical withdrawals are taxed as ordinary income with no penalty, similar to a traditional IRA.4Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Enrolling in Medicare, which happens for most people at 65, ends HSA contribution eligibility. Your contribution limit drops to zero starting with the first month you’re enrolled.4Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans You can still keep the account open, leave the money invested, and take distributions at any time. Nothing forces you to spend down the balance. If you’re still working at 65 with employer HDHP coverage and haven’t enrolled in Medicare, you can continue contributing until you do enroll.
One eligibility note that catches people off guard: if you delay signing up for Medicare Part A and later apply, coverage is backdated up to six months. Any HSA contributions you made during that retroactive period become excess contributions, subject to a 6% excise tax unless withdrawn before your filing deadline including extensions.4Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Moving to a Custodian With Better Investment Options
If your current custodian has a limited fund menu, high fees, or a high cash minimum, you can move the account. There are two paths, and the difference matters.
- A trustee-to-trustee transfer sends the funds directly from your old custodian to your new one. It is not a taxable event, there is no annual limit on how many you can do, and the process typically takes two to five weeks depending on the old custodian.
- A 60-day indirect rollover sends the funds to you personally, and you have 60 calendar days to deposit them into the new HSA. Miss the deadline and the entire amount becomes a taxable distribution. You’re limited to one indirect rollover per 12-month period, and it must be reported on your tax return.
The trustee-to-trustee transfer is almost always the safer choice. There’s no risk of accidentally triggering a taxable distribution, and the one-per-year limit doesn’t apply.
One reporting note if you’re moving investments around inside the account: you do not report internal trades, dividends, or capital gains on your tax return. The tax-exempt status of the trust keeps that activity invisible to the IRS as long as the money stays inside the account.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts You’ll get Form 5498-SA showing contributions and Form 1099-SA showing distributions, but no 1099-DIV or 1099-B for the investment activity itself.