Home › HSA Calculator › How an HSA Works
How an HSA Works
An HSA is the only account with three tax breaks: deductible in, tax-free growth, tax-free out for medical care. The price is a high deductible plan.
Filed November 22, 2026 · figures checked against 2026 sources
The short answer
A health savings account is the only account in the tax code with three tax breaks at once. Contributions are deductible from income tax. Growth inside the account is tax-free. Withdrawals for qualified medical expenses are tax-free. No other account does all three: a 401(k) gives you the deduction and taxes the withdrawal, a Roth IRA gives you the tax-free withdrawal and taxes the contribution, and a regular brokerage account taxes both the growth and the withdrawal. The HSA is the only account where money can go in untaxed, grow untaxed, and come out untaxed, and the price of admission is a high deductible health plan. For 2026 the contribution limit is $4,400 with self-only coverage and $8,750 with family coverage, plus a $1,000 catch-up for each spouse age 55 or older, under IRS Revenue Procedure 2025-19.
This article works the account in order: the three breaks with the arithmetic, who can open one, how the monthly eligibility test works, what the money can pay for, what happens at 65, and what happens to the money you never spend.
The three breaks, with the arithmetic
The first break is the deduction. Contributions to an HSA are deductible from federal income tax, whether you itemize or not, and they also reduce state income tax in most states. On the defaults on this site's calculator, $4,000 of contributions at a 22 percent marginal rate saves $880 of income tax. The saving scales with the bracket: $8,750 of family contributions saves $1,050 at 12 percent, $1,925 at 22 percent, and $2,100 at 24 percent. The second break is available only when the money goes in through payroll: contributions made through a cafeteria plan also skip the 7.65 percent FICA tax, Social Security at 6.2 percent and Medicare at 1.45 percent. On the same $4,000, payroll saves another $306, for $1,186 in one year. Direct contributions, made with after-tax money and deducted on the return, save the income tax only. The difference is real money: on a maxed family contribution of $8,750, payroll saves $669.38 of FICA that a direct contribution leaves on the table.
The second break is the growth. Interest, dividends, and capital gains inside an HSA are never taxed, which is the break most owners never use. Only 18 percent of HSA owners held any of their balance in investments in 2024, according to the Employee Benefit Research Institute, and the average balance across all accounts was $5,532, a record high, up from $4,747 in 2023. The rest sit in cash, earning next to nothing. The arithmetic is blunt: $4,000 a year at 7 percent for 10 years becomes $55,265.79, and the same $4,000 a year left in cash reaches $40,000. The $15,265.79 gap is the second break doing its work, and it only works if the money is invested. A self-only filer who maxes the account at $4,400 a year for 30 years at 7 percent ends with $415,627.46, and a family that maxes at $8,750 a year for 30 years ends with $826,531.88, all of it available tax-free for medical expenses.
The third break is the withdrawal. Money taken out for qualified medical expenses is tax-free, at any age, with no penalty and no tax. Qualified medical expenses are the expenses listed in IRS Publication 502: doctor visits, prescriptions, dental work, vision care, mental health care, and long-term care, among others. The expense has to be for you, your spouse, or your dependents, and it has to be unreimbursed by insurance. There is no time limit on the reimbursement: you can pay a medical bill out of pocket today, keep the receipt, let the money grow for twenty years, and reimburse yourself from the account in retirement, tax-free, for the expense you paid decades ago. The receipt is the record, and the account is the vault.
Who can open one
Eligibility is a monthly test, and it has four parts, per IRS Publication 969. You must be covered by a qualifying high deductible health plan on the first day of the month. You must have no other health coverage that is not permitted, with exceptions for dental, vision, and certain permitted insurance. You must not be enrolled in Medicare. And you must not be claimed as a dependent on someone else's return. Fail any one of them in a month and you earn none of that month's limit. The plan is the gate: for 2026 a qualifying plan needs a deductible of at least $1,700 for self-only coverage or $3,400 for family coverage, and an out-of-pocket maximum of no more than $8,500 or $17,000. A general-purpose flexible spending account or health reimbursement arrangement blocks eligibility, because it is other coverage that pays before the deductible, while a limited-purpose FSA, which pays only dental and vision, does not.
Two changes from the One Big Beautiful Bill Act, signed July 4, 2025, widened the gate for 2026, and the IRS explained them in Notice 2026-5 on Dec 9, 2025. Bronze and catastrophic plans bought through an Exchange now count as high deductible health plans even if their deductible or out-of-pocket maximum misses the table above, which brings millions of marketplace enrollees into eligibility for the first time. And membership in a direct primary care arrangement no longer blocks contributions, provided the fees do not exceed $150 a month for one person or $300 a month for a family. The telehealth safe harbor, which let plans cover telehealth before the deductible, is now permanent. The gate is wider than it has ever been, and the workers choosing plans in open enrollment this month are the first to choose under the new rules.
The monthly rule, and the last-month rule
The limit is earned one twelfth at a time. You earn one twelfth of the annual limit for each month you are eligible on the first day of that month, and the limit for the year is the sum of the months. Six months of self-only coverage in 2026 earns $2,200 of limit, not $4,400. The calculator on this site prorates automatically: set the months to 6 and watch the limit halve. The rule is strict about the first of the month: coverage that starts on the 2nd does not count for that month, and coverage that ends on the 30th counts, because you were covered on the 1st.
The last-month rule is the exception, and it has a sting. If you are eligible on December 1, you may contribute the full year's limit even if you were eligible for only part of the year, but you must then stay eligible through December 31 of the following year, the testing period. Fail the testing period and the excess over the prorated limit is included in your income and hit with a 10 percent additional tax. The rule is a gift for people who join a high deductible plan late in the year, and a trap for people who leave one early the next year. The safe use is the obvious one: join in December, stay the next year, keep the full limit. The unsafe use is joining in December, contributing the full $8,750, and switching to a low deductible plan in March.
What the money can pay for
The list is long and mostly ordinary. Doctor visits, prescriptions, dental cleanings and fillings, eye exams and glasses, hearing aids, mental health care, physical therapy, chiropractic care, and long-term care services all qualify, under Publication 502. So do over-the-counter medicines and menstrual care products, which became eligible in 2020 and stayed that way. Premiums generally do not qualify, with three exceptions: COBRA premiums, premiums while receiving unemployment compensation, and Medicare premiums, Part B, Part D, and Medicare Advantage, once you are 65. A Medigap premium does not qualify. Cosmetic surgery does not qualify. A gym membership does not qualify, however good the intention.
The non-qualified withdrawal is the one rule with teeth. Money taken out for anything else before age 65 is taxed as ordinary income and hit with a 20 percent additional tax, under 26 U.S.C. 223(f)(4). A $1,000 non-qualified withdrawal at a 22 percent rate costs $220 of income tax and $200 of additional tax, for $420 on $1,000. After 65 the 20 percent penalty falls away and the withdrawal is taxed as ordinary income only, which is why the account is sometimes called a stealth IRA: after 65 it behaves exactly like a traditional IRA for non-medical spending, and better than one for medical spending, because medical withdrawals are still tax-free.
What happens at 65, and what happens to the money you never spend
At 65 the account changes character. You cannot contribute once you enroll in Medicare, including premium-free Part A, and the month you enroll is the month eligibility stops. The money already in the account stays usable, and it becomes more useful, not less: it can pay Medicare Part B, Part D, and Medicare Advantage premiums, which are the bills every retiree faces, and it can pay for dental, vision, and hearing care that Medicare does not cover. It cannot pay a Medigap premium. There are no required minimum distributions for an HSA, ever, which is one more way it beats a traditional IRA: the balance can sit and grow for as long as you live, and you take it out when you need it, not when the calendar says so.
The account is yours in a way a flexible spending account never is. It follows you from job to job, it is not forfeited at year-end, and it is not owned by your employer. When you die, the account passes to your spouse as their HSA, with the same tax treatment, and to anyone else as a taxable account, with the balance included in their income. The Employee Benefit Research Institute estimates a couple retiring today could need as much as $469,000 saved to cover health care costs in retirement, and the HSA is the only account designed to hold exactly that money, triple tax-free, for exactly that purpose. The average balance is $5,532. The gap between the two numbers is the opportunity, and the calculator on this site is the way to start closing it.
The third tax break is the one almost nobody uses, and it is the biggest one. Only 18 percent of HSA owners invest any of their balance, which means 82 percent of owners get the deduction and the tax-free withdrawal and leave the tax-free growth on the table. On the defaults here, $4,000 a year at 7 percent for 10 years becomes $65,101.55 from a $5,000 start, and the same contributions left in cash reach $45,000. The $20,101.55 gap is not a market return, it is a tax return: the growth was never taxed, the withdrawal for a medical bill is never taxed, and the only thing standing between the two numbers is the investment election inside the account. Check whether your HSA offers investments, and whether there is a cash minimum before you can invest: many plans require $1,000 or $2,000 in cash first, and the money above that line is the money that should be working.
Sources: IRS Revenue Procedure 2025-19 (2026 HSA and HDHP figures, May 1, 2025); 26 U.S.C. 223 (HSA statute: catch-up at 55, last-month rule, 20 percent additional tax); IRS Publication 969 (eligibility, monthly rule, Medicare premiums, Medigap exclusion); IRS Publication 502 (qualified medical expenses); IRS Notice 2026-5 (One Big Beautiful Bill Act expansions, Dec 9, 2025); EBRI HSA Database report 2024 (average balance $5,532, 18 percent invest, $469,000 retirement health care estimate). The scenario figures are this site’s HSA Calculator unless stated otherwise.
How an HSA Works questions
- What is the triple tax advantage of an HSA?
- Contributions are deductible from income tax, growth inside the account is tax-free, and withdrawals for qualified medical expenses are tax-free. No other account gives all three.
- Who can open an HSA?
- Anyone covered by a qualifying high deductible health plan on the first day of the month, with no other disqualifying coverage, not enrolled in Medicare, and not claimed as a dependent.
- Can I use HSA money in retirement?
- Yes. At 65 it can pay Medicare Part B, Part D, and Medicare Advantage premiums tax-free, and non-medical withdrawals are taxed as income with no 20 percent penalty. There are no required minimum distributions.
Keep reading
- The 2026 HSA Contribution LimitsEvery 2026 number, the 2025 comparison, and the 2027 preview.
- HSA vs FSA in 2026Ownership, rollover, and which account wins for which worker.
- The HSA as a Retirement AccountInvesting, the age-65 switch, and Medicare premiums.
- 7 HSA Mistakes That Cost Real MoneyExcess contributions, the Medicare trap, and five more.
- HSA CalculatorEnter your coverage and contributions: the slip finds your limit, prices the tax saving, and projects the growth.