Money in your HSA is tax-free when you use it for medical expenses, but taxable if you withdraw it for anything else

An HSA itself is not taxable — the account is a tax shelter. But what happens inside it depends on how you use the money. Contributions you make go in tax-free. The money grows tax-free. When you pull it out to pay a doctor, pharmacy, or may have access to medical bill, that withdrawal is tax-free. If you withdraw it for groceries, rent, or any non-medical reason, that withdrawal is taxable income, and you also owe a 20 percent penalty on top of the income tax — unless you are over 65, disabled, or covered by Medicare.

The taxable part is straightforward: it is the withdrawal itself, not the account balance. The IRS taxes you only on money that leaves the account for non-medical use. Money that stays in the account, even for decades, generates no tax bill.

Key Takeaways

  • Contributions to your HSA are tax-deductible, growth is tax-free, and withdrawals for may have access to medical expenses are tax-free — this three-part tax shelter is the core benefit.
  • Non-medical withdrawals are taxed as ordinary income plus a 20 percent penalty, except after age 65, when the penalty disappears but income tax remains.
  • The IRS defines may have access to medical expenses narrowly: they include doctor visits, prescriptions, and dental work, but not health insurance premiums (with limited exceptions) or over-the-counter items without a prescription.
  • You do not report HSA withdrawals on your tax return unless they are non-medical; medical withdrawals leave no tax trace.
  • If you withdraw money for a non-medical reason by mistake, you can put it back within 60 days and avoid the tax and penalty.

How the three-part tax shelter works

An HSA has three tax advantages stacked together. First, money going in is deductible — if you contribute $4,000 in a year, you reduce your taxable income by $4,000. Second, any interest, dividends, or investment gains inside the account are never taxed, no matter how long the money sits there. Third, money coming out for medical expenses is not taxed.

This is different from a regular savings account, where interest is taxed every year, or a regular investment account, where capital gains are taxed when you sell. An HSA is the only account that offers all three shields at once. The trade-off is that you can only use it for medical expenses — step outside that boundary and the tax shelter collapses.

What counts as a may have access to medical expense

The IRS maintains a list of may have access to medical expenses, and it is narrower than most people assume. may have access to expenses include doctor visits, hospital stays, surgery, prescription medications, dental work, vision care, mental health treatment, and medical equipment like crutches or wheelchairs. They also include health insurance premiums if you are receiving unemployment benefits, or if you are retired and over 65.

Expenses that do not may have access to include over-the-counter medications without a prescription (like ibuprofen or cold medicine), cosmetic procedures, gym memberships, vitamins, and most health insurance premiums while you are working. You cannot use HSA money to pay your regular health insurance premium, your deductible, or your copay — wait, that is wrong. You can use it for copays and deductibles. You cannot use it for the monthly premium itself unless you fall into one of the exceptions above.

If you are unsure whether a specific expense qualifies, the IRS publishes a full list on its website, and your HSA provider can usually answer the question in one call.

Non-medical withdrawals and the 20 percent penalty

If you withdraw money from your HSA for a reason that is not a may have access to medical expense, two things happen: the withdrawal is taxed as ordinary income at your regular tax rate, and you owe an additional 20 percent penalty on top. So if you withdraw $1,000 for a non-medical reason and your tax bracket is 22 percent, you owe $220 in income tax plus $200 in penalty, for a total of $420. The account loses $1,000, but you only keep $580.

The 20 percent penalty applies to the amount withdrawn, not to the tax owed. It is a flat surcharge on the withdrawal itself. This penalty is one of the harshest in the tax code — it is steeper than the early withdrawal penalty on a 401(k) or IRA, which is 10 percent.

The penalty disappears after you turn 65. At that point, non-medical withdrawals are still taxed as income, but the 20 percent penalty no longer applies. This is why an HSA can function as a retirement account if you do not use it for medical expenses while you are working — you can let it grow for decades and then withdraw it penalty-free after 65, paying only income tax on the non-medical portion.

How to report HSA activity on your tax return

If all your HSA withdrawals are for may have access to medical expenses, you do not report them on your tax return at all. The withdrawal is tax-free and leaves no trace. Your HSA provider sends you a Form 1099-SA at the end of the year showing total distributions, but if those distributions match your may have access to medical expenses, you do not owe any tax.

If you make a non-medical withdrawal, you report it on Form 8889, which is the HSA tax form. Line 21 of Form 8889 asks for the amount of non-medical distributions. You enter the amount, calculate the tax and penalty, and add both to your total tax bill. The penalty is not deductible — you cannot reduce it by claiming a medical expense elsewhere on your return.

If your HSA provider made an error and sent you a 1099-SA showing a distribution that was actually medical, you can file an amended return or attach a statement to your return explaining the correction. Keep receipts and documentation for all medical expenses you paid from the HSA, in case the IRS asks.

The 60-day correction window

If you withdraw money from your HSA for a non-medical reason by mistake, you have 60 days to put it back. This is called a rollover, and if you complete it within the window, the withdrawal is treated as if it never happened — no tax, no penalty. The money goes back into the HSA, and the transaction disappears from your tax record.

The 60-day clock starts the day you receive the money. If you withdraw $2,000 on March 15 and deposit it back into your HSA by May 14, you are safe. If you deposit it on May 15, the 60 days have passed and the withdrawal is taxable. You can only do one rollover per HSA per year, so use this window carefully if you have multiple HSAs.

To execute the rollover, contact your HSA provider and tell them you want to return a non-may have access to distribution. They will give you instructions — usually you wire or mail a check back to the HSA. Do not just transfer the money to your checking account and hope it works; the provider needs to process it as a rollover on their end for the IRS to recognize it.

HSA growth and investment gains are never taxed

If you invest the money in your HSA — in stocks, bonds, or mutual funds — any gains are tax-free as long as you eventually use the money for medical expenses. If you buy $5,000 worth of stock inside your HSA and it grows to $8,000, that $3,000 gain is never taxed. When you withdraw the $8,000 to pay a medical bill, the entire amount is tax-free.

This is a major advantage over a regular brokerage account, where you would owe capital gains tax on the $3,000 profit. Over decades, this tax-free growth can turn an HSA into a substantial medical fund. Some people treat their HSA as a retirement account specifically because of this feature — they contribute the maximum every year, invest it aggressively, and let it compound for 20 or 30 years before touching it.

Medicare and Social Security do not affect HSA tax treatment

Once you enroll in Medicare, you can no longer contribute to an HSA — Medicare enrollment and HSA may be able to access are mutually exclusive. But money already in your HSA remains tax-free for medical expenses, and the 20 percent penalty on non-medical withdrawals disappears. You can withdraw money for any reason after 65 and pay only income tax, no penalty.

Social Security benefits do not affect HSA taxation. Withdrawals from your HSA are not counted as income for the purpose of determining whether your Social Security is taxable. This is one of the few tax-advantaged accounts where this is true — traditional IRA withdrawals, for example, do count toward the Social Security tax calculation.

Frequently Asked Questions

Do I have to report my HSA contributions on my tax return?

If your employer deducts HSA contributions from your paycheck before taxes, they are already deducted and you do not report them. If you contribute on your own, you deduct them on Form 8889 when you file. Either way, the contribution itself is not taxable income — it reduces your taxable income.

What happens if I use my HSA debit card for something that is not medical?

The transaction is treated as a non-medical withdrawal and is taxable plus subject to the 20 percent penalty. You have 60 days to reverse it by redepositing the money. If you do not reverse it, you report it on Form 8889 when you file your taxes.

Can I withdraw money from my HSA to pay my health insurance deductible?

Yes. Deductibles are may have access to medical expenses. You can use HSA money to pay your deductible, copays, and coinsurance. You cannot use it to pay your monthly insurance premium unless you are over 65, retired, or receiving unemployment benefits.

Is the interest my HSA earns taxable?

No. Interest, dividends, and investment gains inside an HSA are never taxed, whether you withdraw the money or leave it in the account. This tax-free growth is one of the core benefits of an HSA.

What if I die with money still in my HSA?

If your beneficiary is your spouse, they can treat the HSA as their own and continue using it tax-free for medical expenses. If your beneficiary is anyone else, the balance becomes taxable income to them in the year of your death, with no medical expense exception — they cannot use the money tax-free even if they spend it on medical bills.