Decide where your next retirement dollar belongs. Capture your full employer 401(k) match first, then this tool shows how much more an HSA earns than a traditional 401(k) for medical-earmarked dollars.
Sample input: Annual amount beyond the match ($): 4400, Employer 401(k) match (% of contribution): 50, Your marginal tax rate (%): 30, Expected annual return (%): 7, Years until you spend it: 30
HSA edge over 401(k): 12610 (HSA wins big after the match)
Fund your 401(k) up to the employer match first — at a 50% match that is about $2,200 of free money per year you should never skip. For dollars beyond the match that you can earmark for medical, the HSA beats a traditional 401(k) by roughly $12,610 over 30 years, because the HSA avoids both the withdrawal tax and (on payroll) the 7.65% FICA the 401(k) does not. (Grows 7.61x.)
Morningstar — professional fund & portfolio research · $50 off annual
TradingView — professional-grade charts, real-time data · used by 50M+ traders
Affiliate link — Investor Sam may earn a commission. It does not affect our analysis.
Contribute to your 401(k) up to the full employer match first — that match is an instant guaranteed return no other account offers. After the match, the HSA is usually the next-best home for dollars you can earmark for medical costs, because of its triple-tax-advantage (IRS Publication 969).
Both are pre-tax going in, but a traditional 401(k) is taxed on withdrawal while an HSA spent on qualified medical is tax-free. A payroll HSA also avoids the 7.65% FICA tax that a 401(k) does not. This tool values both of those edges over your time horizon.
Yes. The tax-free withdrawal applies to qualified medical expenses. After 65 a non-medical HSA withdrawal is taxed as ordinary income like a Traditional IRA, so earmark the HSA for healthcare to keep the full advantage (IRS Publication 969).
For 2026 you can contribute $4,400 self-only or $8,750 family to an HSA, plus $1,000 catch-up at 55 or older. You must be enrolled in an HSA-eligible high-deductible health plan to contribute.