Skip to main content
All Articles
Financial Guide
6 min read May 11, 2026
Verified May 2026

The Exact Order to Fund Retirement Accounts (And What It Costs You to Get It Wrong)

Most investors fund their retirement accounts in the order they learned about them, not the order that maximizes after-tax wealth. The difference between a random contribution sequence and an optimized one can exceed $180,000 over a 30-year career. There is a mathematically correct answer, and it depends on your specific tax situation.

The Exact Order to Fund Retirement Accounts (And What It Costs You to Get It Wrong)

Key Takeaways

  • A 401(k) employer match delivers an immediate 50% to 100% return on every dollar contributed before any investment growth occurs.
  • Funding a taxable brokerage account before maxing an HSA costs the average high-earner roughly $1,400 per year in avoidable taxes.
  • The optimal sequence is: 401(k) to match, then HSA to max, then Roth or Traditional IRA to max, then 401(k) to max, then taxable brokerage.
  • Tool: Run your personalized retirement contribution order →

Automate Your RetirementSPONSORED

Betterment manages your IRA and handles 401(k) rollovers with zero effort from you.

Interactive Calculator
Full screen
Loading Calculator
calcmoney.io/calculatorsOpen full screen

Why Contribution Order Matters More Than Contribution Amount

Two investors each contribute $24,000 per year for 30 years. They hold identical index funds. One earns $847,000 more at retirement. The only difference: the sequence in which they funded their accounts.

That figure is not hypothetical noise. It reflects the compound effect of tax-drag on a taxable brokerage account versus the tax-sheltered compounding inside a Roth IRA, calculated at a 7% annual return with a 24% marginal tax rate. The math is settled. The question is whether you are currently sitting on the wrong side of it.

Each account type carries a different tax treatment, a different contribution limit, and a different set of conditions. Understanding the hierarchy means understanding exactly which benefit you capture first and which you defer to later dollars.

The Five-Tier Contribution Hierarchy

Tier 1: 401(k) Up to the Employer Match

The employer match is the only guaranteed return in personal finance. A 50% match on contributions up to 6% of salary is a 50% immediate return before a single dollar of market performance occurs. No other legal investment vehicle offers that.

The 2025 employee contribution limit is $23,500. The combined employer-plus-employee limit is $70,000. For most salaried workers, the first priority is simple: contribute exactly enough to capture every dollar of match, then stop and move to Tier 2.

Do not contribute beyond the match at this stage. You have better options for the next dollars.

Tier 2: HSA to the Annual Maximum

The Health Savings Account is the only triple-tax-advantaged account in the U.S. tax code. Contributions are pre-tax, growth is tax-free, and qualified withdrawals are tax-free. No other account structure offers all three simultaneously.

The 2025 HSA contribution limit is $4,300 for self-only coverage and $8,550 for family coverage. To contribute, you must hold a qualifying High Deductible Health Plan, defined in 2025 as a plan with a minimum deductible of $1,650 for self-only or $3,300 for family.

After age 65, an HSA converts to a de facto Traditional IRA: withdrawals for any purpose become taxable income, but no penalty applies. This makes the HSA a retirement account with a medical spending bonus attached.

A person in the 24% bracket who skips the family HSA max and routes that $8,550 into a taxable account instead loses approximately $2,052 in immediate tax savings, plus all subsequent growth on those dollars becomes subject to capital gains tax. Over 25 years at 7%, the after-tax cost of that single annual decision compounds to roughly $28,400.

Tier 3: Roth or Traditional IRA to the Annual Maximum

The 2025 IRA contribution limit is $7,000, or $8,000 if you are 50 or older. The choice between Roth and Traditional depends on one variable: whether your marginal tax rate today is higher or lower than your expected marginal rate in retirement.

The decision rule is precise:

  • Current rate higher than expected retirement rate: Traditional IRA. Deduct now, pay lower taxes later.
  • Current rate lower than expected retirement rate: Roth IRA. Pay tax now, withdraw tax-free later.
  • Rates approximately equal: Roth wins slightly, because tax-free growth is more flexible and Roth accounts carry no required minimum distributions.

High earners face income phase-outs. For 2025, the Roth IRA phase-out begins at $150,000 for single filers and $236,000 for married filing jointly. Above those thresholds, the backdoor Roth conversion, a two-step process of contributing to a non-deductible Traditional IRA and then converting, preserves access to Roth benefits. The mechanics involve a pro-rata rule if you hold other pre-tax IRA assets, which requires separate calculation.

Tier 4: Return to the 401(k) and Max It Out

After the IRA is funded, return to the 401(k) and contribute the remaining amount up to the $23,500 employee maximum. The choice between pre-tax and Roth 401(k) contributions follows the same tax-rate logic applied to IRAs in Tier 3.

Many plans now offer after-tax 401(k) contributions beyond the $23,500 limit, with an in-plan Roth conversion mechanism known as the mega backdoor Roth. This strategy allows contributions of up to $46,500 in after-tax dollars (filling the gap between the $23,500 employee limit and the $70,000 combined limit), which can then convert to Roth treatment. Not all plans permit this. Check your Summary Plan Description before assuming access.

Tier 5: Taxable Brokerage Account

Only after the above accounts are maximized should dollars flow into a taxable brokerage account. These accounts carry no contribution limits and no withdrawal restrictions, but every dividend, realized gain, and bond coupon generates a taxable event.

Long-term capital gains rates of 0%, 15%, or 20% apply to assets held over one year. Tax-loss harvesting can offset gains. But these strategies manage the tax drag rather than eliminate it. The tax-sheltered accounts in Tiers 1 through 4 eliminate it.

Worked Example 1: The $95,000 Salary Scenario

Consider a 34-year-old single filer earning $95,000 with a 22% marginal federal rate, access to a 401(k) with a 4% match, and family HSA eligibility through an HDHP.

Annual optimization:

  • 401(k) to capture 4% match: $3,800 contributed, $3,800 in employer match secured.
  • HSA family max: $8,550 contributed, $1,881 in federal tax savings captured immediately.
  • Roth IRA max (income qualifies fully): $7,000 contributed.
  • 401(k) remaining room: $19,700 additional contribution capacity. This person likely cannot fund all of it at $95,000 gross. They contribute as much as cash flow allows after the above priorities.

Skipping the HSA and routing that $8,550 to a taxable brokerage instead costs $1,881 in year-one taxes alone. At 7% growth over 30 years, the after-tax wealth difference from this single annual decision reaches approximately $61,200.

Worked Example 2: The $340,000 Household Income Scenario

A married couple, both 44, earns $340,000 combined. Their marginal rate is 32%. They have two 401(k) plans and family HSA eligibility.

Annual optimization:

  • 401(k) Plan A to match: $8,160 contributed, match captured.
  • 401(k) Plan B to match: $6,500 contributed, match captured.
  • HSA family max: $8,550 contributed, $2,736 in federal tax savings at 32%.
  • Backdoor Roth IRA for each spouse: $7,000 per person, $14,000 total.
  • 401(k) Plan A to max: $15,340 remaining capacity funded.
  • 401(k) Plan B to max: $17,000 remaining capacity funded.
  • Evaluate mega backdoor Roth eligibility in both plans.
  • Taxable brokerage for any remaining investable surplus.

At a 32% marginal rate, each pre-tax dollar contributed to the 401(k) beyond the match saves $0.32 in current taxes. Maxing both plans generates $11,328 in deferred federal tax liability in a single year, capital that compounds tax-sheltered until withdrawal.

This household's total tax-advantaged capacity before taxable investing: $70,000 (Plan A combined limit) + $70,000 (Plan B combined limit) + $8,550 (HSA) + $14,000 (both backdoor Roths) = $162,550 per year. Most high earners do not approach this ceiling. Most leave significant tax-advantaged capacity unused.

Variables That Change the Optimal Order

The five-tier framework above applies to the majority of earners. Three situations alter the sequence.

Self-employment: A Solo 401(k) allows contributions as both employee and employer, with a combined limit of $70,000 in 2025. SEP-IRA contributions max at 25% of net self-employment income. The Solo 401(k) is generally superior for incomes above $50,000 because it permits the full employee elective deferral of $23,500 before the employer contribution percentage applies.

No employer match: When no match exists, the HSA and IRA take priority over the 401(k) entirely, unless the 401(k) offers investment options or Roth functionality not available through an IRA.

Expected pension income: A defined-benefit pension that will replace 60% to 80% of pre-retirement income shifts the Roth-versus-Traditional calculus significantly. Pension income fills lower tax brackets first in retirement, which often means Roth contributions made today are more valuable than they appear.

How to Run Your Own Numbers

The framework above establishes the correct sequence. The specific dollar amounts depend on your marginal rate, your employer's match formula, your HSA eligibility, your income relative to IRA phase-out thresholds, and your investable surplus after fixed expenses.

These inputs interact. A $500 change in gross income can move a filer across a Roth IRA phase-out boundary. A plan change from PPO to HDHP opens HSA access worth thousands per year. Small changes in assumptions produce material differences in optimal allocation.

The CalcMoney retirement calculator processes all of these variables simultaneously. Enter your income, filing status, employer match details, and account access, and it returns the exact dollar amount to direct to each account tier, in order, with the after-tax impact quantified.

Calculate your optimal contribution sequence now →

You Might Also Like

The sequence above is the correct starting framework. Your specific numbers determine exactly how much goes where.

Featured Partner
FIDELITY

Put These Numbers to Work

Open a Fidelity brokerage account. $0 commissions, no account minimums, fractional shares available.

Run the Numbers

Affiliated. We may earn a commission.

OR

One money insight per week.

Calculator deep-dives, rate alerts, and financial analysis written for real decisions. Unsubscribe anytime.

1 email/week. No spam. Unsubscribe in one click.

Free Tools

Run the actual numbers

Stop estimating. Plug in your numbers and get a precise answer in seconds. Free, no signup required.

Open Free Calculators