FinanceFacts101

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

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

HSA vs 401(k) for 2026: take the full match, then fill the HSA. $1,000 in each grows to $5,427 in 25 years at 7%; only the HSA is untaxed in and out.

As of October 2026, the order that works for most people is: put money into your 401(k) until you get the full employer match, then into a health savings account up to the 2026 limit of $4,400 self-only or $8,750 family, then back into the 401(k). The HSA vs 401(k) question comes down to one number: for a saver in the 22% federal bracket paying 5% state tax, an HSA funded through payroll and later spent on medical care leaves about 53% more after tax per dollar of take-home pay than a traditional 401(k), if your tax rate in retirement matches today's. A match only beats that when the employer adds more than about 53 cents per dollar.

That 53% comes from skipping three taxes where the 401(k) skips one or two. It rests on assumptions this guide states up front. It shrinks to about 22–31% in California, where the state taxes HSAs, and to about 12% if the HSA money ends up spent on something other than health care. Below are the tax mechanics, the 2026 limits, what the 2025 tax law changed, the state exceptions, and $1,000 in each account worked through 25 years.

This is general information. The worked example uses stated assumptions and limits current as of early October 2026. It is not personal advice, and your plan documents govern.

Who this is for — and who it is not for

This is for a US employee with an HSA-eligible health plan at work and spare cash to save, deciding which account comes first. It assumes your employer runs HSA contributions through payroll as a section 125 cafeteria plan, and that you have an emergency fund, so neither account will be raided in the first bad month.

It is not for someone without an HSA-eligible plan: no plan, no HSA, and the question is settled. Picking between the plans themselves is a separate decision, covered in HSA vs FSA. It is not for anyone enrolled in Medicare, who can no longer contribute at all. And it is not the full savings ladder (match, debt, HSA, IRA, back to the 401(k)). That ladder, and the details of how match formulas work, are in how much of your salary to defer for the 401(k) match.

HSA vs 401(k): counting the tax breaks

A traditional 401(k) deferral skips federal and, in most states, state income tax going in. It grows tax-deferred and is taxed as ordinary income coming out. Before 59½ there is usually also a 10% additional tax on early distributions. That is one break on the way in and one while the money grows.

An HSA gets a break at all three stages. Contributions are deductible, or excluded from wages when they go through payroll. Growth is untaxed. And withdrawals for qualified medical expenses are tax-free at any age. IRS Publication 969 adds the rule that matters later: spend HSA money on anything else and it is taxed as income, plus an additional 20% tax, but "There is no additional tax on distributions made after the date you are disabled, reach age 65, or die."

The 401(k) skips income tax going in; the HSA also skips FICA and, for medical spending, all tax coming out
Where each account is taxed Federal rules per IRS Publications 969 and 15, Topic 558 and the RMD FAQs, as of October 2026. HSA column assumes section 125 payroll contributions. Some states differ.

On federal tax, then, an HSA funded through payroll is never worse than a traditional 401(k) unless you take money out for non-medical uses before 65. After 65, a non-medical withdrawal is taxed the same way a 401(k) withdrawal is. A withdrawal for medical care is never taxed at all.

The FICA gap: payroll HSA dollars skip Social Security and Medicare tax

A 401(k) deferral is not subject to income tax, but it is still subject to FICA. IRS Publication 15 lists elective 401(k) deferrals as "Taxable" for both Social Security and Medicare. The same publication says HSA contributions "made under a salary reduction arrangement in a section 125 cafeteria plan aren't wages and aren't subject to employment taxes or withholding."

That is 7.65% of every dollar: 6.2% Social Security on wages up to the 2026 wage base of $184,500, plus 1.45% Medicare on all wages. Above $200,000 of wages, employers also withhold the 0.9% Additional Medicare Tax.

A payroll HSA contribution costs $653.50 of take-home pay per $1,000, against $730 for a 401(k) deferral or a direct HSA deposit
Take-home pay given up per $1,000 contributed 22% federal + 5% state income tax; 7.65% FICA on wages under the 2026 wage base of $184,500 (IRS Publication 15). A direct HSA deposit is deducted on Form 8889 but still pays FICA.

Two catches. First, the gap only exists for payroll contributions. Publication 15 says employee HSA contributions made through an ordinary payroll deduction plan, rather than a cafeteria plan, "must be included in wages and are subject to social security, Medicare, and FUTA taxes". Money you send the custodian yourself gets the income tax deduction on Form 8889 but no FICA relief. Second, above the Social Security wage base the gap shrinks to the Medicare part: 1.45%, or 2.35% above $200,000.

The FICA you skip also slightly lowers the Social Security benefit those wages would have earned, because benefits are based on covered earnings. On $4,400 a year that effect is small, but it is not zero.

The 2026 limits, HDHP thresholds and what the 2025 law changed

The HSA numbers for 2026 come from Revenue Procedure 2025-19. The 401(k) numbers come from IRS Notice 2025-67. For anyone picking a 2027 plan this fall, Revenue Procedure 2026-24 has already set the 2027 HSA figures. The 2027 401(k) limit had not been published when this was written in early October 2026; last year's was announced on November 13.

The 2026 HSA limit is $4,400 self-only and $8,750 family, rising to $4,500 and $9,000 in 2027; the 401(k) limit is $24,500
2026 and 2027 contribution limits and HDHP thresholds HSA and HDHP: Rev. Proc. 2025-19 (2026) and Rev. Proc. 2026-24 (2027). 401(k): IRS Notice 2025-67. 2027 401(k) limits not published as of early October 2026.

Even a family HSA tops out at $8,750, plus $1,000 for each spouse aged 55 or older who holds their own account. A 401(k) takes $24,500 before catch-ups. So the HSA is the smaller, better account, and you fill it before the bigger one. Employer HSA contributions count toward the HSA limit. Employer 401(k) matches do not count toward your $24,500.

Public Law 119-21, the 2025 budget law, changed who can open an HSA. It did not change how much you can put in. Section 71306 made the telehealth safe harbor permanent: a plan with no deductible for telehealth and other remote care still counts as a high-deductible health plan, for plan years beginning after December 31, 2024. Section 71307 treats bronze and catastrophic plans "available as individual coverage through an Exchange" as HDHPs from January 2026. The IRS's Notice 2026-05 announcement says those plans "do not have to be purchased through an Exchange" to qualify. Section 71308 lets direct primary care arrangements costing up to $150 a month ($300 if they cover more than one person) sit alongside an HSA, and lets their fees be paid from it.

The 2025 law widened HSA eligibility through telehealth, bronze and catastrophic plans and direct primary care, but did not raise contribution limits
What the 2025 law changed for HSAs, and what it did not Public Law 119-21, sections 71306-71308 (enacted text on GovInfo); IRS Notice 2026-05 on bronze and catastrophic plans bought off-Exchange.

What the law did not do is just as important. It amended subsections (c), (d) and (g) of section 223, which cover eligibility, qualified expenses and inflation indexing. It left the contribution limits in subsection (b) alone, and it did not let Medicare enrollees contribute. If you buy your own coverage, a bronze or catastrophic plan now counts as HSA-eligible coverage even when its deductible and out-of-pocket design would not meet the general high-deductible health plan test.

Worked example: $1,000 in each account for 25 years

The assumptions, all stated:

  • A single filer earning $85,000. That puts her in the 22% federal bracket, which for 2026 starts above $50,400 of taxable income per the IRS 2026 inflation adjustments.
  • A 5% state that follows federal HSA rules, and 7.65% FICA, since her wages are below the $184,500 base.
  • Self-only HDHP coverage, with HSA contributions made through payroll.
  • A 7% annual return in both accounts and identical funds, so growth is identical.
  • The same 27% combined income tax rate in retirement as today.

She puts $1,000 into each account.

$1,000 grows to $5,427.43 in 25 years at 7% a year in either account; only the tax at the end differs
$1,000 at 7% a year for 25 years 7% effective annual return (6.785% nominal compounded monthly), identical in both accounts; reaches $5,427.43 before any tax. Illustrative return, not a forecast.

Both balances reach $5,427.43 after 25 years, because $1,000 × 1.07^25 = $5,427.43. The difference is what each one cost her to put in and what is left after tax at the end.

The 401(k) deferral reduced her take-home pay by $730: she skipped $270 of income tax but still paid $76.50 of FICA. The HSA contribution reduced it by $653.50, because she skipped the FICA as well. At withdrawal, the 401(k) leaves $3,962.03 after 27% tax. The HSA leaves $5,427.43 if spent on qualified care, $3,962.03 if spent on anything else after 65, and $2,876.54 if spent on something else before 65 (27% tax plus the 20% additional tax).

An HSA spent on medical care leaves $5,427 against $3,962 for an unmatched 401(k); a 50% match lifts the 401(k) to $5,943 and a 100% match to $7,924
What $1,000 is worth after tax in 25 years $1,000 contributed to each; 7% a year; 27% income tax (22% federal + 5% state) today and in retirement; 20% HSA additional tax before 65. The HSA cost $653.50 of take-home pay, the 401(k) $730.

To compare fairly, measure per dollar of take-home pay, because that is what "the next dollar" really means. The $730 that bought a $1,000 deferral would have bought a $1,117.06 HSA contribution. That grows to $6,062.78, and all of it stays hers if it pays for medical care: 53% more than the 401(k)'s $3,962.03. Even if spent on something other than health care after 65, it leaves $4,425.83, 11.7% more than the 401(k). That 11.7% is purely the skipped FICA. Run your own figures through the 401(k) calculator and the HSA vs FSA calculator, which use the same annual compounding.

Why the match usually still comes first

A match changes the 401(k) side of the comparison. At a 100% match, her $1,000 deferral becomes $2,000. That grows to $10,854.87 and leaves $7,924.05 after tax, beating the equal-cost HSA's $6,062.78 even if every HSA dollar goes to medical care. At a 50% match, the 401(k) leaves $5,943.04 against the HSA's $6,062.78. The two land within 2%.

A 401(k) needs a match of about 53 percent to equal an HSA dollar that is spent on medical care
The match that ties the HSA Worked-example assumptions: 22% federal + 5% state, 7.65% FICA, same tax rate in retirement, measured per dollar of take-home pay

The crossover depends on your tax rates, and it moves more than the standard advice admits:

The match needed to beat an HSA spent on care ranges from about 33% to 65% depending on tax rates, but only 4% to 12% if the HSA is spent on other things
Match rate a 401(k) needs to beat the HSA Per dollar of take-home pay, traditional 401(k), 7% growth in both (the rate cancels). FICA 7.65% below the wage base; bottom row assumes wages above $200,000, so only 2.35% Medicare is saved.

Three reasons to take the match first even when the table calls it close. First, the match is certain and arrives today, while the HSA's edge depends on decades of things going right: you stay eligible, invest the balance, and eventually have qualified expenses to spend it on. Second, any HSA dollar that ends up as a non-medical withdrawal drops the crossover to around 12%, which almost every match clears. Third, the two usually fit together anyway. On $85,000, capturing a 50%-of-6% match takes a $5,100 deferral costing $3,723 of take-home pay, and a full self-only HSA costs $2,875.40 more. If your budget covers both, the order does not matter.

Where the order does flip: a weak match, around 25 cents per dollar or less, paired with a saver who is confident the HSA will be spent on care. Unvested matches weaken the 401(k) further. Money you would forfeit by leaving in year two is worth less than the formula says.

If your tax rate will be lower in retirement

The worked example assumed the same 27% rate before and after retirement. If she expects to drop to 12% federal plus 5% state in retirement, the 401(k) withdrawal is taxed more lightly. The crossover match falls from 53.0% to 34.6%, and a 50% match now wins clearly.

The HSA's position against a 401(k) spent on non-medical uses does not change. Both are taxed at the same retirement rate, so the HSA keeps only its FICA edge of 11.7%. Against a Roth 401(k), the logic is the same as the Roth vs traditional 401(k) decision: at equal tax rates Roth and traditional end up identical, so the HSA beats both by the same margin. The HSA's advantage on medical spending holds whatever your tax rate does.

California, New Jersey and Pennsylvania: the state exceptions

Most states with an income tax follow the federal HSA rules. Three states change the answer, in different directions.

California does not recognise HSAs. The 2025 Schedule CA instructions say: "Federal law allows a deduction for contributions to an HSA account. California law does not conform." Employer HSA contributions from W-2 box 12, code W, which includes payroll contributions, are added back to California income. HSA interest and earnings "are taxable in the year earned". On the other hand, non-medical distributions included in federal income "are not taxable for California purposes." A 2025 bill to conform, AB 781, died on January 31, 2026. The 401(k) needs no California adjustment.

New Jersey gives HSAs no special treatment. Its 2025 NJ-1040 instructions exempt "Employer and employee contributions to 401(k) Plans up to the federal limit" and Archer MSAs, but not HSAs, and exclude salary-reduction cafeteria plans from the cafeteria-plan exemption, so payroll HSA contributions are generally taxed by the state.

Pennsylvania works the other way. Its 2025 PA-40 instructions say contributions to an employer retirement plan "are PA-taxable compensation", but HSA contributions are deductible because Pennsylvania "follows federal rules". Payments received after you retire from an eligible plan are generally not taxed by the state.

California and New Jersey tax HSA contributions but not 401(k) deferrals; Pennsylvania does the reverse
Three states that change the answer 22% federal and 7.65% FICA throughout; state rates from 2025 schedules at an $85,000 salary. Sources: FTB 2025 Schedule CA (540), 2025 NJ-1040 and 2025 PA-40 instructions.

Worked for a Californian at 22% federal and 9.3% state, $1,000 into an HSA costs $703.50 of take-home pay and $1,000 into a 401(k) costs $687. That is the only place in this guide where the HSA costs more up front. Spent on care after 25 years and net of California's tax on the growth, the HSA is worth between $4,659.46 (growth taxed every year, modeled as a drag on the 7% return) and $5,015.68 (gains taxed once, when sold). The 401(k) leaves $3,728.65 after 31.3% combined tax if she still lives in California. The HSA still wins on medical spending, but the crossover match falls to 22–31%, so a 50% match beats it comfortably.

Using the HSA as a retirement account: receipts and the age-65 rule

The retirement case for the HSA rests on two rules. The receipt rule: Notice 2004-50, Q&A-39, says "there is no time limit on when the distribution must occur" for a qualified expense incurred after the HSA was opened, so you can pay today's bills in cash and reimburse yourself decades later. The age-65 rule: after 65 the 20% additional tax disappears, and the worst case becomes ordinary income tax, the same as a 401(k). The step-by-step mechanics, including the Medicare six-month lookback, are in HSA vs FSA.

What matters for ordering is whether you will have enough qualified expenses to spend the HSA on tax-free. Usually you will. Medicare premiums count after 65 (Medigap premiums do not), and CMS set the 2026 standard Part B premium at $202.90 a month. That is $2,434.80 a year per person before any deductible, drug or dental bill.

Standard Medicare Part B premiums alone cost $2,434.80 a year per person in 2026, all payable tax-free from an HSA after 65
A qualified expense almost every retiree has CMS 2026 Medicare Parts A and B premiums fact sheet; Medicare premiums are qualified HSA expenses after 65 but Medigap premiums are not (IRS Publication 969)

Fidelity's 2026 retiree health cost estimate puts the after-tax savings a 65-year-old may need at $185,500, not counting long-term care. A self-only HSA maxed at $4,400 a year for 25 years at 7% reaches roughly $287,100, so a large balance can outrun what one person spends on care. Past that point, on our assumptions, extra HSA dollars are worth only the 11.7% FICA edge. Keep the receipts: Publication 969 puts the burden of showing that each withdrawal paid an unreimbursed qualified expense on you.

What the HSA does worse than a 401(k)

Three weaknesses deserve weight.

Heirs. A spouse named as beneficiary inherits the HSA as their own. Anyone else does not. Publication 969 says that for a non-spouse beneficiary "The account stops being an HSA" and its fair market value "becomes taxable to the beneficiary in the year in which you die". An inherited 401(k), by contrast, can usually be spread over up to ten years by most non-spouse heirs. A large HSA left to adult children lands in one tax year, often in their peak earning years. That argues for spending the HSA down first in retirement and leaving the 401(k) to non-spouse heirs.

Fees and cash floors. Many custodians charge account fees or require a cash balance before you can invest. An uninvested HSA earning near zero loses its whole compounding edge. You can move the money to another custodian with a trustee-to-trustee transfer, and that is worth doing once a year if your employer's custodian is expensive.

Eligibility. You can only contribute in months you are covered by a qualifying plan and not enrolled in Medicare. The 401(k) has no such gate. One point runs the other way: a 401(k) generally requires distributions from age 73, while an HSA never requires a withdrawal.

The decision, step by step

Take the full 401(k) match, fill the HSA through payroll, invest it and keep receipts, then return to the 401(k) and an IRA
The order for your next dollar For a saver eligible for both accounts; assumptions as in the worked example; limits as of October 2026

Put together: take the full match, fill the HSA through payroll, invest it and keep your receipts, then go back to the 401(k) and an IRA. Swap the first two steps only if the match is weak, the HSA will clearly be spent on care, and your state does not tax HSA contributions. For what the whole pile needs to add up to, see how much you need to retire, and for how each account cuts this year's tax bill, see tax-deductible investments.

FAQ

Should I max out my HSA or my 401(k) first?

Take the full 401(k) match first, then max the HSA, then go back to the 401(k). On our 22%-plus-5% assumptions, an HSA dollar spent on medical care ends up about 53% larger than an unmatched traditional 401(k) dollar, and a 50% match lands within 2% of it. The match still goes first because it is certain today, while the HSA's edge depends on how the money is eventually spent.

Is an HSA better than a 401(k) for retirement?

For money you will spend on health care, yes: it is the only account with no tax going in through payroll and none coming out. For money spent on anything else after 65, an HSA works like a traditional 401(k) taxed at the same rate, with a small extra edge from the 7.65% FICA you skipped going in. Its weak spots are a much smaller limit and a harsh rule for non-spouse heirs, who owe tax on the balance (less any of your final medical bills they pay within a year) in the year of death.

Do HSA contributions avoid FICA taxes?

Only when they go through your employer's section 125 cafeteria plan. IRS Publication 15 says those salary-reduction contributions are not wages and are not subject to employment taxes. Contributions through an ordinary payroll deduction, or sent directly to the custodian, still owe Social Security and Medicare tax, though you deduct them for income tax on Form 8889. A 401(k) deferral always owes FICA.

Does the 2025 tax law raise the 2026 HSA contribution limit?

No. Public Law 119-21 made the telehealth safe harbor permanent, made bronze and catastrophic Exchange plans HSA-eligible from January 2026, and let direct primary care arrangements sit alongside an HSA. It left the contribution limits in section 223(b) unchanged. The 2026 limits of $4,400 and $8,750 come from the normal inflation adjustment in Revenue Procedure 2025-19.

Sources

Next entry · No. 5,983Target-Date Fund vs Index Funds: Which Should You Hold?

See also