DividndDividndJoin the waitlist

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

You've got the match. Now the next dollar. Both accounts cut your income tax, but only one skips payroll tax and comes out tax-free.

Into your 401(k)

$900

tax saved now (federal income tax). Taxed as income when you withdraw in retirement.

Into your HSA

$890

saved now, and it skips payroll tax a 401(k) pays. Withdrawals for medical costs are tax-free forever, the one thing a 401(k) can’t do.

Where your next dollar should go

First, contribute enough to your 401(k) to grab your full employer match, that’s free money nothing else beats. After that, the HSAis usually the best next dollar: it’s the only account that’s tax-free going in, growing, and coming out (for medical costs). Once your HSA is maxed, go back to the 401(k). An HSA requires a high-deductible health plan (HDHP) to contribute, and the payroll-tax saving applies when you contribute through your employer’s payroll. In most states the HSA also trims state income tax; California and New Jersey are the exceptions, so the up-front numbers are closer there, but the tax-free withdrawals still make it the top pick after the match.

General information, not investment, tax, or legal advice. Full note at the bottom of the page.

The order that actually matters

There's a simple hierarchy for where each dollar should go. First, the 401(k) match: contribute enough to capture every dollar your employer offers, because that's an instant, risk-free return nothing else beats.

Then the HSA. A traditional 401(k) and an HSA both come out before income tax, so they save you the same amount on federal and state income tax. The HSA pulls ahead for two reasons: it also skips the 7.65% payroll (FICA) tax that a 401(k) still pays, and withdrawals for medical costs are never taxed. That's the "triple-tax-free" advantage, and it's why the HSA is usually the best home for your next dollar once the match is handled. (The payroll-tax saving applies to HSA contributions made through your employer's payroll.)

Then back to the 401(k) (and a Roth IRA) once the HSA is maxed. One catch: you can only fund an HSA if you're on a high-deductible health plan. If you're not, the 401(k) and a Roth IRA are your next stops.

Frequently asked questions

Should I use my HSA or 401(k) first?

Grab your full employer 401(k) match first, that's free money. After that, an HSA is usually the best next dollar because it's the only triple-tax-free account. Once your HSA is maxed, go back to the 401(k).

Why is the HSA called triple-tax-free?

Three reasons: contributions go in pre-tax (and skip payroll tax too, unlike a 401(k)), the money grows tax-free, and withdrawals for qualified medical expenses are never taxed. No other account does all three.

Do I need a special health plan for an HSA?

Yes. You can only contribute to an HSA if you're enrolled in a high-deductible health plan (HDHP). Many employer plans qualify, check whether yours is HSA-eligible.

Can I invest my HSA, or is it just for spending?

Most HSA providers let you invest the balance above a small cash threshold, just like a 401(k). Invested and left to grow, an HSA can become a powerful retirement account, since after age 65 you can withdraw for any reason (medical stays tax-free).

What if I have medical bills right now?

You can still contribute and either pay bills from the HSA or pay out of pocket and save the receipts to reimburse yourself tax-free later. Either way the contribution lowers this year's taxes.

Want this done for you, automatically?

Dividnd builds your full forecast and tax math from your real numbers, free. Join the waitlist for the personalized plan that puts moves like these on autopilot.

Join the waitlist

More free tools

401(k) Match CalculatorSee what your employer match is actually worth, and whether you're leaving free money on the table.First Paycheck CalculatorGross to net for your first job, by state. See your real take-home before payday.

For general information only. These calculators use simplified, current-year assumptions and are not tax, legal, or investment advice. Your actual numbers depend on your full situation. Dividnd is not a registered investment adviser.