Personal finance advice often boils down to "save as much as you can in tax-advantaged accounts." That's directionally correct but misses a crucial point: the order in which you fund those accounts matters. Getting the sequence right can mean thousands of extra dollars over your career. Getting it wrong means leaving tax benefits unused.
The Accounts at a Glance
Traditional 401(k): Pre-tax contributions, tax-deferred growth, ordinary income tax on withdrawal. Employer match possible. 2024 limit: $23,000 ($30,500 if 50+).
Roth IRA: Post-tax contributions, tax-free growth, tax-free qualified withdrawals. Income limits apply. 2024 limit: $7,000 ($8,000 if 50+).
HSA (Health Savings Account): Pre-tax contributions, tax-free growth, tax-free withdrawals for qualified medical expenses. After 65, withdrawals for non-medical expenses are taxed as ordinary income (like a traditional IRA). Requires a qualifying high-deductible health plan. 2024 limit: $4,150 individual / $8,300 family.
The HSA is the only account that offers triple tax advantage: contributions are pre-tax, growth is tax-free, and withdrawals are tax-free when used for medical expenses. No other account combines all three.
The Optimal Order
- 401(k) up to the employer match: This is non-negotiable. A typical 50% match on up to 6% of salary is an immediate, guaranteed 50% return. No investment in the world beats that risk-free. If you do nothing else, capture the full match.
- HSA to the max: If you have an HSA-eligible plan and can afford to pay medical expenses out of pocket, max the HSA before funding anything beyond the 401(k) match. The triple tax advantage is unmatched. Pay current medical bills with after-tax dollars, save your receipts, and let the HSA grow untouched for decades.
- Roth IRA to the max: After the HSA, direct contributions should go to a Roth IRA. You get tax diversification (pre-tax 401(k) + post-tax Roth) and the ability to withdraw contributions (not earnings) penalty-free before retirement if needed. If your income exceeds Roth IRA limits, use the backdoor Roth strategy.
- Back to 401(k) up to the limit: After maxing the HSA and Roth IRA, go back to the 401(k) and contribute up to the annual limit. This is where high earners get the most benefit from pre-tax contributions.
- Taxable brokerage account: Only after all tax-advantaged space is used should you invest in a standard taxable account.
Key Takeaway
401(k) match → HSA max → Roth IRA max → 401(k) max → taxable. This sequence maximizes employer contributions, captures the HSA's triple tax advantage, builds tax diversification, and uses all available tax-advantaged space before paying taxes on investment growth.
When to Deviate
If you're in a very high tax bracket now and expect to be in a much lower one in retirement, traditional contributions become more attractive. If you have high-interest debt (above 8-10%), prioritize that before maxing out accounts beyond the match. And if your HSA has poor investment options or high fees, you might move HSA contributions down the priority list slightly. But the default order above is optimal for the majority of savers.