HSA or 401(k) First? Why the Match Wins, Then HSA
Fund the 401(k) up to the full employer match first — that match is an instant 50% to 100% return no investment can match — then send your next dollars to the HSA before topping off the 401(k). At a 50%-on-6% match, the first $7,200 you defer earns a guaranteed $3,600. After that, the HSA’s triple tax advantage (deductible in, tax-free growth, tax-free out for medical) beats every other account dollar-for-dollar. The 2026 HSA cap is $4,400 self-only / $8,750 family; the 401(k) deferral cap is $24,500.
Quick Answer
Fund the 401(k) only up to the full match first: a 50%-on-6% match is a guaranteed 50% return ($3,600 free on $120K). Then send the next dollars to the HSA ($4,400 self-only / $8,750 family for 2026) before topping off the 401(k) toward $24,500.
The decision, resolved with one number: 50%
Meet Daniel, a 32-year-old software engineer in Austin, Texas. He is single, earns $120,000, and lands squarely in the 24% federal bracket (single: $103,351–$197,300 for 2026) — with his next dollars of compensation reaching into the 32% range once bonuses land. His employer offers a 50% match on the first 6% of pay and a qualifying high-deductible health plan (HDHP) that makes him HSA-eligible. He has $12,000 a year he can save beyond his emergency fund. Where does it go first?
The answer is not “the account with the best tax break.” It is “the move with the highest guaranteed return.” That is the 401(k) match. A 50%-on-6% match pays Daniel 50 cents on every dollar he defers up to 6% of pay. On $120,000, 6% is $7,200, and the match adds $3,600 for free. No HSA tax break, no Roth, no index fund returns a guaranteed 50% the instant the money lands. So the first $7,200 goes to the 401(k) — not because the 401(k) is the best account, but because the match is the best return.
After that $7,200, the math flips. The next dollars belong in the HSA — the only account in the U.S. tax code with a triple tax advantage — before Daniel sends anything more to the 401(k). Here is exactly why, and exactly where each marginal $1,000 should go.
Step 1: Capture the full match (the guaranteed-return rule)
The employer match is the only place in personal finance where a guaranteed 50%–100% return is available with zero risk. Compare the alternatives on Daniel’s first $7,200:
- 401(k) with 50% match: instant +50% (+$3,600), plus a 24% federal tax deferral on the $7,200 he defers.
- HSA (no match): 24% federal deduction + 7.65% FICA savings via payroll = about 32% combined — excellent, but not 50%.
- Roth IRA (no match): 0% up-front; the benefit is tax-free growth, realized decades later.
A guaranteed 50% beats a 32% tax break beats a 0% up-front benefit. The match wins the first dollars every time. Skipping it to fund an HSA is, in Daniel’s case, leaving $3,600 of free money on the table to save roughly $2,300 in tax — a clear loss. Capture the full match before anything else.
Step 2: Redirect to the HSA (the triple-tax-advantage rule)
Once the match is captured, the HSA jumps ahead of additional 401(k) dollars and ahead of the Roth IRA. The reason is structural, not marginal: the HSA is the only account that is tax-advantaged on all three legs.
| Account | Money goes in | Growth | Money comes out |
|---|---|---|---|
| HSA | Pre-tax (deductible) | Tax-free | Tax-free (qualified medical) |
| Traditional 401(k) | Pre-tax | Tax-free | Taxed as ordinary income |
| Roth IRA / Roth 401(k) | After-tax | Tax-free | Tax-free |
| Taxable brokerage | After-tax | Taxed annually | Taxed (cap gains) |
A traditional 401(k) is taxed on one leg (the exit). A Roth is taxed on one leg (the entry). The HSA is taxed on zero legs when used for medical care — and qualified medical expenses are a certainty in retirement, not a hope. Fidelity estimates a 65-year-old couple will spend well over $300,000 on health care across retirement, so the “must be medical” condition is not a real constraint for most people.
The HSA contribution is governed by IRC §223(b). For 2026 the limits are $4,400 self-only and $8,750 family, with a $1,000 catch-up at age 55 or older. Daniel is self-only, so $4,400 is his target after the match.
Step 3: Finish the 401(k), then the IRA, then taxable
With the match captured and the HSA full, additional dollars go back to the 401(k) (toward the $24,500 2026 employee deferral limit under IRC §402(g)), then to a Roth IRA if eligible, then to a taxable account. The complete priority ladder:
- 401(k) to the full match — guaranteed 50%–100% return.
- HSA to the cap — $4,400 self-only / $8,750 family (IRC §223(b)). Triple tax break.
- Roth IRA to $7,500 — if under the phase-out (single $150K–$165K; MFJ $236K–$246K for 2026). Backdoor Roth if over.
- Finish the 401(k) — the rest of the $24,500 deferral.
- Taxable brokerage — everything beyond the tax-advantaged caps.
Daniel’s $12,000: where each marginal $1,000 goes
Daniel has $12,000 to allocate. Here is the dollar-by-dollar routing, with the federal tax effect at his bracket:
| Dollars (cumulative) | Destination | Marginal benefit |
|---|---|---|
| $1 – $7,200 | 401(k) up to 6% (full match) | +$3,600 match + 24% deferral |
| $7,201 – $11,600 | HSA to $4,400 cap | ~32% (24% fed + 7.65% FICA) |
| $11,601 – $12,000 | Back to 401(k) | 24% deferral |
On the first $7,200, Daniel banks $3,600 of free match money plus a $1,728 federal tax deferral (24% × $7,200). On the next $4,400 into the HSA, he saves about $1,056 in federal tax (24% × $4,400) plus roughly $337 in FICA because the HSA is funded through payroll (7.65% × $4,400) — a payroll-deferral edge the 401(k) does not share, since 401(k) deferrals are still subject to FICA. Total first-year benefit on $11,600 of optimal routing: roughly $6,720 in match plus tax savings. Texas has no state income tax, so there is no state layer here — a single filer in California at the same income would add roughly 9.3% state savings on the deductible portions.
The FICA edge most people miss
Here is the detail that even careful savers overlook: HSA contributions made through payroll deduction escape FICA tax (7.65%); 401(k) contributions do not. Social Security and Medicare tax still apply to every dollar you defer into a 401(k), but a payroll-routed HSA contribution is exempt from both. On Daniel’s $4,400, that is about $337 he would never recover by funding the same dollars into the 401(k) instead.
This is the quiet reason the HSA outranks additional 401(k) dollars after the match. Same 24% income-tax treatment going in, same tax-free growth — but the HSA adds a FICA exemption on the way in and a tax-free exit on the way out for medical costs. It is a strictly better account for the post-match dollars, provided you keep an HDHP and invest (not just park) the balance.
What most people get wrong
- Myth: “Max the 401(k) first because the limit is bigger.” The size of the limit is irrelevant to ordering. Sequence by return per dollar: match (50%+), then HSA (32%+ with FICA and a tax-free exit), then the rest of the 401(k). Filling a $24,500 bucket before a $4,400 bucket leaves the better dollars unused.
- Myth: “An HSA is just for current medical bills.” The strongest play is to invest the HSA and pay current medical costs out of pocket, saving every receipt. You can reimburse yourself tax-free decades later — there is no deadline in IRC §223 — turning the HSA into a stealth retirement account with tax-free compounding in between.
- Myth: “Funding the HSA cuts my 401(k) room.” The $24,500 and $4,400/$8,750 limits are independent code sections. You can max both. There is no offset.
- Myth: “After 65 the HSA penalizes non-medical spending.” The 20% penalty disappears at 65. After 65, non-medical HSA withdrawals are simply taxed as ordinary income — identical to a traditional 401(k). So the HSA is, at worst, a 401(k); at best, tax-free for medical care. There is no downside scenario relative to the 401(k).
The 30-year math: why $4,400/year in an HSA compounds harder
The reason the HSA earns its spot ahead of extra 401(k) dollars shows up over decades, not in year one. Suppose Daniel funds the full $4,400 self-only HSA every year from age 32 to 65 (33 years) and invests it at a 7% nominal return. That stream grows to roughly $525,000 — and because qualified medical withdrawals are tax-free under IRC §223(f)(1), every dollar of that balance is spendable without a tax haircut when he pays Medicare premiums, dental, vision, hearing aids, and long-term-care insurance in retirement.
Run the identical $4,400/year through a traditional 401(k) instead, and the gross balance is the same $525,000 — but Daniel owes ordinary income tax on every withdrawal. At even a 22% retirement bracket, that is a roughly $115,000 lifetime tax bill the HSA route avoids on the medical-spending portion. The two accounts have identical contribution-and-growth mechanics; the HSA simply adds a tax-free exit lane the 401(k) structurally cannot offer. That gap — not the headline contribution limit — is why $4,400 of HSA room outranks the next $4,400 of 401(k) room.
The catch-up rules sweeten this further. Starting at age 55, Daniel can add the $1,000 HSA catch-up under IRC §223(b)(3), pushing his self-only contribution to $5,400 a year. If he marries and moves to a family HDHP, the family cap of $8,750 plus a $1,000 catch-up for each spouse’s own HSA means a couple in their late 50s can shelter up to $10,750 a year in triple-tax-free space — a meaningful late-career acceleration that the 401(k)’s $8,000 catch-up (or $11,250 super catch-up at 60–63 under SECURE 2.0 §109) complements rather than replaces.
When the order changes
The match-then-HSA sequence holds for nearly every HDHP-enrolled worker, but three situations shift it:
- No employer match. Then there is no step 1. Start directly at the HSA, because the triple tax break now leads.
- No HDHP / not HSA-eligible. You cannot fund an HSA without a qualifying HDHP (IRC §223(c)). The order collapses to: match, then 401(k)/Roth IRA. Switching to an HSA-eligible plan during open enrollment may be worth more than the lower deductible of a richer plan.
- You need the cash flow for near-term medical costs. If you expect to spend the HSA every year on deductibles, you still get the deduction, but you lose the compounding edge. The retirement-account thesis assumes you can leave the HSA invested.
The decision lever
Set your 401(k) deferral to exactly capture the full match — 6% in Daniel’s case — then point your next savings dollars at the HSA until you hit $4,400 self-only or $8,750 family, and only then raise the 401(k) deferral toward $24,500. Two payroll adjustments, made today during open enrollment or any pay period, lock in the highest guaranteed return available (the match) followed by the only triple-tax-free account in the code (the HSA). The lever is the deferral-percentage box in your payroll portal: dial it to the match, fund the HSA, then climb the rest of the 401(k).
Join the 2026 tax newsletter
Decision checklists + key 2026 federal/state numbers. Free, one click.
Frequently asked
Neither — fund the 401(k) only up to the full employer match first, because a 50%-on-6% match is a guaranteed 50% return. After the match is captured, the HSA wins the next dollars: it is the only account with a triple tax break. So the order is match, then HSA ($4,400 self-only / $8,750 family for 2026), then finish the 401(k).
Dollar-for-dollar after the match, yes. A traditional 401(k) is taxed on the way out; an HSA is never taxed if spent on qualified medical care, and post-65 non-medical withdrawals are taxed like a 401(k) anyway. So the HSA is a 401(k) with an extra tax-free exit lane. The 2026 cap is only $4,400 self-only, so it fills fast.
A 50%-on-6% match returns 50 cents per dollar instantly — a guaranteed 50% return before any growth. The HSA at a 32% marginal rate saves 32 cents per dollar in federal tax plus 7.65% in FICA via payroll deferral. The match (50%+) beats the HSA (about 40% combined) on the first dollars, which is why the match goes first.
Yes — and the funding order is match first, then HSA. They are separate limits under separate code sections: in 2026 you can defer up to $24,500 to a 401(k) (IRC §402(g)) and contribute up to $4,400 self-only or $8,750 family to an HSA (IRC §223(b)), plus a $1,000 HSA catch-up at age 55+. You must be enrolled in a qualifying HDHP to fund the HSA.
1) 401(k) up to the full match. 2) HSA to the cap ($4,400 / $8,750). 3) Roth IRA to $7,500 if eligible (single phase-out $150K–$165K). 4) Finish the 401(k) toward $24,500. 5) Taxable brokerage. The HSA jumps ahead of the IRA because its triple tax break is unique.
No. After you capture the match first, the $24,500 401(k) deferral limit and the $4,400 / $8,750 HSA limit stay fully independent. Funding one does not shrink the other. You can fully fund both in the same year — $24,500 plus $8,750 family equals $33,250 of tax-advantaged contributions, separate from any IRA.
Because the match is the single highest-return move available. A 50%-on-6% match pays a guaranteed 50% on the first 6% of pay — roughly $3,600 free on a $120K salary. No tax break, including the HSA’s triple advantage, comes close to a guaranteed 50% return, so the match is always first.
Related guides
Retirement Income Planning
The funding-order decision is the foundation of every retirement plan. This hub covers how HSA, 401(k), and IRA balances coordinate into a tax-efficient withdrawal sequence decades later.
Learn Hub
Browse the full library of decision-stage tax and retirement guides, including contribution-limit walkthroughs and account-priority frameworks that pair with this funding-order playbook.
Above-the-Line Deductions in 2026: HSA, Educator, Self-Employment
The HSA deduction is above-the-line, meaning it lowers your AGI even if you don’t itemize. This guide shows how the HSA stacks with other above-the-line deductions to cut your marginal tax bill.
Mega Backdoor Roth: Plans That Support It and Plans That Don't
Once you’ve captured the match and maxed the HSA, the mega backdoor Roth is the next lever for high earners — if your plan allows after-tax contributions and in-plan conversions.
COBRA vs. ACA at $200K MAGI: HSA-Eligible HDHP Strategy Post-Layoff
Your HSA only works while you’re enrolled in a qualifying HDHP. After a layoff, choosing an HSA-eligible plan keeps the funding order intact — this guide weighs COBRA against ACA for HDHP access.
Join the Life Money USA newsletter
Decision checklists, 2026 federal + state numbers, and our glossary. One click, free.
Join the newsletter