Most personal finance advice treats the 401k as the obvious first move. Put money in, lower your taxes, done. It's not wrong — a traditional 401k is a great account. But there's a detail that doesn't get mentioned often enough: the HSA is actually more tax-efficient per dollar than a 401k, and for people who have access to both, the order you fund them in matters.
Here's the breakdown.
The Detail Most People Miss: FICA
When you contribute to a traditional 401k through payroll, you reduce your federal income taxes. You do not reduce your FICA taxes — Social Security (6.2%) and Medicare (1.45%). Those still come out of every dollar you earn, including the dollars going into the 401k.
When you contribute to an HSA through payroll, you reduce both. Federal income taxes, state income taxes in most states, and FICA. The HSA goes in before FICA is calculated.
At the 22% federal bracket, the savings per dollar look like this:
| Account | Income Tax Savings | FICA Savings | Total Tax Saved Per Dollar |
|---|---|---|---|
| Traditional 401k | 22¢ | 0¢ | 22¢ |
| HSA (through payroll) | 22¢ | 7.65¢ | 29.65¢ |
On every dollar you put into an HSA, you save about 35% more in taxes than you would putting the same dollar into a 401k. That's the FICA difference, and most people have never heard this explained.
For family coverage at the full $8,750 HSA limit, that 7.65¢-per-dollar difference adds up to $669 in additional FICA savings versus an equivalent 401k contribution.
The Right Order
Given this, here's the priority order that makes mathematical sense for most people with access to both accounts:
Step 1: Contribute to 401k up to the full employer match
Employer match changes the math entirely. A 50% match means an instant 50% return before any tax consideration. Nothing beats free money. Get the full match first, no question. See how 401k employer match works for a full breakdown of common formulas and vesting rules.
Step 2: Max the HSA
Once you've captured the full employer match, the HSA is the most efficient place to put the next dollar. $4,400 if you have individual coverage, $8,750 for family. The FICA savings you get here you will never get from a 401k. For the full picture of what the HSA actually saves you, see how an HSA saves you money.
Step 3: Continue contributing to the 401k
After the match and the HSA, go back to the 401k. You've now stacked both accounts in order of efficiency.
Optional Step 4: Roth IRA or additional taxable investing
If you've hit the 401k limit ($24,500) or want flexibility, a Roth IRA or brokerage account comes next. Different tradeoffs, different conversation.
What This Looks Like in Real Dollars at $80,000
Single filer, 22% tax bracket, employer offers 50% match up to 6%, individual HDHP coverage.
Following the priority order:
| Step | Contribution | Tax Savings | Take-Home Reduction |
|---|---|---|---|
| 401k to match (6% = $4,800) | $4,800 | ~$1,056 (22%) | ~$3,744 |
| + Employer match | +$2,400 | — | $0 (free) |
| HSA max ($4,400) | $4,400 | ~$1,305 (29.65%) | ~$3,095 |
| Total to retirement/HSA | $11,600 | ~$2,361 | ~$6,839 |
Out of $11,600 going toward retirement and medical savings, you're only reducing take-home by $6,839. The other $4,761 comes from tax savings and employer contributions. Your effective rate of return before a single investment grows: 70%.
The Same Math at $120,000
Single filer, 22% bracket (same — $120k is still in the 22% bracket after the standard deduction), family HSA coverage.
| Step | Contribution | Tax Savings | Take-Home Reduction |
|---|---|---|---|
| 401k to match (6% = $7,200) | $7,200 | ~$1,584 | ~$5,616 |
| + Employer match | +$3,600 | — | $0 |
| HSA max ($8,750) | $8,750 | ~$2,594 | ~$6,156 |
| Total | $19,550 | ~$4,178 | ~$11,772 |
At $120,000 with family coverage, you're putting nearly $20,000 toward retirement and medical savings for a net take-home reduction of about $11,772. That's $7,778 in combined tax savings and employer contributions working in your favor.
The Caveat: Not Everyone Can Get an HSA
The HSA requires enrollment in a qualifying High Deductible Health Plan. If your employer doesn't offer one, or if you're on a spouse's non-HDHP plan, you can't contribute to an HSA regardless of how efficient it is. About half of large employers offer HDHP options; smaller employers are less consistent.
If you don't have HSA access, the priority order simplifies: 401k to the match, then max the 401k, then Roth IRA or other accounts.
Also worth noting: some states don't conform to the federal HSA tax treatment. New Jersey and California still tax HSA contributions at the state level, which reduces (but doesn't eliminate) the benefit. Check your state's take-home pay to see how your state income tax affects the net savings.
What About Self-Employed People?
If you're self-employed and using a Solo 401k or SEP-IRA, the FICA picture is different. You pay self-employment tax (15.3%) on business income, and while HSA contributions reduce your federal income taxes, they don't reduce the SE tax base for self-employed workers. The 401k contributions to a Solo 401k don't reduce SE tax either — SE tax is calculated on net self-employment income before the retirement deduction.
For self-employed workers with HDHP coverage, the HSA is still an excellent account. The math just doesn't have the same FICA advantage as it does for W-2 employees. The 1099 tax calculator can show you the full picture for self-employment income.
The Simple Version
If your employer matches 401k contributions: get the full match first. Then max the HSA. Then go back to the 401k.
If your employer doesn't match: max the HSA first. Then the 401k.
The FICA savings from the HSA are permanent — you'll never recover them in a different account. Every year you skip the HSA while the account is available to you is a year of FICA savings that don't compound.
Use the HSA Calculator to see your exact HSA tax savings, and the 401k Calculator to model your 401k contributions and employer match side by side.
The 55+ Angle: Extra HSA Room at the Best Possible Time
If you're 55 or older and still on an HDHP, you get a $1,000 annual catch-up contribution on top of the standard limit. That's $5,400 individual or $9,750 family in 2026. This applies per account holder — if both spouses are 55+ and have their own HSAs (you need separate accounts if you're both eligible), each gets the $1,000 catch-up.
This matters more at 55+ for one specific reason: medical costs in retirement are substantial. Fidelity estimates a 65-year-old couple needs about $330,000 saved for healthcare in retirement, and that figure doesn't include long-term care. An HSA is the only account that addresses this directly — the money can only be used tax-free for medical expenses (until 65, when it converts to general use). Building it up aggressively in your 50s with catch-up contributions means you're stacking a dedicated medical fund that the IRS will never tax if it's used for its intended purpose.
Compare this to using your 401k for medical costs in retirement: every dollar withdrawn is taxable income. The HSA wins that comparison every time for out-of-pocket medical spending.
Account Comparison: Full Side-by-Side
| Feature | Traditional 401k | Roth 401k | HSA |
|---|---|---|---|
| 2026 contribution limit | $24,500 | $24,500 (shared) | $4,400 / $8,750 |
| Catch-up (50+) | $8,000 | $8,000 (shared) | $1,000 (55+) |
| Reduces federal income tax now | Yes | No | Yes |
| Reduces FICA (W-2 payroll) | No | No | Yes |
| Tax-free growth | No (deferred) | Yes | Yes |
| Tax-free withdrawals | No | Yes (qualified) | Yes (medical) |
| Required minimum distributions | Yes (age 73) | No (after 2024) | No |
| Early access before 59½ | 10% penalty + tax (exceptions apply) | 10% penalty + tax (same as traditional) | Medical expenses: no penalty |
| Requires HDHP | No | No | Yes |
The HSA is the only account that wins on FICA. The Roth wins on tax-free withdrawals for non-medical spending. The traditional 401k wins on simplicity and high contribution limits. Priority order: match → HSA → then pick traditional vs Roth based on whether you expect to be in a higher bracket now or later.
State Tax Nuances Worth Knowing
The federal tax benefits are consistent across all 50 states, but a handful of states refuse to conform to the federal HSA treatment:
California and New Jersey still tax HSA contributions at the state level. In both states, you don't get a state income tax deduction for HSA contributions, and growth inside the account is taxable at the state level. The federal benefits still apply — you're not double-taxed federally — but the state-level advantage disappears entirely. For high-earners in California (13.3% top rate), this is a meaningful reduction in the total benefit.
Alabama doesn't recognize HSA deductions on state returns either.
Everyone else: 47 states and DC fully conform to the federal treatment, meaning HSA contributions reduce both federal and state taxable income.
The 401k side has its own state-level variation: a few states (Pennsylvania being the most notable) don't allow a state income tax deduction for 401k contributions, while still taxing distributions. This means Pennsylvania residents pay state income tax on money going in and coming out — an unusual double-taxation situation at the state level that makes Roth 401k contributions more attractive for PA residents. Use the US Tax Calculator to see how your specific state treats these deductions.
Frequently Asked Questions
Can you contribute to both a 401k and an HSA in the same year?
Yes — these are completely separate contribution limits. The $24,500 401k limit and the $4,400/$8,750 HSA limit are independent. Contributing the max to both is the goal of the priority framework described above. The only requirement for the HSA is that you're enrolled in an HDHP for the months you're contributing.
Does my HSA contribution affect how much I can put in my 401k?
No. They don't interact at all from a limit perspective. Reducing your HSA contribution doesn't free up more 401k room, and vice versa. The only thing they share is that both reduce your taxable income for federal (and most state) income tax purposes.
Can I roll an HSA into a 401k or IRA?
No. HSA-to-retirement account rollovers aren't permitted under IRS rules. You also can't roll a 401k or IRA into an HSA. There is one exception: a once-in-a-lifetime qualified HSA funding distribution from a Traditional or Roth IRA, which lets you move money from an IRA to an HSA up to the annual contribution limit. It's a niche move, but it can make sense if you have an overfunded IRA and high expected medical expenses. It counts against your annual HSA contribution limit for the year.
What if my employer doesn't offer an HSA alongside the HDHP?
You can open your own HSA at any bank or investment firm that offers them — Fidelity, Lively, HealthEquity, and Optum are common choices. You'd contribute directly rather than through payroll. The income tax deduction still applies (you claim it on your tax return via Form 8889), but the FICA savings do not — those only apply to payroll deductions through a Section 125 cafeteria plan. Still worth doing for the income tax benefit; just adjust the savings math to exclude the 7.65%.
Which account is better for someone who expects to retire soon?
The HSA wins for near-retirement workers who have significant medical costs coming, because those withdrawals will be tax-free. The 401k wins for accumulating the largest balance for non-medical retirement spending, since you can contribute much more annually ($24,500 vs $4,400). In practice, both serve different functions — the HSA is the dedicated medical fund, the 401k is the general retirement fund — and most financial planners recommend maxing the HSA first (after the match) precisely because you can't retroactively put money in once you're no longer on an HDHP.
For a full breakdown of how each deduction on your paycheck works together — 401k, HSA, FICA, federal withholding — see paycheck deductions explained. And if you're self-employed navigating these decisions without an employer match, the 1099 tax calculator shows the full quarterly tax picture.
IRS guidance on HSA eligibility and contribution limits: Publication 969. 401(k) limit source: IRS Retirement Topics – Contribution Limits.