You don't pay income tax on money you put into an HSA, and you don't pay tax when you withdraw it to pay for medical expenses

This is the core tax advantage of an HSA. When you contribute money to your account — whether through payroll deduction or a direct deposit — that money is not counted as taxable income. When you later withdraw that money to pay for may have access to medical expenses, you pay no income tax on the withdrawal either. This is different from a regular savings account, where you'd pay tax on any interest earned, or a regular checking account funded with after-tax dollars.

The catch is that the tax-free withdrawal only applies to may have access to medical expenses. If you withdraw money for something that doesn't count as a may have access to expense — say, a gym membership or cosmetic surgery — you'll owe income tax on that withdrawal plus a 20% penalty. The IRS publishes a list of what counts, and it's longer than most people expect, but it does have real limits.

Money that stays in your HSA and isn't withdrawn is not taxed at all, even if it earns interest or investment returns. This is why some people treat an HSA as a retirement savings tool: the money can sit there indefinitely, growing tax-free, and you can withdraw it for medical expenses at any point in your life.

Key Takeaways

  • Contributions to an HSA reduce your taxable income, meaning you pay no federal income tax on the money you put in.
  • Withdrawals for may have access to medical expenses are tax-free, but withdrawals for non-may have access to expenses trigger income tax plus a 20% penalty.
  • Money left in your HSA grows tax-free and can be withdrawn for medical expenses years or decades later.
  • If you withdraw HSA funds after age 65 for non-medical reasons, you pay income tax but not the 20% penalty.
  • Your employer may contribute to your HSA, and that employer contribution is also not counted as taxable income to you.

How contributions reduce your taxable income

When you contribute to an HSA through payroll deduction, your employer withholds the money before calculating your income tax. This means the contribution never shows up as wages on your tax return. If you contribute $3,000 in a year and your salary would have been $50,000, you report only $47,000 as taxable income.

If you contribute money directly to an HSA outside of payroll — for example, by writing a check or making a bank transfer — you still get the tax break, but you claim it when you file your tax return. You'll report the contribution on IRS Form 8889, and it reduces your taxable income just as a payroll contribution would.

Your employer can also contribute to your HSA, and that money is not taxable income to you either. Some employers contribute a fixed amount each year; others match a percentage of what you contribute. Either way, the employer contribution lowers your taxable income.

What counts as a may have access to medical expense

may have access to medical expenses include the obvious ones: doctor visits, hospital stays, prescription medications, dental work, and vision care. They also include less obvious things like medical equipment (crutches, wheelchairs, hearing aids), mental health treatment, physical therapy, and even some over-the-counter medications if prescribed by a doctor.

The IRS maintains a detailed list, but here are common expenses that do not count: cosmetic procedures (unless medically necessary), gym memberships, vitamins and supplements (unless prescribed), teeth whitening, and most over-the-counter items unless a doctor has written a prescription for them. Health insurance premiums generally don't count either, with narrow exceptions for COBRA continuation coverage, long-term care insurance, and health insurance while you're receiving unemployment benefits.

If you're unsure whether an expense qualifies, you can ask your HSA provider or check IRS Publication 502, which lists hundreds of specific items. When in doubt, keep the receipt and the doctor's prescription or statement of medical necessity — if the IRS ever questions the withdrawal, you'll need to prove it was for a may have access to expense.

The 20% penalty for non-may have access to withdrawals

If you withdraw money from your HSA for something that isn't a may have access to medical expense, you owe two things: income tax on the withdrawal, plus a 20% penalty on top of that. So if you withdraw $1,000 for a non-may have access to expense and you're in the 22% federal tax bracket, you'd owe $220 in income tax plus $200 in penalty, for a total of $420.

This penalty applies only to the person withdrawing the money, not to the account itself. If you withdraw $1,000 non-may have access to and your spouse also has an HSA, your spouse's account is unaffected. The penalty is reported on IRS Form 8889 when you file your tax return.

The 20% penalty does not explore after age 65. Once you turn 65, you can withdraw money from your HSA for any reason without the penalty — though you'll still owe income tax on non-may have access to withdrawals. This is why some people view an HSA as a retirement account: after 65, it functions much like a traditional IRA, except that withdrawals for medical expenses remain tax-free.

How to report HSA activity on your tax return

You report HSA contributions and withdrawals on IRS Form 8889, which you attach to your Form 1040 when you file. The form asks for the total amount you contributed, the total amount you withdrew, and whether the withdrawals were for may have access to or non-may have access to expenses.

Your HSA provider sends you a Form 5498-SA each January, showing the total contributions made to your account in the previous year (both your contributions and any employer contributions). You use this form to fill out Form 8889. If you made non-may have access to withdrawals, you'll need to calculate the penalty yourself and report it on the form.

If you contributed through payroll deduction, your employer reports that contribution on your W-2 form in Box 12, with code W. This is informational only — it doesn't change how you file, but it helps the IRS track that the contribution was made.

State income tax and HSA contributions

Federal income tax is not the only tax that applies. Most states also tax income, and most states follow the federal rule: HSA contributions reduce your state taxable income, just as they reduce your federal taxable income. However, a few states do not recognize HSAs for state tax purposes, meaning you get the federal tax break but not the state one.

California, New Jersey, and Tennessee do not allow HSA contributions to reduce state taxable income. If you live in one of these states, you'll still get the federal deduction, but you'll owe state income tax on the contribution. This is one reason to check your state's tax rules before opening an HSA, especially if you live in a high-tax state.

Some states also tax the interest or investment earnings inside an HSA, even though the federal government does not. This is rare, but it's worth confirming with your state's tax authority if you plan to invest HSA funds and leave them in the account for many years.

HSA withdrawals and Medicare

Once you enroll in Medicare, you can no longer contribute to an HSA. However, you can continue to withdraw money from an existing HSA for may have access to medical expenses, and those withdrawals remain tax-free. You can also use HSA funds to pay Medicare premiums, which counts as a may have access to expense.

If you withdraw HSA money for non-may have access to expenses after enrolling in Medicare, you still owe income tax and the 20% penalty — the penalty does not disappear just because you're on Medicare. The only exception is after age 65, when the 20% penalty no longer applies to any withdrawal, may have access to or not.

Frequently Asked Questions

Do I have to use my HSA money in the same year I contribute it?

No. HSA funds roll over year to year with no "use it or lose it" rule. You can contribute in 2024 and withdraw for a medical expense in 2030. The money can sit in the account indefinitely, earning interest or investment returns tax-free, until you need it.

What happens if I withdraw HSA money and later find out it wasn't a may have access to expense?

You owe income tax plus the 20% penalty on that withdrawal. You can't undo the withdrawal, but you can report it correctly on your tax return. If you discover the mistake after filing, you can file an amended return (Form 1040-X) to pay the tax and penalty owed.

Can my employer contribute to my HSA without it being taxable income?

Yes. Employer contributions to your HSA are not counted as taxable wages. They reduce your taxable income just like your own contributions do. This is true whether your employer makes a fixed contribution or matches a percentage of what you contribute.

Do I pay taxes on interest earned inside my HSA?

No. Interest, dividends, and investment gains inside an HSA are not taxed at the federal level. Some states may tax this growth, but most do not. This is one reason an HSA can be a powerful long-term savings tool if you don't need to withdraw the money when ready.

What if I'm self-employed — can I still get the tax break on HSA contributions?

Yes. Self-employed people can contribute to an HSA and deduct the contribution on their tax return, just like an employer would. You report the deduction on Form 8889 and your Form 1040. The contribution reduces both your income tax and your self-employment tax.