TakeHomeTax

HSA Triple-Tax-Advantage Calculator

By NumbersLab · Updated 2026

Quantify all three legs of the HSA tax advantage — deduction, tax-free growth, tax-free medical withdrawals — plus the FICA exemption that no retirement account offers. Compare your HSA to Traditional 401(k), Roth IRA, and taxable brokerage for the same contribution amount.

30 years to grow
2026 limit: $8,750
$
qualified medical expenses per year
$
Strategy Toggles
Section 125 cafeteria plan exempts payroll HSA from 7.65% FICA. Direct-to-HSA contributions get income tax savings only.
Let HSA grow untouched; keep receipts; reimburse in retirement tax-free for any past medical expense.
%
0% if CA/NJ (no state HSA benefit)
%
%
for Traditional 401(k) comparison
%
HSA Balance at Retirement
$755,686$90,360 lifetime contribution tax savings
Tax-free if used for medical (any past or future)
Annual Income Tax Saving
$2,400
30.0% on $8,000
Annual FICA Saving
$612
Payroll only (7.65%)
If non-medical after 65
$589K
After 22.0% ordinary tax
If medical (any reimbursement)
$756K
100% tax-free
Comparison to Other Accounts (same $8,000/yr)
HSA (medical use):
$755,686
Traditional 401(k):
$589,435
Roth IRA:
$755,686
Taxable brokerage:
$474,833
HSA advantage vs Traditional: +$166,251 · vs Roth: $0 · vs Taxable: +$280,853

The Math: Why HSA Wins

Leg 1: Deduction
30.0%
Federal + state income tax saved per contribution dollar
Leg 2: Growth
7.0%/yr
Compounded tax-free over 30 years
Leg 3: Withdrawal
0%
Tax-free for qualified medical, any year past or future
Bonus: FICA
7.65%
Saved on payroll deductions
Sources & Methodology
2026 HSA contribution limits and HDHP definitions: IRS Revenue Procedure 2025-26. HSA structure and tax treatment: IRC §223. Qualified medical expense definition: IRC §213(d). FICA exemption via cafeteria plan: IRC §125 (Section 125). Age 65 non-medical withdrawal rule: IRC §223(f)(4)(C). State HSA tax treatment varies — California and New Jersey tax HSA contributions and earnings at the state level despite federal exemption; all other states with income taxes follow federal treatment. Long-term capital gains assumption (15%): IRC §1(h). Comparison accounts assume equivalent dollar contributions with realistic tax drag on the taxable account. Catch-up contribution age 55+ ($1,000): IRC §223(b)(3), not indexed for inflation.

How This Works

The Health Savings Account is the only account in the U.S. tax code that gets a triple tax advantage: pre-tax contributions (federal and most states), tax-free investment growth, and tax-free withdrawals for qualified medical expenses. Roth accounts skip the deduction. Traditional accounts pay tax on withdrawals. Taxable accounts pay tax on both contributions and growth. Only the HSA wins on all three legs simultaneously — and that's before the FICA advantage.

FICA is the underappreciated fourth advantage. HSA contributions made through a payroll cafeteria plan (Section 125) are exempt from Social Security and Medicare taxes — 7.65% additional savings on top of income tax savings. Traditional 401(k) contributions don't get this benefit; you still pay FICA on the amount that goes into your 401(k). On an $8,000 family HSA contribution, the FICA savings alone is $612 annually. Over 30 years that's $18,360 in pure FICA-avoided dollars before any growth.

The stealth Roth IRA strategy: contribute the maximum HSA amount every year, invest it (don't leave it in cash), and pay current medical expenses out of pocket. Save every receipt indefinitely. In retirement, withdraw tax-free amounts equal to your accumulated lifetime medical expenses — for any reason, no time limit on the reimbursement under IRC §223(d). The IRS has confirmed there's no statute of limitations on when you can reimburse yourself for a qualified medical expense, as long as you have documentation.

After age 65, HSA flexibility expands further. Non-medical withdrawals at 65+ are taxed as ordinary income but escape the 20% penalty that applies to non-medical withdrawals before 65. This makes the HSA functionally equivalent to a Traditional IRA for non-medical retirement spending, plus a tax-free Roth-like account for medical spending — combining the best of both worlds with one account.

Critical HSA gotchas to avoid: (1) you must be enrolled in an HSA-qualified high-deductible health plan (HDHP) to contribute, defined by IRS as having a minimum deductible of $1,700 self / $3,400 family in 2026; (2) once you enroll in Medicare (typically at 65), you cannot contribute further to an HSA, though you can keep withdrawing; (3) tax-free withdrawals require qualified medical expenses as defined by IRC §213(d) — not every medical-adjacent expense qualifies; (4) record-keeping is on you — the IRS won't track your historical medical expenses.

State income tax treatment varies. Most states follow federal HSA tax treatment, but California and New Jersey do NOT — those two states tax HSA contributions and earnings at the state level. Move to a state that follows federal treatment and the math becomes even more favorable. If you currently live in CA or NJ, the federal HSA savings still apply, just not the state portion — adjust the state rate input to 0% to model this accurately.

Frequently Asked Questions

What is the HSA triple tax advantage?+
The Health Savings Account is the only U.S. tax-advantaged account that wins on all three legs: (1) contributions are deductible from federal income tax and most states (pre-tax via payroll); (2) investments inside the HSA grow tax-free; (3) withdrawals for qualified medical expenses are tax-free. No other account does all three. Roth accounts skip leg 1 (no deduction). Traditional accounts skip leg 3 (withdrawals are taxed). Taxable brokerage skips all three. The HSA also has a bonus FICA exemption when contributed via payroll — saving 7.65% on top of income tax savings, which neither Traditional nor Roth 401(k) offers.
What are the HSA contribution limits for 2026?+
Per IRS Revenue Procedure 2025-26: $4,400 for self-only HDHP coverage and $8,750 for family HDHP coverage. Catch-up contributions for age 55+ are an additional $1,000 (not indexed for inflation). To contribute, you must be enrolled in an HSA-qualified high-deductible health plan with minimum deductible of $1,700 self / $3,400 family. Maximum out-of-pocket on the HDHP cannot exceed $8,500 self / $17,000 family. You cannot be enrolled in any other non-HDHP health coverage, can't be Medicare-eligible, and can't be claimed as a dependent on someone else's tax return.
Can I use my HSA for non-medical expenses?+
Yes, but with caveats. Before age 65, non-medical HSA withdrawals are subject to ordinary income tax plus a 20% penalty under IRC §223(f)(4). After age 65, the 20% penalty disappears — non-medical withdrawals are simply taxed as ordinary income, functionally identical to a Traditional IRA. Withdrawals for qualified medical expenses remain tax-free at any age. This is why the HSA is often called a 'stealth Roth IRA' for retirees: contribute and grow tax-free during working years, then withdraw for medical (tax-free) or non-medical at 65+ (ordinary income only).
Is an HSA better than a Roth IRA?+
For dollar-for-dollar comparison, the HSA is mathematically superior if you have qualified medical expenses in retirement (which essentially everyone does — Medicare premiums alone qualify). The HSA gets the upfront deduction that Roth doesn't, the FICA exemption that no retirement account offers, and the tax-free medical withdrawal. The Roth wins on flexibility — you can withdraw for any reason after 59½ with no tax. For retirees with significant projected medical costs (which all retirees have at minimum via Medicare premiums and supplemental insurance), HSA is the highest-leverage tax-advantaged account in the code. Most planners recommend filling the HSA first, before even maxing the 401(k) above the employer match.
Can I have an HSA and a 401(k)?+
Yes — they're entirely separate. The HSA contribution limit ($4,400 self / $8,750 family in 2026) is independent of the 401(k) contribution limit ($23,500 in 2026). You can max both. For high earners with available cash flow, the optimal contribution priority is typically: (1) 401(k) up to employer match (free money); (2) HSA to max (highest tax-advantaged-account-per-dollar); (3) 401(k) to annual limit; (4) Backdoor or Mega Backdoor Roth; (5) Taxable brokerage. The HSA's combination of deduction + FICA exemption + tax-free growth + tax-free medical withdrawal makes it the highest-priority after employer match for most savers.
What happens to my HSA when I enroll in Medicare?+
When you enroll in Medicare (typically at age 65 if you're not still working), you can no longer contribute to an HSA, but your existing balance remains usable. You can withdraw tax-free for qualified medical expenses including Medicare premiums (Part A, B, D, and Medicare Advantage premiums all qualify), copays, deductibles, and prescription drugs. Long-term care insurance premiums also qualify (up to age-based limits per IRS Publication 502). Non-medical withdrawals are taxed as ordinary income (no 20% penalty after 65). HSA balances pass to your spouse tax-free upon death; non-spouse beneficiaries get an immediate taxable distribution of the full balance.

More Tax Tools

PaycheckFreelance TaxOvertime (OBBBA)Quarterly EstimatesBonus TaxW-4 WithholdingTax RefundStock OptionsRSU TaxSelf-EmploymentSide IncomeRetirementSalary → HourlyHourly → SalaryMarriage TaxRelocationCost of LivingEmployer CostCapital Gains1099 vs W2Social SecurityPaycheck PlannerSalary NegotiationRetirement PlannerBracket VisualizerSide HustleTotal CompAMT TriggerCharitable GivingWithdrawal SequencerTrue Marginal RateTax Cliff MapRMD ForecasterSS Claiming AgeLump Sum vs AnnuityInherited IRARMDInflation SalaryRoth vs Traditional 401k
Sponsored
Recommended Reading
Disclosure
Retirement Financial Planning Guidebook
by Gordon Wells
Plain-language walkthrough of building retirement security — savings strategies, withdrawal timing, and avoiding common late-career mistakes.
View on Amazon →
Retirement Planning Guidebook
by Wade Pfau, PhD
Researcher-grade reference on the entire retirement-income decision: Social Security claiming, withdrawal rates, annuities, tax-efficient sequencing.
View on Amazon →
Living Trusts, Retirement & Estate Planning
by Estate Planning Guide
Step-by-step on integrating retirement accounts with living trusts, beneficiary designations, and inheritance tax planning.
View on Amazon →
The Take-Home Tax Guide
Weekly tips on reducing your tax burden, state tax changes, and salary negotiation strategies. Free.