Are HSAs Tax Free? Contributions, Growth, and Withdrawals

Yes, Health Savings Accounts are tax-free at the federal level in three separate ways: the money you put in isn’t taxed, the balance grows without tax, and withdrawals for qualified medical expenses come out tax-free. That triple benefit is unusual, and it holds only while you follow the rules on eligibility, contribution limits, and how the funds get spent. Break a rule and part of the account becomes taxable, sometimes with an added penalty on top.

The Three Tax-Free Stages

Contributions Go In Pre-Tax or Deductible

How your contribution avoids tax depends on how the money reaches the account. If your employer runs HSA contributions through a cafeteria plan, the money leaves your paycheck before federal income tax, Social Security tax, or Medicare tax is calculated. Nothing about that contribution shows up in your gross income.

If you contribute on your own by transferring money to your HSA custodian, you don’t get the payroll-tax break, but you can deduct the contribution on your federal return as an above-the-line adjustment on Schedule 1 of Form 1040. That lowers your adjusted gross income whether or not you itemize.

Either route gets you a federal income tax deduction on the way in. Only the payroll route also avoids Social Security and Medicare taxes.

Growth Inside the Account Is Not Taxed

Once the money is in the HSA, interest, dividends, and investment gains accumulate without a yearly tax bill. A regular brokerage account owes tax on realized capital gains and dividends each year; an HSA doesn’t, as long as the funds stay in the account. That absence of a yearly tax drag is what makes an HSA compound so effectively over long periods.

Qualified Medical Withdrawals Come Out Tax-Free

Withdrawals used for qualified medical expenses are free of federal income tax and free of any penalty. The IRS defines qualified expenses broadly: diagnosis, treatment, and prevention of disease, along with transportation essential to medical care, long-term care services, and certain insurance premiums. Doctor and dentist visits, prescription medications, vision care, mental health services, and durable medical equipment are all covered.

Since the CARES Act, over-the-counter medications qualify without a prescription. Menstrual care products (tampons, pads, liners, and cups) qualify too.

There is no deadline to reimburse yourself. As long as the expense happened after your HSA was established, you can pay out of pocket now and pull tax-free reimbursement from the HSA years or decades later. The tradeoff is recordkeeping: you need to keep receipts for as long as you might eventually claim the reimbursement.

When HSA Money Is Taxed After All

The tax-free treatment is not automatic. Several situations pull HSA funds back into taxable income, sometimes with a penalty added.

Non-Qualified Withdrawals

If you spend HSA funds on anything other than qualified medical expenses, the amount is added to your gross income for the year and taxed at your ordinary rate, which runs from 10% to 37% depending on your bracket. The IRS then adds a 20% additional tax on top.

That 20% penalty has three exceptions. It does not apply to distributions made after the account holder turns 65, becomes disabled, or dies. After age 65 you can withdraw HSA funds for any purpose and owe only ordinary income tax, with no extra penalty. Medical withdrawals stay fully tax-free at any age.

Excess Contributions

Contributing more than the annual limit triggers a 6% excise tax on the excess for every year it stays in the account. You can avoid the penalty by withdrawing the excess, along with any earnings on it, before your tax return is due for the year of the over-contribution.

Prohibited Transactions

Certain actions strip the account of its HSA status entirely. Pledging your HSA as collateral for a loan is the clearest example. When the account ceases to be an HSA, the full fair market value is treated as a non-medical distribution: the whole balance becomes taxable income, and the 20% additional tax applies if you are under 65. Using the account only to hold and invest funds for medical expenses, and never as security for a debt, avoids this outcome.

Inheritance by Someone Other Than a Spouse

What happens at death depends on who inherits. A surviving spouse named as beneficiary simply takes over the HSA as their own, with the tax treatment unchanged. A non-spouse beneficiary is in a very different position: the account stops being an HSA on the date of death, and the full fair market value becomes taxable income to the beneficiary in that year. The taxable amount is reduced by any of the deceased’s qualified medical expenses that the beneficiary pays within one year after the date of death. If the estate is the beneficiary, the fair market value goes on the decedent’s final income tax return.

State Taxes Are a Separate Question

Most states follow the federal treatment, so contributions are deductible and growth is tax-free at the state level as well. A small number of states do not conform. California and New Jersey tax HSA contributions and earnings at the state level even though the federal treatment stays favorable. If you live in a non-conforming state, your HSA is tax-free federally but not fully tax-free in practice. Check your state’s rules before assuming otherwise.

Eligibility Is the Precondition

All of the tax-free treatment above depends on being eligible to have and contribute to an HSA in the first place. On the first day of any month you contribute, you need to be enrolled in a qualifying high-deductible health plan, have no disqualifying secondary coverage (general-purpose FSAs and most HRAs count as disqualifying), not be enrolled in any part of Medicare, and not be claimed as a dependent on someone else’s return. Enrolling in Medicare drops your contribution limit to zero starting that month, even if the enrollment is retroactive.

The IRS checks eligibility month by month. Losing eligibility partway through the year prorates your contribution limit to the months you qualified. Contributions made while ineligible become excess contributions and run into the 6% excise tax described above.

Starting January 1, 2026, the One, Big, Beautiful Bill Act expanded HSA eligibility. Bronze-level and catastrophic health plans are treated as HSA-compatible whether purchased through the Marketplace or directly from an insurer. People enrolled in direct primary care arrangements can now contribute to an HSA and pay periodic membership fees from it tax-free. The rule allowing pre-deductible telehealth services without loss of HSA eligibility was made permanent.

An HSA delivers three layers of federal tax protection when you stay inside the rules. Step outside them, whether by overfunding, spending on non-medical items before 65, pledging the account, or leaving it to a non-spouse, and the tax bill returns, often with a penalty. The account is tax-free by design, not by default.