StructureX

Home › Tools

HSA withdrawal tax calculator

This page is for United States, federal rules (IRS); state income tax treatment is not covered

Type how much came out of the HSA and how much of it paid qualified medical costs. Add your age and your federal income tax rate. You get the federal tax and what you keep.

Free tool · IRS Publication 969 and Form 8889 rules · federal only · runs in your browser · Updated 2026-11-28

The part of an HSA withdrawal that paid qualified medical costs is tax-free. The rest is taxed as income, and before age 65 it also gets a 20% additional tax, unless you are disabled. A $2,000 non-medical withdrawal at age 64 with a 22% rate costs $440 plus $400, or $840.

StepAmount

How it works: money that paid qualified medical costs is tax-free. The rest is taxed as income at the rate you type. If you are under 65 and not disabled, the rest also gets a 20% additional tax. At 65, or if disabled, the 20% does not apply. Federal only: state tax is not figured.

The formula

Amount
everything that left the HSA in the year, including debit card spending
Qualified part
the part that paid qualified medical expenses not paid by insurance
Rate
the federal income tax rate you type in, as a percent

Worked example (made-up numbers)

  1. A 64-year-old takes $2,000 from an HSA for something that is not a qualified medical expense. The tax rate is 22%.
  2. Income tax: $2,000 × 0.22 = $440. Additional tax: $2,000 × 0.20 = $400.
  3. Total federal tax: $440 + $400 = $840. Left: $2,000 − $840 = $1,160.
  4. At age 65 the same withdrawal has no 20% part: $440 in tax, $1,560 left.

At 64 the tax is $840. At 65 it is $440.

What this assumes

Questions

What is the HSA penalty for non-medical withdrawals?

A 20% additional federal tax on the part not used for qualified medical costs, plus income tax. The 20% does not apply at 65 or older, or if you are disabled. See HSA withdrawal rules.

Is there a penalty after 65?

No 20% additional tax. A non-medical withdrawal is still taxed as income. See HSA after 65.

Does this include state tax?

No. It is federal only.

What counts as qualified?

Medical care as the tax code defines it, for you, your spouse and your dependents, to the extent insurance did not pay it.

Reminder: this page is for United States, federal rules (IRS); state income tax treatment is not covered

Follow along

XTradingViewFacebook