Yes, HSA investments do grow tax-free at the federal level. Interest, dividends, and capital gains inside a Health Savings Account are exempt from federal income tax for as long as the account keeps its HSA status, and withdrawals stay tax-free too if you use them for qualified medical expenses. That combination — a deduction on the way in, no tax on the growth, and no tax on the way out for medical costs — is unique in the tax code. The rules for keeping all of it tax-free are strict but manageable.
How the Tax-Free Growth Actually Works
Federal law exempts an HSA from taxation as long as it maintains its status as a health savings account.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts Every dollar of interest, every dividend, and every gain from selling an investment inside the account grows without triggering federal tax. You won’t get a 1099-DIV or 1099-B for activity inside the account the way you would from a regular brokerage. The only tax form that comes into play is a 1099-SA, and only when you actually take money out.2Internal Revenue Service. About Form 1099-SA, Distributions From an HSA, Archer MSA, or Medicare Advantage MSA
The practical effect compounds over time. In a taxable brokerage account, you might owe 15% or 20% on long-term capital gains and pay tax on dividends every year. That annual drag quietly erodes returns across decades. Inside an HSA, the full balance compounds untouched, and when the money eventually comes out for qualified medical expenses, both the contributions and the growth come out tax-free.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts
Most custodians let you invest once you meet a minimum cash balance, often between $1,000 and $2,000. Above that threshold, you can move funds into an investment sub-account and buy individual stocks, bonds, mutual funds, ETFs, and CDs, similar to what you’d find inside an IRA.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans Custodian fees vary widely, and a few dollars a month directly reduces the tax-free compounding that makes the account valuable in the first place, so comparing platforms matters.
What You Have to Do to Keep Withdrawals Tax-Free
The growth stays tax-free only if you withdraw funds for qualified medical expenses as the IRS defines them. The list is broader than most people expect: doctor and hospital visits, prescription medications, dental work, vision care, mental health services, over-the-counter medications, and items like bandages and breast pumps all qualify.4Internal Revenue Service. Publication 502 (2025), Medical and Dental Expenses IRS Publication 502 contains the full list, and reviewing it is worth the time because plenty of everyday health costs qualify that people don’t realize.
There is no deadline for reimbursing yourself. You can pay a qualified medical expense out of pocket today, leave the HSA invested for years or decades, and then withdraw the same amount tax-free later as reimbursement. The IRS requires only that the expense was incurred after the HSA was established.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans That’s the mechanic that turns an HSA from a spending account into a long-term investment account: pay out of pocket when you can, save every receipt, and let the balance compound.
Documentation is the practical requirement. If the IRS ever questions a withdrawal, you need proof the expense was qualified and incurred after the account was opened. Digital copies of dated medical bills are the simplest approach.
What Happens If You Withdraw for Something Else
Pull money out for a non-qualified purpose and the withdrawal is included in your taxable income for that year. If you’re under 65, you also owe a 20% penalty tax on the amount.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts For someone in the 22% federal bracket, that’s an effective 42% hit, enough to wipe out years of tax-free compounding.
At 65, the 20% penalty disappears. Non-medical withdrawals are still taxed as ordinary income, but without the extra penalty the HSA effectively works like a traditional IRA from that point on.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans Using the funds for medical expenses stays fully tax-free at any age, so directing HSA dollars toward health costs first is generally still the better move. The penalty is also waived at any age if you become disabled or the distribution follows the account holder’s death.
Staying Eligible So the Account Keeps Its Status
The tax-free treatment depends on the account holder being eligible to contribute during the contribution years. Several conditions can disqualify you:
- Other health coverage. You generally cannot be covered by a non-HDHP health plan. A limited-purpose FSA covering only dental and vision won’t disqualify you, but a general-purpose FSA or general-purpose HRA will.5FSAFEDS. Limited Expense Health Care FSA
- Medicare enrollment. Once you enroll in any part of Medicare, your contribution limit drops to zero. Existing balances can still be invested and withdrawn tax-free for qualified expenses, but no new money can go in.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
- Dependent status. If someone else can claim you as a dependent, you cannot contribute, even if that person doesn’t actually claim you.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
Prohibited transactions with the account itself are the other way to lose the tax-free status entirely. Federal law bars you from selling or leasing property to your HSA, borrowing from it, or using its assets as loan collateral. Doing so can cause the account to lose its tax-exempt status, and the full fair market value of all assets becomes taxable income in that year.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans Sticking to ordinary securities purchases on the custodian’s platform avoids the problem entirely.
State Taxes: California and New Jersey Are Different
Federal tax-free treatment doesn’t automatically carry over to your state return. Most states follow the federal rules, but two do not.
California has no provision matching the federal HSA benefits. Residents must reverse the federal deduction for contributions and report HSA interest and investment earnings on their state return each year.6California Franchise Tax Board. Health Savings Accounts – AB 2384 Analysis New Jersey similarly does not extend the federal advantages to HSA contributions or earnings under its gross income tax.7New Jersey Legislature. Assembly Bill 1311 – Health Savings Account Tax Conformity If you live in either state, the investment growth in your HSA is still federally tax-free, but you’ll owe state tax on contributions and earnings annually. The federal savings alone still make HSAs worthwhile; the state layer just reduces the overall advantage and adds paperwork.
What Happens to the Tax-Free Status at Death
Who inherits the account changes everything. If your spouse is the designated beneficiary, the HSA becomes theirs and keeps its tax-advantaged status. Qualified withdrawals remain tax-free.1Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts
If anyone other than your spouse inherits, the account stops being an HSA on the date of death. The full fair market value becomes taxable income to that beneficiary in the year the account holder died.3Internal Revenue Service. Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans A non-spouse beneficiary can reduce the taxable amount by paying the deceased owner’s qualified medical expenses within one year of the date of death, but any remaining balance is taxed as ordinary income. The 20% penalty does not apply to distributions caused by death. For single account holders or anyone planning to leave HSA assets to non-spouse heirs, spending down the HSA on your own qualified medical expenses during your lifetime is generally the better financial move.