Which account first: 401(k), IRA or HSA?

The order

  1. $2,000 in savings, if you have less than a month of expenses.
  2. Your 401(k), up to the match. No investment beats an instant 50% or 100% return.
  3. Anything charging more than 7%. Paying it off is a guaranteed return at that rate (the 7% rule).
  4. 3 months of expenses in savings.
  5. An HSA, if your health plan qualifies: $4,500 a year for yourself, $9,000 for a family in 2027 [2]. Money goes in before tax, grows tax-free and comes out tax-free for medical costs.
  6. An IRA, Roth or Traditional: $7,500 a year, $8,600 at 50 or older [1].
  7. The rest of your 401(k), up to $25,500 a year [1].
  8. A regular brokerage account for anything left. No limits and no tax break.

The 2027 contribution limits: 401(k) $25,500, IRA $7,500, HSA $4,500 for yourself and $9,000 for a family.

Why the middle moves

Steps 5 to 7 have no fixed order. Each one keeps a different share of a dollar after tax, and that share depends on your tax rate now, your rate when you take it out, and your state. A Traditional account saves tax today, a Roth saves it later, and earning above the Roth IRA's income limit means the backdoor route (a Traditional IRA converted to Roth). So a 401(k) can come before an IRA for one person and after it for another.

Which account wins for you puts the same $1,000 a year in each one at your income, so you can see the difference.

Same rules, three different orders

Three people with a 401(k) that matches 50% up to 6%, an emergency fund already saved, and no high-interest debt. Each step is what this site's plan puts in every month.

25, Texas, $45,000

$400 a month

  1. $225 401(k), up to the match
  2. $175 IRA, split Traditional and Roth

32, California, $200,000

$3,000 a month

  1. $1,000 401(k), up to the match
  2. $1,125 More 401(k)
  3. $625 Backdoor Roth IRA
  4. $250 Regular brokerage account

40, Florida, $90,000, with an HSA plan

$1,500 a month

  1. $450 401(k), up to the match
  2. $375 HSA
  3. $675 More 401(k)

Sources

  1. IRS Notice 2026-66 (IR-2026-136, 2026-11-12).
  2. IRS Rev. Proc. 2026-24 (HSA, section 3.01).
  3. IRS Notice 2026-66, full text (PDF).