HSA Triple-Tax & Stealth IRA Calculator
Calculate upfront income and FICA tax savings, tax-free investment compounding, and retirement healthcare wealth accumulation.
1. HSA Coverage & Annual Contribution
Payroll deductions avoid 7.65% FICA (Social Security + Medicare) taxes in addition to income tax.
2. Tax Rates & Growth Horizon
Invested HSA vs Taxable Account
$1,569
Income + FICA Tax$347,399
At 25 Years$237,399
Inside the HSA$39,215
Annual saving × yearsHSA Growth vs Taxable Brokerage
Default inputs: 8% returnWhat this calculator does
This calculator estimates what a Health Savings Account is worth when the money is invested and left to grow rather than spent each year. It is for people covered by a high-deductible health plan who are deciding how much to contribute, whether to contribute through payroll, and whether to pay current medical bills out of pocket so the HSA balance can compound, an approach often called the "stealth IRA" or "shoebox" strategy.
You enter the coverage tier, the annual contribution, your combined federal and state income tax rate, whether the money goes in through payroll, an expected investment return and the number of years until you expect to use the balance. The calculator reports the tax saved on each year's contribution, the projected HSA balance, the investment growth inside it, and what the same pre-tax dollars would reach in an ordinary taxable brokerage account.
How the math works
The annual tax saving is the contribution times your combined income tax rate, plus 7.65% when the payroll box is ticked. Contributions made by salary reduction through an employer's cafeteria plan are treated as employer contributions (IRS Publication 969), and IRS Publication 15-B lists HSA contributions as exempt from Social Security and Medicare taxes up to the contribution limit. Contributions made directly to the HSA provider are deductible for income tax but do not avoid those payroll taxes.
The HSA balance is modelled with each year's contribution added at the start of the year and the whole balance growing at the expected return, with no tax on the growth. The comparison account receives the same pre-tax dollars after income and payroll tax, and its return is reduced by 15% each year (an 8% return becomes 6.8%) to stand in for tax on dividends and realized gains. No tax is charged when the taxable account is sold, and the HSA balance is assumed to be spent on qualified medical expenses, so it is never taxed. Both simplifications are discussed below.
Worked example
These are the calculator's default inputs: self-only coverage with the 2026 maximum contribution of $4,400, a 28% combined income tax rate, contributions through payroll, an 8% expected return and 25 years.
- Tax rate applied to the contribution: 28% income tax + 7.65% payroll tax = 35.65%.
- Tax saved each year: $4,400 × 35.65% = $1,569, or $39,215 over 25 years.
- Contributed: $4,400 × 25 = $110,000.
- Projected HSA balance: $347,399, of which $237,399 is investment growth.
- Same pre-tax dollars in a taxable account: $2,831 a year after tax, growing at 6.8%, reaches $185,857.
- Difference: $161,542 in the HSA's favor, provided the HSA is spent on qualified medical expenses.
Most of the difference comes from two sources: the HSA invests $1,569 more each year because the contribution was never taxed, and that larger amount compounds at 8% instead of 6.8% for 25 years.
2026 limits and who can contribute
The contribution limits and the definition of a qualifying high-deductible health plan are adjusted each year. For 2026 they are set by Revenue Procedure 2025-19; the age-55 catch-up is a fixed $1,000 under Publication 969.
| 2026 item | Self-only coverage | Family coverage |
|---|---|---|
| HSA contribution limit | $4,400 | $8,750 |
| Additional contribution at age 55 or older | $1,000 | $1,000 |
| HDHP minimum annual deductible | $1,700 | $3,400 |
| HDHP maximum out-of-pocket (excluding premiums) | $8,500 | $17,000 |
To contribute you must be covered by a qualifying HDHP, have no other disqualifying health coverage, not be enrolled in Medicare, and not be claimable as a dependent on someone else's return. The limits cover all contributions from you, your employer and anyone else combined, so an employer contribution reduces what you can add yourself.
Where the upfront saving comes from
The saving on each contribution depends on your tax rate and on how the money goes in. The table runs the self-only maximum of $4,400 through the calculator at several combined income tax rates, with and without payroll deduction.
| Combined income tax rate | Saving through payroll | Saving contributing directly |
|---|---|---|
| 12% | $865 | $528 |
| 22% | $1,305 | $968 |
| 24% | $1,393 | $1,056 |
| 32% | $1,745 | $1,408 |
| 37% | $1,965 | $1,628 |
Payroll deduction is worth $337 a year at this contribution, the 7.65% of payroll tax that a direct contribution does not avoid. That figure assumes all of it would have been subject to Social Security tax. Under IRS Publication 15, the 6.2% Social Security tax stops at the 2026 wage base of $184,500, while the 1.45% Medicare tax has no cap. For someone earning above the wage base, payroll deduction saves only the Medicare part, $63.80 on $4,400, and the calculator overstates their saving by $272.80 a year.
State tax also varies. The calculator applies your combined rate to the contribution, which assumes your state follows the federal treatment. California does not: FTB Publication 1001 says HSA contributions are not deductible for California and interest and dividends earned in the account are taxable each year. California residents should enter only their federal rate, and should expect the balance to grow more slowly than shown because of the yearly state tax on earnings.
Growth over time, and what the comparison assumes
The longer the money stays invested, the larger the gap between the HSA and the taxable account. Default inputs, varying only the number of years:
| Years | HSA balance | Growth inside HSA | Taxable account | Difference |
|---|---|---|---|---|
| 5 | $27,878 | $5,878 | $17,321 | $10,557 |
| 10 | $68,840 | $24,840 | $41,387 | $27,453 |
| 20 | $217,461 | $129,461 | $121,294 | $96,167 |
| 25 | $347,399 | $237,399 | $185,857 | $161,542 |
| 30 | $538,322 | $406,322 | $275,568 | $262,754 |
Two assumptions favor the HSA in this comparison and one favors the taxable account. The HSA figure assumes every dollar is eventually spent on qualified medical expenses; money withdrawn for anything else is taxed as income, as described below, which removes most of the advantage for that portion. The HSA figure also assumes the whole balance is invested at the expected return; any part held in cash grows more slowly. On the other side, the taxable account is never charged tax on its unrealized gains, so its value after a sale would be lower than the table shows.
Withdrawals and the receipts strategy
| Withdrawal | Federal tax treatment (Pub 969) |
|---|---|
| Qualified medical expenses incurred after the HSA was established, at any age | Tax-free |
| Anything else, before age 65 | Income tax plus a 20% additional tax |
| Anything else, at 65 or older, or after disability or death | Income tax only; no additional tax |
Publication 969 allows tax-free reimbursement of qualified medical expenses incurred after the HSA was established and does not require withdrawals each year. That is what makes the receipts strategy possible: pay a medical bill from other money now, keep the receipt, and reimburse yourself from the HSA years later, after the invested balance has grown. An expense reimbursed from the HSA cannot also be deducted as an itemized medical expense, and records need to show the expense date and that it came after the account was opened.
Frequently Asked Questions
Do I owe taxes if I withdraw HSA funds for non-medical expenses?
Yes. The withdrawal is included in income, and before age 65 it also carries a 20% additional tax. The additional tax does not apply after you reach 65, become disabled or die, so from 65 a non-medical withdrawal is taxed like a traditional IRA distribution.
How long can I hold on to medical receipts before reimbursing myself?
IRS Publication 969 allows tax-free distributions for qualified medical expenses incurred after the HSA was established and does not require withdrawals each year; it does not state a time limit for reimbursing an earlier qualified expense. Keep the receipts and records showing the expense was not paid or deducted another way.
Are HSA contributions always exempt from state income tax?
No. California, for example, does not follow the federal treatment: contributions are not deductible for California tax and the account's interest and dividends are taxable each year, according to FTB Publication 1001. Residents of a state that does not conform should use only their federal rate in the calculator.
Why does contributing through payroll save more?
Salary-reduction contributions through a cafeteria plan are treated as employer contributions and are exempt from Social Security and Medicare taxes, a 7.65% saving for most employees. Contributions made directly to the HSA are deducted for income tax only. Above the 2026 Social Security wage base of $184,500 the payroll saving falls to the 1.45% Medicare tax.
Can I keep contributing after I enroll in Medicare?
No. From the first month of Medicare enrollment the contribution limit is zero, and that includes months of backdated coverage if Medicare enrollment is made retroactive. The existing balance can still be invested and used for qualified medical expenses. Set the calculator's number of years to the time left before Medicare enrollment rather than to a retirement date if the two differ.
Sources
- IRS Revenue Procedure 2025-19, 2026 HSA and HDHP amounts
- IRS Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans
- IRS Publication 15-B (2026), Employer's Tax Guide to Fringe Benefits
- IRS Publication 15 (2026), Social Security wage base
- California FTB Publication 1001 (2025), Supplemental Guidelines to California Adjustments
Related Tools
Educational and scenario-analysis only; not tax, legal, or investment advice. Consult a licensed CPA or financial advisor about your situation. Returns in the examples are inputs, not forecasts.
Built and verified by The Breakeven Math — last reviewed September 18, 2026.