The standard order you see everywhere is:
First, contribute enough to your 401k to get the full employer match. Then max your IRA. Then max your HSA. Then go back and max your 401k.
This order is correct for most people. But it glosses over a few important wrinkles, and it tells you nothing about what the combined number actually looks like or how it changes based on your specific situation.
Why The Standard Order Makes Sense
The employer 401k match is free money. A 5% match means your employer adds 5% of your salary to your 401k when you contribute 5%. That is a 100% instant return on those dollars. Nothing else in personal finance comes close. Max this first, always. If you want to see exactly what that match adds up to over a full career, the lifetime value is larger than most people expect.
After the match, the IRA often wins over additional 401k contributions because it gives you more investment flexibility. A 401k is limited to whatever funds your employer selected. An IRA lets you invest in almost anything — individual stocks, ETFs, bonds, whatever you want. For a deeper look at when this logic holds and when it does not, see why maxing your 401k before your IRA might be costing you money.
The HSA has a unique advantage that makes it worth maxing before returning to the 401k: the triple tax benefit. Contributions are pre-tax. Growth is tax-free. Withdrawals for medical expenses are tax-free. No other account in the US tax code offers all three. After 65, the HSA functions exactly like a traditional IRA for non-medical withdrawals — you just pay ordinary income tax. For people who can pay medical expenses out of pocket and let the HSA grow invested, the HSA becomes a powerful third retirement account.
When The Standard Order Is Wrong
There are real situations where you should deviate.
If your 401k has great low-cost index funds, the flexibility argument for the IRA weakens. A Vanguard or Fidelity 401k with low-expense-ratio funds may be a better home for your dollars than an IRA at a brokerage with slightly higher costs.
If you are a high earner above the Roth IRA income limit — $168,000 for single filers in 2026 — the Roth IRA is not directly available to you. You can use the backdoor Roth strategy (contribute to a traditional IRA and convert), but it adds complexity. At that income level, the traditional IRA deduction also phases out, so the tax benefit is reduced or eliminated.
If you have high medical expenses or are in a high deductible health plan, maxing the HSA becomes even more attractive. You are going to spend money on healthcare regardless — doing it from pre-tax HSA dollars is strictly better than doing it from post-tax income.
The Roth Question
Within the IRA and 401k, you also have to decide: traditional or Roth? The full Roth vs traditional breakdown covers when each makes sense, but here is the short version.
Traditional gives you a tax deduction now. Roth gives you tax-free growth and withdrawals later.
The general rule is: if you expect to be in a higher tax bracket in retirement than you are now, go Roth. If you expect to be in a lower bracket, go traditional.
For most early-career people whose income will grow, Roth is usually the right call. For people in their peak earning years who expect retirement income to be lower, traditional often wins.
The honest answer is that predicting future tax brackets is hard, and having a mix of traditional and Roth accounts gives you flexibility to manage your tax situation in retirement. That flexibility has real value that is hard to quantify but worth thinking about.
What The Numbers Actually Look Like Together
Here is where most articles stop giving useful information. They tell you the order. They do not show you what it actually looks like to max all three accounts over 30 years.
Take someone who is 35, making $95,000, with a 5% employer match. If they follow the standard order and max their IRA ($7,500), their HSA ($4,400 individual), and contribute enough to get the full match (say 5% of salary = $4,750):
Total annual tax-advantaged contributions: roughly $16,650, plus $4,750 employer match = $21,400 going into retirement accounts this year.
At 7% real return over 30 years, those contributions alone — without any salary growth — project to roughly $2.1M.
Now add salary growth. At 3% raises, their salary at 65 is around $230,000. Their contributions scale with their salary (the 401k percentage and match both grow with salary). The IRA and HSA limits also grow. The projection with all of that modeled comes out closer to $2.8M.
That $700,000 difference comes from salary growth and growing contribution limits — two things that most retirement calculators completely ignore.
The Sequence Matters Less Than Consistency
The debate about whether to prioritize the IRA over the 401k (after the match) is worth thinking through, but it is second-order compared to the primary question: are you maximizing your total tax-advantaged contributions?
For most people, the math is similar regardless of exact sequence. What moves the needle dramatically is starting earlier, increasing your contribution rate, capturing the full employer match, and letting the compounding run for as long as possible.
The account order is a refinement. The amount and the timeline are the variables that actually determine your outcome.
The Accounts Your Calculator Should Handle
If you are modeling this seriously, you need a calculator that handles all three accounts simultaneously — not one at a time. You want to see how a 1% increase in your 401k contribution rate changes your total retirement balance, accounting for the fact that it reduces your take-home pay, which might affect what you can put into your IRA.
You also want to see catch-up contributions modeled automatically. At 50 you can add $8,000 more to your 401k. At 55 you can add $1,000 more to your HSA. These step changes matter.
And you want growing IRS limits. The $24,500 401k limit and $7,500 IRA limit in 2026 will be higher in 2035 and 2045. A model that ignores this is systematically understating your future contribution capacity.
You can model your 401k, IRA, and HSA together — with salary raises, employer match, catch-up contributions, and growing IRS limits — at NumberToRetire.com. The year-by-year breakdown shows exactly what each account contributes to your total retirement balance.