dayblip
Finance6 min read · Published October 2026

HSA vs 401k in 2026: Which to Fund First?

Most savers fill the 401k and never look at the HSA. If you qualify for one, the HSA has the better tax treatment of the two. Here is the math and the order to fund them.

Quick Answer

Fund your 401k up to the full employer match first. Then fund an HSA if you have a high-deductible health plan, up to $4,400 for self-only coverage in 2026. Then go back to the 401k. On a $100,000 salary, a $4,400 payroll HSA contribution saves $1,305 in tax this year. The same amount in a 401k saves $968, because a 401k does not skip the 7.65% payroll tax.

Share Your Result

Surprised by this number? Share it with friends and family

Why an HSA Beats a 401k on Tax

A traditional 401k gives you two of three tax breaks. The money goes in before income tax, and it grows untaxed. You pay income tax when you withdraw it.

An HSA gives you all three. Contributions go in before income tax. They grow untaxed. Withdrawals for qualified medical costs come out untaxed too. If you fund the HSA through your employer's payroll plan, the contribution also skips Social Security and Medicare tax, which a 401k never does.

The catch is eligibility. You need a high-deductible health plan. The 2026 limit is $4,400 for self-only coverage and $8,750 for family coverage, plus $1,000 more if you are 55 or older. The 401k limit is $24,500, so the HSA is a small account next to it.

The Math at Three Salaries

The model: a single filer, the $16,100 standard deduction and federal tax only. The same $4,400 goes into each account and grows 7% a year for 30 years. The 401k is withdrawn over 25 years on top of $30,000 of other taxable income. The HSA pays medical costs, so nothing is taxed.

SalaryIncome tax savedFICA saved (HSA only)HSA saves todayHSA after 30 years401k after tax
$50,000$528$337$865$33,494$29,475
$100,000$968$337$1,305$33,494$29,475
$200,000$1,056$64$1,120$33,494$29,475

At $100,000, the $4,400 contribution saves $968 in income tax at the 22% bracket. The HSA adds $337 in payroll tax, for $1,305 in total. That is $337 the 401k cannot match.

The payroll tax saving shrinks at higher pay. At $200,000, wages are above the $184,500 Social Security wage base, so the HSA saves only the Medicare part: $64.

After 30 years the $4,400 grows to $33,494. Spent on medical costs, all of it is yours. The same amount in a 401k leaves $29,475 after tax in this model.

The $100,000 Example, Step by Step

1. Income tax. A $4,400 pre-tax contribution cuts taxable income from $83,900 to $79,500. Federal income tax falls by $968.

2. Payroll tax. Wages subject to Social Security and Medicare drop from $100,000 to $95,600 when the HSA is funded through payroll. At 7.65%, that saves $337. A 401k deferral saves none of this, because 401k contributions still count as FICA wages.

3. Total. $968 plus $337 is $1,305, or 30% of the contribution, returned in the first year.

4. Growth. At 7% for 30 years, $4,400 becomes $33,494. If it covers medical costs, you owe nothing on it.

Family Coverage and the Catch-Up

With family coverage the 2026 limit rises to $8,750. At $100,000, that is $4,350 more room than self-only coverage, and every extra dollar saves tax the same way. Savers aged 55 and older can add $1,000 on top of either limit.

Employer contributions count toward the limit. If your employer puts in $500, you can add only $3,900 on a self-only plan. Check your pay stub before you set your own amount, or you risk an excess contribution that triggers a tax.

Common Mistakes

Leaving the balance in cash. Many HSAs pay almost no interest on cash. Most providers let you invest the balance once it passes a set amount. A long-term HSA left in cash gives up the growth that makes it valuable.

Paying from the HSA by habit. If you can cover this year's bills from your budget, letting the HSA grow gives you more tax-free money later. Keep the receipts.

Skipping the match for the HSA. The match comes first. An employer match is a return no tax break matches.

The Order to Fund Them

1. The 401k up to the full match. A match is an instant return on your contribution. Nothing else beats it. See how much to save in a 401k.

2. The HSA, to the limit. If you are eligible, this is the best tax treatment available.

3. More 401k. Return to the 401k and fill it toward $24,500. Choose between types with Roth vs traditional 401k.

When the HSA Is the Wrong Move

A high-deductible plan can cost more than a traditional plan if you have frequent medical needs. Compare your total yearly cost, premiums plus the deductible you would likely pay, before you switch plans just to open an HSA. The tax saving is a few hundred dollars. A bad plan choice can cost thousands.

You also cannot contribute once you enroll in Medicare. Some states, including California and New Jersey, do not give the HSA contribution a state income tax break. Check your state.

How to Use an HSA as a Retirement Account

Pay current medical bills from cash and keep the receipts. Leave the HSA invested. You can reimburse yourself for those costs years later, tax-free, as long as the expense happened after you opened the account.

After age 65, you can also withdraw for any purpose. Non-medical withdrawals are taxed as ordinary income with no penalty, so the account works like a traditional 401k in the worst case. Medical withdrawals stay tax-free.

See what a pre-tax HSA and 401k contribution does to your paycheck:

Take Home Pay Calculator →

Disclaimer: This article is for educational purposes only and does not constitute tax, legal, medical or financial advice. Figures use 2026 federal rules, a simplified single-filer model and an assumed 7% return. Your results depend on your state, health plan and employer rules. Consult a qualified professional.

Try These Tools

Share this article

Share Your Result

Surprised by this number? Share it with friends and family