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.
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.
| Step | Amount |
|---|
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
- Taxable part = amount taken out − part that paid qualified medical costs
- Income tax = taxable part × your income tax rate
- 20% additional tax = taxable part × 0.20 (only under age 65 and not disabled)
- Left = amount taken out − income tax − 20% additional tax
- 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)
- A 64-year-old takes $2,000 from an HSA for something that is not a qualified medical expense. The tax rate is 22%.
- Income tax: $2,000 × 0.22 = $440. Additional tax: $2,000 × 0.20 = $400.
- Total federal tax: $440 + $400 = $840. Left: $2,000 − $840 = $1,160.
- 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
- Rules come from IRS Publication 969 (2025) and the Instructions for Form 8889 (2025), United States federal rules for 2025 returns.
- The tool applies one income tax rate to the whole taxable part. A larger income can move part of it into a higher bracket. Enter the rate you expect.
- The IRS says the 20% does not apply to withdrawals made after you reach age 65. The tool treats an age of 65 or more as past that line.
- 'Disabled' is not defined in either IRS document. The tool takes your yes or no.
- State income tax, the death rule, mistaken withdrawals and excess contributions are not figured.
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