The three-layer tax advantage of HSAs
An HSA gets three separate tax breaks that stack on top of each other. Money you put in is not subject to federal income tax. The money grows inside the account without triggering capital gains tax. And when you withdraw it to pay for may have access to medical expenses, that withdrawal is also tax-free. No other savings account—not a 401(k), not a Roth IRA—offers all three at once.
The catch is that this tax treatment only applies if you follow the rules. Withdraw money for something other than a may have access to medical expense before age 65, and you pay income tax on the withdrawal plus a 20 percent penalty. After 65, the penalty goes away, but you still owe income tax on non-medical withdrawals. Understanding which expenses may have access to and when you can withdraw matters because the IRS enforces these rules.
Key Takeaways
- Contributions to an HSA reduce your taxable income in the year you make them, whether you contribute through payroll or directly to the account.
- Investment gains inside the HSA—interest, dividends, capital gains—are never taxed, even when you sell an investment at a profit.
- Withdrawals for may have access to medical expenses are tax-free at any age, but non-medical withdrawals before 65 trigger both income tax and a 20 percent penalty.
- After age 65, you can withdraw money for any reason without the 20 percent penalty, though non-medical withdrawals are taxed as ordinary income.
- The IRS publishes a list of may have access to expenses; common ones include insurance premiums, copays, deductibles, and prescriptions, but not cosmetic procedures or most over-the-counter items.
How contributions reduce your tax bill
When you contribute to an HSA, that money comes off the top of your taxable income. If you earn $60,000 and contribute $4,150 to an HSA in 2024, the IRS treats your taxable income as $55,850. This works the same way whether you contribute through payroll deduction (which is the most common route) or by depositing money directly into the account yourself.
The tax savings depend on your tax bracket. Someone in the 22 percent federal bracket saves $912.30 in federal tax on a $4,150 contribution. Add state income tax—which varies by state—and the savings grow. This is why HSAs are sometimes called "triple tax-advantaged": the contribution itself is tax-deductible, the growth is tax-free, and may have access to withdrawals are tax-free.
If you contribute through payroll, your employer withholds the HSA contribution before calculating your federal income tax, Social Security tax, and Medicare tax. This means the contribution also reduces the amount of payroll tax you owe, which is a benefit you do not get with a traditional IRA or 401(k) if you contribute directly rather than through payroll.
Investment growth inside the account is never taxed
Once money is in the HSA, you can invest it in stocks, bonds, mutual funds, or money market accounts. Any gains—dividends, interest, capital appreciation—accumulate tax-free. If you buy a mutual fund for $5,000 and it grows to $7,200, you owe no tax on that $2,200 gain, even if you sell the fund and move the money to a different investment.
This is different from a taxable brokerage account, where you would owe capital gains tax on the $2,200 profit. It is also different from a traditional savings account at a bank, where interest is taxed as ordinary income each year. The HSA shelters all of this growth from taxation as long as the money stays in the account.
Many people treat HSAs as savings accounts and keep the balance in cash or a money market fund. But if you have the financial cushion to cover medical expenses out of pocket and let the HSA grow, the tax-free investment gains compound over decades. Someone who contributes the maximum for 30 years and achieves a 6 percent annual return will see the account grow to roughly double what contributions alone would produce—and none of that growth is taxed.
may have access to medical expenses are withdrawn tax-free
The IRS maintains a list of may have access to medical expenses. These include insurance premiums (for Medicare, long-term care, and health insurance if you are unemployed), copays, coinsurance, deductibles, prescription drugs, dental work, vision care, mental health treatment, and medical equipment like crutches or hearing aids. When you withdraw HSA money to pay for any of these, the withdrawal is not taxed and does not count toward your income.
Some expenses that sound medical are not on the list. Over-the-counter medications like ibuprofen or cold medicine do not may have access to unless they are prescribed by a doctor. Cosmetic procedures do not may have access to unless they treat an injury or disfigurement. Gym memberships and general wellness programs do not may have access to, even if your doctor recommends exercise. The IRS publishes Publication 502, which lists hundreds of specific expenses; if you are unsure, that document is the authoritative source.
You do not have to withdraw the money in the same year you incur the expense. You can pay a medical bill out of pocket in 2024, keep the receipt, and withdraw the money from your HSA in 2027. This flexibility lets you use the HSA as a long-term medical savings vehicle rather than a year-to-year spending account.
Non-medical withdrawals before 65 carry a penalty
If you withdraw money from an HSA for something other than a may have access to medical expense before you turn 65, you owe federal income tax on the withdrawal plus a 20 percent penalty. The penalty is separate from the tax. If you withdraw $1,000 for a non-medical expense and you are in the 22 percent tax bracket, you owe $220 in income tax plus $200 in penalty, for a total of $420.
This penalty is one of the strictest in the tax code. It applies even if you have a good reason—job loss, emergency, change in circumstances. The only exceptions are if you become disabled or die (in which case your beneficiary can withdraw without penalty). Otherwise, the 20 percent penalty applies.
State income tax also applies to non-medical withdrawals in most states. Some states do not tax HSA withdrawals at all, but most treat them like any other income. This means the true cost of a non-medical withdrawal can be 30 to 40 percent or more, depending on your tax bracket and state.
What changes after you turn 65
At age 65, the 20 percent penalty disappears. You can withdraw money from your HSA for any reason—medical or not—and you will not owe the penalty. You will still owe federal income tax (and state income tax in most states) on non-medical withdrawals, but the penalty is gone.
This is why HSAs are sometimes called "better than IRAs" for people who can afford to save. A traditional IRA requires you to withdraw money starting at age 73, and those withdrawals are taxed. An HSA has no required withdrawal age. If you do not need the money, it can sit there and grow tax-free for the rest of your life. When you do withdraw it after 65, you can use it for medical expenses tax-free, or for anything else and pay only income tax—the same tax treatment as a traditional IRA.
Employer contributions and the tax treatment of HSA funds
If your employer contributes to your HSA, that contribution is not counted as taxable income to you. It reduces your taxable wages just like your own contribution does. This is one reason employers offer HSAs: they can contribute to the account and reduce their payroll tax liability while giving employees a tax-free benefit.
Some employers contribute a fixed amount each year. Others contribute a percentage of the employee's contribution, similar to a 401(k) match. Either way, the employer contribution is tax-free to you and does not count toward the annual contribution limit. If your employer contributes $2,000 and you contribute $2,150, you have used $4,150 of the $4,150 individual limit for 2024, but the $2,000 from your employer does not count against that limit.
Frequently Asked Questions
Do I have to report my HSA on my tax return?
If you contribute through payroll, your employer reports the contribution on your W-2 in Box 12 with code W. You do not have to report it again on your tax return; the IRS already knows about it. If you contribute directly to the account, you report the contribution on Form 8889 and attach it to your tax return. Either way, the contribution reduces your taxable income.
What happens if I withdraw money and later realize it was not a may have access to expense?
You owe income tax and the 20 percent penalty on that withdrawal. There is no grace period or way to correct it after the fact. The best approach is to keep receipts for all medical expenses and verify they are on the IRS list before withdrawing. If you are unsure, Publication 502 has the definitive answer.
Can I use my HSA to pay for my spouse's medical expenses?
Yes. You can withdraw HSA money to pay for may have access to medical expenses of your spouse or any dependent you claim on your tax return, even if they are not covered under your health plan. The expense must still be on the IRS list of may have access to expenses.
Does the HSA contribution limit include money my employer contributes?
No. The annual limit is the total you and your employer can contribute combined. For 2024, the individual limit is $4,150 and the family limit is $8,300. If your employer contributes $1,500, you can contribute up to $2,650 more without exceeding the limit. Any contribution above the limit is taxed and penalized.
If I do not use my HSA money in a given year, do I lose it?
No. HSA money rolls over year to year with no limit on how much you can accumulate. This is different from a Flexible Spending Account (FSA), which has a "use it or lose it" rule. The HSA is designed to let you build a long-term medical savings fund.