Skip to content
A2ZCalc
Personal Finance

HSA vs 401(k): Where Should the Next Dollar Go?

By Rahman · · 6 min read · Last reviewed

Quick answer

To get the most from every dollar, take the full employer 401(k) match first, because it's a guaranteed, immediate return no investment can match. Then put further savings into an HSA if you're eligible, and after that go back to the 401(k) or an IRA. On a $60,000 salary with a match of 100% up to 3%, contributing $1,800 gets you the full $1,800 match. If you then put a further $4,200 into an HSA instead of the 401(k), you avoid the same income tax either account would, plus $321.30 of Social Security and Medicare tax that the 401(k) contribution doesn't avoid. Only HSA contributions made through payroll get that extra saving.

A 401(k) and a Health Savings Account both come with real tax advantages, but they aren't equally good homes for your next spare dollar. And an employer match changes the picture before either account's own tax treatment even comes into it.

This guide sets out the order that gets the most out of a fixed amount of savings, worked through on a particular salary and match.

The employer match always comes first

An employer match is the only part of this decision that gives you a guaranteed, immediate return rather than a hoped-for one. On a $60,000 salary, with your employer matching 100% of what you put in up to 3% of salary, contributing $1,800 (3% of salary) brings in another $1,800 from your employer. That part of your contribution has doubled before any investment growth at all.

Leaving any of an available match on the table means giving up pay you've already earned. That's why it comes ahead of every other choice in this guide, including the HSA's own tax advantage.

What the HSA offers that the 401(k) doesn't

Once you've captured the full match, your next dollar can go into an HSA (if you're enrolled in a qualifying high-deductible health plan) or back into the 401(k). A traditional 401(k) contribution and an HSA contribution both reduce your taxable income by the same amount, so the income tax saving alone doesn't separate them.

The difference is FICA. A 401(k) contribution made through payroll still has Social Security and Medicare tax taken from it, and only the income tax is put off. An HSA contribution made through payroll (under a "cafeteria plan", or Section 125 arrangement) escapes FICA as well. On a further $4,200 put in after the match, that's $321.30 of Social Security and Medicare tax (7.65% combined) that an HSA contribution avoids and a 401(k) contribution doesn't.

  • The FICA saving only applies to HSA contributions made through payroll. If you pay into an HSA directly, outside payroll, you still get the income tax deduction but not the FICA saving.
  • An HSA also has a third tax break that a 401(k) doesn't: money taken out for qualified medical costs is tax-free, while a 401(k) withdrawal is always taxed as ordinary income.
  • The HSA Calculator and 401(k) Calculator both project long-term growth. This guide is about where your next dollar should go, not what either account will be worth when you retire.

The order in practice

Putting it all together: first, take the full employer match, whichever account it's offered on. Next, if you're eligible, put further savings into an HSA up to its yearly limit. Once the HSA is full, or if you can't have one, further savings go back into the 401(k) up to its own yearly limit, or into an IRA.

This order assumes you invest the HSA money and leave it to grow rather than spending it on this year's medical bills. An HSA used as a spending account for medical costs as they come up doesn't have the same long-term advantage that puts it ahead of an unmatched 401(k) contribution.

Frequently Asked Questions

Should I ever skip the employer match to fund an HSA instead?

⌄

No. The employer match is a guaranteed, immediate return that nothing else here offers. Take the full match first, then put further savings into whichever suits you better, the HSA or more 401(k)/IRA contributions.

Does the FICA saving apply to all HSA contributions?

⌄

Only to contributions made through payroll under your employer's cafeteria plan. If you pay into an HSA directly, outside payroll, you still get the income tax deduction when you file, but you don't avoid Social Security or Medicare tax.

What if I am not eligible for an HSA?

⌄

To have an HSA you need to be enrolled in a qualifying high-deductible health plan. Without one, the choice is between the 401(k) and options like an IRA, and the match-first rule still applies to the 401(k).

Is an HSA really better than a 401(k) after the match is captured?

⌄

It has a real edge, from the FICA saving and the tax-free medical withdrawals, but only if you invest the balance and let it grow rather than spending it on current medical costs. An HSA used purely to pay this year's medical bills doesn't have that advantage.

Calculators referenced

More guides