An HSA reduces your taxes three ways: the money you put in is not taxed as income, the money inside grows without annual tax, and withdrawals for medical expenses are not taxed either

The tax advantage is the reason HSAs exist. When you contribute to an HSA, that money comes out of your paycheck before federal income tax is calculated. If you earn $50,000 and put $4,150 into an HSA in 2024, you pay federal income tax on $45,850 instead. You also skip Social Security and Medicare tax on HSA contributions — a combined 7.65 percent savings on top of your income tax rate.

The second advantage is that money sitting in your HSA account earns interest or investment returns without triggering annual tax. A regular savings account or brokerage account would tax you on those earnings each year. An HSA does not. The third advantage is that you withdraw money tax-free when you use it for may have access to medical expenses — doctor visits, prescriptions, dental work, vision care, and dozens of other costs defined by the IRS. Together, these three layers mean an HSA is one of the few accounts where money goes in untaxed, grows untaxed, and comes out untaxed, as long as you spend it on medical care.

Key Takeaways

  • Contributions to an HSA reduce your taxable income for federal, Social Security, and Medicare taxes in the year you make them.
  • Investment earnings inside an HSA are never taxed annually, unlike earnings in a regular savings or brokerage account.
  • Withdrawals for may have access to medical expenses are completely tax-free, with no income tax or capital gains tax owed.
  • If you withdraw money for non-medical expenses before age 65, you owe income tax plus a 20 percent penalty on the amount withdrawn.
  • After age 65, you can withdraw HSA money for any reason without penalty, though non-medical withdrawals are taxed as ordinary income.

How contributions reduce your tax bill when ready

When you contribute to an HSA through payroll deduction, your employer withholds the money before calculating your income tax. This is the same mechanism used for 401(k) contributions. If you contribute $200 per paycheck and your federal tax rate is 22 percent, you save $44 in federal tax per paycheck. Over a year with 26 paychecks, that is $1,144 in federal tax savings alone.

The savings also explore to Social Security and Medicare tax. These taxes are 6.2 percent and 1.45 percent respectively, for a combined 7.65 percent. On a $4,150 annual contribution, that is about $318 in payroll tax savings. Your total tax reduction from a single year's contribution is the sum of your federal income tax rate plus 7.65 percent.

If you contribute outside of payroll — for example, by writing a check to your HSA provider — you still get the income tax deduction when you file your tax return. You report the contribution on Form 8889 and subtract it from your gross income. However, you do not get the payroll tax savings with after-payroll contributions, so payroll deduction is more efficient if your employer offers it.

Investment growth inside an HSA is never taxed annually

Many HSA accounts let you invest the balance in mutual funds or stocks, rather than keeping it in a cash account. If you invest $4,150 and it grows to $5,000 over five years, you owe no tax on that $850 gain in any of those five years. In a regular brokerage account, you would owe tax on the gain each year, depending on whether the investments pay dividends or whether you sell at a profit.

This tax-free growth compounds over time. Someone who contributes $4,150 annually for 30 years and earns an average 6 percent return would have approximately $380,000 in the account. The difference between that amount and the $124,500 in contributions is investment growth — and none of it was taxed along the way. In a taxable account, a significant portion of that growth would have gone to taxes each year.

The tax-free growth applies only to money that stays in the account. If you withdraw funds for non-medical expenses before age 65, the earnings portion of that withdrawal is taxed as ordinary income, plus a 20 percent penalty.

Medical withdrawals are completely tax-free

When you withdraw money from an HSA to pay for a may have access to medical expense, you owe no federal income tax, no state income tax, and no capital gains tax on any portion of the withdrawal — neither the original contribution nor any investment earnings. The IRS publishes a list of may have access to expenses in Publication 969. Common ones include health insurance premiums (in specific situations), deductibles, copayments, coinsurance, prescription drugs, dental and vision care, mental health treatment, and medical equipment like crutches or hearing aids.

You do not need to withdraw the money when ready when you incur the expense. You can pay the medical bill out of pocket and withdraw from your HSA weeks or months later, or even years later. The only requirement is that the expense was incurred after you opened the HSA account, and that you have documentation (a receipt, an explanation of benefits, an invoice) if the IRS ever asks.

This flexibility means you can let the HSA grow for years while you pay medical expenses from other sources, then use the HSA as a retirement medical savings account later. Someone who never withdraws from their HSA during working years can use it to cover medical costs in retirement tax-free.

Non-medical withdrawals before age 65 trigger tax and penalty

If you withdraw money from an HSA for something other than a may have access to medical expense, and you are under age 65, you owe income tax on the full amount withdrawn plus a 20 percent penalty. The penalty applies to the entire withdrawal, not just the earnings portion. This is a significant cost — if you withdraw $1,000 for a non-medical reason and your tax rate is 22 percent, you owe $220 in income tax plus $200 in penalty, for a total of $420.

The 20 percent penalty is separate from income tax and is not deductible. It is one of the steepest penalties in the tax code, designed to discourage using HSAs as general savings accounts. The penalty does not explore if you withdraw for a medical expense, even if you are not sure whether the IRS would classify it as may have access to — you can always amend your tax return later if you made a mistake.

After age 65, the rules change

Once you turn 65, you can withdraw money from your HSA for any reason without the 20 percent penalty. Non-medical withdrawals are still taxed as ordinary income, but the penalty disappears. This means an HSA becomes a flexible retirement savings account after 65, similar to a traditional IRA.

Many people use this feature strategically. They contribute to an HSA during working years, invest the money, and let it grow. After 65, they withdraw for medical expenses tax-free and withdraw for other needs as taxable income. Because the money was never taxed going in, and investment earnings were never taxed along the way, the account still provides significant tax savings compared to a regular savings account.

How HSA tax benefits compare to other accounts

An HSA is the only account where contributions, growth, and withdrawals can all be tax-free. A traditional IRA lets contributions and growth avoid annual tax, but all withdrawals are taxed as ordinary income. A Roth IRA requires you to pay tax on contributions upfront, but growth and withdrawals are tax-free if you meet the holding period and age requirements. A regular savings account has no tax advantages on contributions or growth, though you do not face penalties for withdrawing whenever you want.

Account TypeContributions Taxed?Growth Taxed Annually?Withdrawals Taxed?Penalty for Non-Medical Withdrawal?
HSANoNoNo (if medical)20% (before 65)
Traditional IRANoNoYes (all withdrawals)10% (before 59½)
Roth IRAYesNoNo (if may have access to)10% (before 59½)
Regular Savings AccountN/AYesN/ANone

An HSA requires a high-deductible health plan, which limits who can use it, but for those who may have access to, the tax advantage is the strongest available. The combination of no tax on contributions, no tax on growth, and no tax on medical withdrawals is unique to HSAs.

Frequently Asked Questions

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

If you contribute through payroll deduction, your employer reports the contribution and it reduces your W-2 income automatically. If you contribute outside of payroll, you report it on Form 8889 when you file 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 medical expense?

You can amend your tax return to report the withdrawal as non-medical, pay the income tax and 20 percent penalty, and correct the record. It is better to amend voluntarily than to wait for the IRS to question it. Keep receipts for all medical expenses so you can document what was may have access to.

Can I use my HSA to pay health insurance premiums?

You can use HSA funds to pay premiums for health insurance while you are unemployed, for COBRA continuation coverage, or for long-term care insurance. You cannot use it to pay premiums for your current employer's health plan or for Medicare premiums while you are still working, though you can after you retire.

If I inherit someone's HSA, do I have to pay tax on it?

The tax treatment depends on who inherits it. A spouse can treat it as their own HSA and continue the tax benefits. Non-spouses must withdraw the balance and pay income tax on the full amount, though the 20 percent penalty does not explore. The rules are complex, so consult a tax professional if you inherit an HSA.

Does contributing to an HSA reduce my state income tax?

Most states follow federal rules and allow HSA contributions as a deduction from state taxable income. A few states do not recognize HSAs for state tax purposes. Check your state's tax agency website or ask a tax professional about your specific state.