Your HSA contributions lower your taxable income

Money you put into an HSA is not subject to federal income tax. When you contribute to an HSA through payroll deduction, your employer withholds the contribution before calculating your income tax. This means you pay no federal income tax, no Social Security tax, and no Medicare tax on that money — a benefit you do not get with a regular savings account.

If you contribute outside of payroll (for example, by mailing a check directly to your HSA provider), you deduct the contribution on your tax return using Form 8889. The deduction reduces your adjusted gross income, which lowers the income tax you owe. For 2024, you can contribute up to $4,150 for individual coverage or $8,300 for family coverage; these limits change annually.

This tax break applies only to contributions you make for may have access to medical expenses. If you use HSA money for non-medical purposes, that withdrawal is taxable income plus a 20 percent penalty — with limited exceptions for disability or after age 65.

Key Takeaways

  • HSA contributions reduce your taxable income dollar-for-dollar, lowering the federal income tax you owe that year.
  • Payroll contributions avoid income tax, Social Security tax, and Medicare tax all at once; non-payroll contributions are deducted on your tax return.
  • Money you withdraw for may have access to medical expenses is never taxed, even if it has grown through investment gains.
  • Withdrawals for non-medical purposes are taxable as income plus a 20 percent penalty, except after age 65 or if you become disabled.
  • You must file Form 8889 with your tax return to report HSA contributions and withdrawals.

How investment gains in your HSA are taxed

If your HSA balance grows beyond what you need to spend on medical care in the current year, you can invest the surplus in mutual funds, stocks, or other securities offered by your HSA provider. Any interest, dividends, or capital gains earned on those investments are not taxed while the money stays in the account.

When you withdraw money for a may have access to medical expense, the entire amount — including the investment gains — comes out tax-free. This is different from a regular brokerage account, where you would owe tax on the gains when you sell. The tax-free growth is one of the largest advantages of an HSA over time.

If you withdraw money for a non-medical purpose, you owe income tax on the entire withdrawal, including any gains. The 20 percent penalty applies to the gains as well.

Reporting your HSA on your tax return

You report HSA activity using Form 8889, which you file with your federal tax return. The form asks for the total amount you contributed, the total amount you withdrew, and whether the withdrawals were for may have access to medical expenses or other purposes.

If your employer made contributions through payroll, they report those on your W-2 in box 12 with code W. You do not deduct employer contributions on your tax return — they are already excluded from your taxable income. If you made contributions outside of payroll, you deduct them on Form 8889 and carry the deduction to your Form 1040.

Your HSA provider sends you a statement each year showing contributions and withdrawals. Keep receipts for any medical expenses you paid with HSA funds, even though you do not attach them to your return. The IRS can request them if your return is audited.

The difference between payroll and personal contributions

If you contribute through your employer's payroll, the contribution avoids income tax, Social Security tax, and Medicare tax. This is the most tax-efficient route because you save on all three. Your employer deducts the contribution before calculating your pay, so you never see the money in your paycheck.

If you contribute money you have already earned (for example, from a bonus or a side job), you deduct it on Form 8889 when you file your taxes. This saves you income tax but not Social Security or Medicare tax, because those taxes were already withheld from your paycheck. You still come out ahead compared to using a regular savings account, but the tax savings are smaller.

Some people do both: they contribute through payroll during the year, then make an additional personal contribution before the tax deadline to reach the annual limit. The payroll contribution saves the most tax, so maximize that first if your employer plan allows it.

What counts as a may have access to medical expense

Withdrawals for may have access to medical expenses are never taxed, no matter how much the money has grown in your account. may have access to expenses include deductibles, copayments, coinsurance, and prescription drugs. They also include dental work, vision care, hearing aids, and mental health treatment.

Over-the-counter medications (like pain relievers or cold medicine) count only if you have a prescription from a doctor. Cosmetic procedures, gym memberships, and vitamins do not count unless a doctor prescribes them to treat a specific condition. If you are unsure whether an expense qualifies, ask your HSA provider or check IRS Publication 502.

The key rule: the expense must be for medical care, not for general health or wellness. If you use HSA money for something that does not meet this test, the withdrawal is taxable income plus the 20 percent penalty.

HSA withdrawals after age 65

After you turn 65, the rules change. You can withdraw money from your HSA for any reason without the 20 percent penalty. However, if the withdrawal is not for a may have access to medical expense, you still owe income tax on the amount withdrawn.

This makes an HSA similar to a traditional IRA after age 65 — you can use it for anything, but non-medical withdrawals are taxable. Many people use this feature to let their HSA grow tax-free for decades, then use it as a supplemental retirement account after 65. As long as you withdraw for medical expenses (which most people have plenty of in retirement), you pay no tax.

Frequently Asked Questions

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

No. Unlike a flexible spending account (FSA), an HSA does not have a "use it or lose it" rule. Money you do not spend rolls over to the next year and the year after that, indefinitely. This allows you to build a balance over time and invest it for tax-free growth.

What happens if I withdraw HSA money for something that is not a medical expense?

You owe income tax on the full amount withdrawn, plus a 20 percent penalty. For example, if you withdraw $1,000 for a non-medical expense, you add $1,000 to your taxable income and pay an additional $200 penalty. The exception: after age 65, you owe the income tax but not the penalty.

Can I deduct medical expenses on my tax return if I paid for them with my HSA?

No. If you paid for a medical expense with HSA money, you cannot also deduct it on Schedule A. You get the tax benefit either through the HSA (tax-free withdrawal) or through itemized deductions, but not both. This is why using HSA funds for may have access to expenses is usually the better choice.

Do I owe taxes on money my employer contributes to my HSA?

No. Employer contributions to your HSA are not taxable income to you. They do not appear on your W-2 as wages, and you do not report them on your tax return. You benefit from the contribution without owing any tax on it.

What if I cannot find receipts for medical expenses I paid with my HSA?

You do not need to attach receipts to your tax return. However, keep them for your records in case the IRS audits you. If you cannot produce a receipt, the IRS may disallow the withdrawal and treat it as a non-may have access to withdrawal, which means you would owe income tax and the 20 percent penalty on that amount.