Health savings accounts receive a triple tax advantage: contributions are generally tax-deductible, investment growth inside the account is tax-free, and withdrawals used for qualified medical expenses are tax-free. That combination is the direct answer, but it is accurate only when the account is used as the law intends—paired with a qualifying high-deductible health plan and spent on qualified medical expenses. The moment money leaves the qualified path or the account no longer qualifies, the tax treatment changes, sometimes sharply. This article explains how each stage of an HSA is taxed, where the rules bend, and what commonly causes people to misunderstand their own tax situation.
The Three Tax Benefits, Stage by Stage
An HSA passes through three tax events, and each receives favorable treatment if the rules are followed.
Contributions. Money you contribute to an HSA is generally deductible from federal income tax, even if you do not itemize. Many people contribute through payroll deduction, in which case the contribution is typically excluded from federal income tax and, in most cases, from Social Security and Medicare taxes as well. If you contribute directly to the account with after-tax dollars, you claim the deduction on your federal tax return.
Growth. Interest, dividends, and capital gains earned inside the HSA are not taxed while they stay in the account. There is no annual tax on the account's investment returns. Over a long horizon, this is the feature that makes the HSA resemble a tax-free retirement account more than a typical savings account.
Withdrawals. Distributions used to pay qualified medical expenses are excluded from income and not subject to penalty. This is why the account is described as triple tax-advantaged: tax relief on the way in, no tax on growth, and no tax on the way out for medical costs.
Two qualifications matter. First, the contribution deduction has an annual limit, and the limit depends on whether you have self-only or family coverage and on your age. Second, the favorable treatment depends on the account being used for its intended purpose; the rules for non-medical withdrawals are the ones people most often get wrong.
You Must Have a Qualifying High-Deductible Health Plan
An HSA is not available to everyone with a desire to save tax-efficiently. To contribute, you must be covered by a qualifying high-deductible health plan and generally must not have other disqualifying health coverage. The high-deductible plan must meet minimum deductible and maximum out-of-pocket thresholds that the IRS adjusts periodically. Because those thresholds change, the specific dollar figures should be checked against the current year's IRS guidance rather than assumed.
This is a structural condition, not a formality. Contributions made when you are not an eligible individual are excess contributions, subject to excise tax unless corrected. The most common source of trouble is other coverage: a general-purpose health flexible spending arrangement or a traditional low-deductible plan alongside the HSA can disqualify contributions. Some limited-purpose arrangements, such as certain dental and vision plans, are compatible. The details are technical, and the classification of a given plan is worth confirming with the plan documents rather than guessing.
For readers who want to inspect the current official thresholds, the annual IRS revenue procedure that sets HSA limits is the authoritative source, and the IRS page on health savings accounts and other tax-favored health plans explains the eligibility framework and the treatment of distributions.
What Counts as a Qualified Medical Expense
A withdrawal is tax-free only if it pays a qualified medical expense, as defined under the Internal Revenue Code and interpreted by the IRS. The definition is broader than many people expect but narrower than "anything health-related." It generally includes costs for diagnosis, cure, mitigation, treatment, or prevention of disease, and for treatments affecting a structure or function of the body. Common examples include doctor visits, hospital care, prescription drugs, dental care, vision care, and certain medical equipment. Premiums for the high-deductible plan itself are generally not qualified expenses for HSA withdrawals, with limited exceptions such as premiums for certain continuation coverage and long-term care insurance up to a limit.
The tax consequence of spending on a non-qualified expense is the part readers most need to understand. A distribution that is not used for a qualified medical expense is included in your gross income and, if you are under 65, is also subject to an additional 20 percent tax. So a non-medical withdrawal is not merely "taxed like ordinary income"—it is taxed like ordinary income plus a penalty. That penalty is the mechanism Congress uses to keep the triple benefit tied to medical spending.
Recordkeeping matters here. The IRS does not require you to submit receipts with your return, but you must be able to substantiate that distributions were used for qualified expenses. Commingling HSA money with other funds and failing to keep documentation is a practical tax risk even when the spending was legitimate.
What Happens if You Withdraw for Non-Medical Purposes
Non-medical withdrawals deserve their own explanation because the outcome depends on age.
If you are under 65 and take a distribution for a non-qualified purpose, the amount is taxable income and generally subject to the 20 percent additional tax. If you are 65 or older, the additional 20 percent tax no longer applies, but the distribution is still taxable income unless it was used for a qualified medical expense. In other words, after 65 the HSA behaves somewhat like a traditional individual retirement account for non-medical withdrawals: ordinary income tax, no penalty. The tax-free treatment for qualified medical expenses continues at any age.
This age-based distinction is a frequent source of confusion. People sometimes conclude that after 65 "everything is tax-free," which is wrong, or that the account somehow loses its medical purpose at 65, which is also wrong. Qualified medical withdrawals remain tax-free; the penalty simply stops applying to non-qualified ones.
The HSA's Special Treatment at Death
The tax treatment of an HSA after the account holder dies depends on who inherits it, and the difference is large enough to affect estate planning. If a spouse is the designated beneficiary, the spouse generally treats the HSA as their own, preserving its tax advantages. If a non-spouse beneficiary inherits the account, the account generally ceases to be an HSA, and the fair market value becomes taxable income to that beneficiary in the year of death, subject to certain adjustments for qualified expenses paid within a year of death. This is a meaningful difference from inheriting an IRA, and it is one reason some account holders review beneficiary designations as part of broader planning.
Because estate treatment interacts with other documents, it is an area where individualized advice matters more than a general article can supply.
Common Misunderstandings and Their Corrections
Several recurring beliefs cause real tax errors.
"Any health-related purchase is qualified." Not necessarily. Over-the-counter medicines generally require a prescription to be treated as qualified, and general health and wellness items are often excluded. The qualified-expense definition governs, not the marketing of the product.
"I can contribute whenever I want." Contributions are tied to eligibility during the year, and excess contributions carry tax consequences. Timing and eligibility must match.
"The account is only for medical bills." The funds can be invested and carried forward indefinitely, which is a central reason HSAs are used as long-term savings vehicles. Unused balances are not forfeited.
"Non-medical withdrawals are just ordinary income." Before 65, they carry the additional 20 percent tax as well.
"My employer's contribution is not taxable." Employer contributions are generally excluded from your income and count toward your annual limit, so they affect how much you can contribute yourself. The exclusion is favorable, but the limit interaction is easy to overlook.
How HSAs Differ from FSAs and Other Accounts
The comparison that clarifies HSA taxation most is with the flexible spending account. An FSA also allows pre-tax contributions, but it is generally use-it-or-lose-it within the plan year or a short grace period, and it is tied to employment. An HSA is portable, carries a balance forward, and can be invested. The tax advantage is similar at the contribution stage, but the HSA's long-term, tax-free growth and rollover features make its overall tax profile different.
Compared with a traditional IRA, the HSA is more favorable for medical spending because qualified withdrawals are not taxed at all, whereas IRA withdrawals are taxed as ordinary income. Compared with a Roth IRA, the HSA is more favorable for medical spending but less flexible for non-medical spending before 65, when the additional tax applies. The right comparison depends on what the money is for.
| Feature | HSA | Traditional IRA | Roth IRA |
|---|---|---|---|
| Contribution tax treatment | Generally deductible or pre-tax | Generally deductible | After-tax |
| Growth | Tax-free while in account | Tax-deferred | Tax-free |
| Qualified medical withdrawals | Tax-free | Taxable | Tax-free (as qualified distribution) |
| Non-medical withdrawals before 65 | Taxable plus 20% additional tax | Taxable plus 10% penalty (with exceptions) | Contributions generally accessible; earnings may be taxable |
State Tax Treatment Can Differ
The federal treatment is the one most people mean when they ask how health savings accounts are taxed, but state income tax can diverge. Most states follow the federal treatment of HSA contributions and distributions, but not all do. A notable exception is California, which has historically not conformed to the federal HSA deduction and taxes HSA investment earnings at the state level. New Jersey has also differed in certain respects. Because state conformity can change, residents of states with non-conforming rules should verify their own state's treatment rather than assume the federal answer applies.
This is a genuine jurisdictional distinction, not a minor footnote. Someone who lives in a conforming state and moves to a non-conforming one, or vice versa, may see their state tax picture change even though nothing about the account changed.
Practical Recordkeeping and Reporting
HSA contributions and distributions are reported to the IRS on Form 1099-SA and related forms, and the account holder is responsible for determining whether a distribution was qualified. The tax software or preparer will ask about distributions; the accuracy of the answer depends on the account holder's records. Keeping receipts, explanations of benefits, and records of non-medical withdrawals is the practical safeguard. Excess contributions should be corrected in the manner the IRS prescribes, including removing the excess and any related earnings, to avoid the excise tax.
A simple habit prevents most problems: treat the HSA like a dedicated medical account even if it is invested, and document each distribution at the time it happens rather than reconstructing it at tax time.
The Bottom Line
Health savings accounts are taxed favorably at all three stages—contributions, growth, and qualified withdrawals—provided the account holder maintains eligibility under a high-deductible health plan and uses distributions for qualified medical expenses. The favorable treatment is conditional, not unconditional. Non-qualified withdrawals before 65 are taxed as income plus a 20 percent additional tax; after 65 the penalty disappears but ordinary income tax remains. State treatment can differ from federal, and beneficiary designations affect what heirs owe. The account rewards disciplined, documented medical spending and long-term investing, and it penalizes casual use as a general-purpose account.
This article provides general educational information about federal tax treatment and is not tax, legal, or financial advice. HSA eligibility, contribution limits, qualified expense definitions, and state conformity can change and depend on individual circumstances; consult a qualified tax professional or the IRS for guidance specific to your situation.