Should You Fund an HSA or Your 401(k) After the Match?

HSA or More 401(k): Where the Next Dollar Goes After the Match

After the Match, the HSA Usually Earns the Next Dollar

At a Glance: 2027 HSA limit is $4,500 self-only; Family coverage allows $9,000 in 2027; Medical withdrawals are taxed at $0

For most savers on an eligible health plan, the order is the 401(k) match first, then the HSA, then extra 401(k) deferrals. The HSA wins the middle slot because medical withdrawals are never taxed, which no 401(k) dollar can match.

The room is limited. For 2027 the IRS caps HSA contributions at $4,500 for self-only coverage and $9,000 for family coverage, up from $4,400 and $8,750 in 2026.

That cap is small next to the $24,500 employee limit on a 401(k) for 2026. So the real question is how to split the money, not which account gets all of it.

Why the Match Still Comes First

An employer match is money you only receive if you defer your own pay into the plan. Skipping it to fund an HSA trades a guaranteed contribution for a tax break.

The match formula sets how much you need to put in. Our guide on how much to contribute for the full 401k match walks through the common formulas and the per-paycheck trap.

Once your deferral reaches the cap in your formula, every extra dollar earns the same tax treatment whether it goes to more 401(k) or to an HSA. That is where the comparison starts.

What Changes on the HSA Side for 2027

The IRS published the 2027 HSA figures in Revenue Procedure 2026-24. Every line moved up a little, which matters if you set your payroll election during open enrollment.

HSA item 2026 2027
Contribution limit, self-only $4,400 $4,500
Contribution limit, family $8,750 $9,000
Minimum HDHP deductible, self-only $1,700 $1,750
Minimum HDHP deductible, family $3,400 $3,500
Out-of-pocket maximum, self-only $8,500 $8,700
Out-of-pocket maximum, family $17,000 $17,400

The 2027 figures come from the IRS revenue procedure and the 2026 figures from Publication 969. A family election set at the 2026 amount leaves $250 of 2027 room unused.

The Two Accounts Line by Line

Both accounts cut taxable income on the way in when you contribute through payroll. They part ways on the way out, and on who is allowed to use them.

Feature HSA 401(k) beyond the match
Who can contribute Only people covered by a qualifying HDHP Any employee in the plan
Annual limit $4,500 self-only, $9,000 family for 2027 $24,500 for 2026
Extra amount for older savers $1,000 from age 55 $8,000 from age 50 for 2026
Tax on qualified medical withdrawals None Taxed as ordinary income
Penalty on other early withdrawals 20% before age 65 10% before age 59 and a half
When contributions must stop First month of Medicare enrollment While you are working, no Medicare cutoff

The IRS had not posted 2027 401(k) limits on its cost-of-living table when it was read in November 2026. The 401(k) rows therefore use the 2026 figures.

Why Medical Withdrawals Tip the Balance

Publication 969 says HSA distributions used for qualified medical expenses are not taxed. A 401(k) withdrawal is taxed as income no matter what you spend it on.

Almost everyone pays some medical bills over a lifetime. An HSA turns that certainty into a tax advantage that a retirement account cannot offer.

There is one timing rule to know. Pub 969 says expenses incurred before you establish your HSA are not qualified medical expenses, so opening the account early in your eligibility matters.

Paying 9,000 Dollars of Medical Bills From Each Account

The Worked Example: From the HSA, $9,000 costs $9,000; From the 401(k), about $11,538 at 22%; Before 59 and a half, about $13,235

Take a married couple filing jointly whose taxable income sits in the 22% federal bracket. For 2026 the IRS sets that bracket at $100,800 to $211,400 of taxable income for joint filers.

Assume they contribute $9,000 in a year and later need $9,000 for medical bills. Assume the 22% rate applies both when the money goes in and when it comes out, and ignore state tax.

Step HSA 401(k) after 59 and a half 401(k) before 59 and a half
Federal tax saved on the $9,000 contribution $1,980 $1,980 $1,980
Gross withdrawal needed to net $9,000 $9,000 $11,538.46 $13,235.29
Tax and penalty on that withdrawal $0 $2,538.46 $4,235.29

The 401(k) figures come from dividing $9,000 by 0.78, then by 0.68 once the 10% early withdrawal tax is added. Rounding happens only at the cent.

The IRS does list an exception to the 10% tax for unreimbursed medical expenses above 7.5% of adjusted gross income. Even then, income tax still applies to the 401(k) withdrawal and not to the HSA.

The example shows the core gap. Both accounts save the same tax on the way in, but only the HSA keeps the medical withdrawal tax-free.

What a Non-Medical Withdrawal Costs Instead

The HSA advantage reverses if you raid it for something else before 65. Pub 969 adds a 20% additional tax on top of income tax for those withdrawals.

Using the same 22% rate, a $1,000 non-medical HSA withdrawal before 65 nets $580. A $1,000 early 401(k) withdrawal with the 10% additional tax nets $680.

After 65 the HSA penalty disappears, and non-medical withdrawals are taxed like a traditional 401(k). That makes an unspent HSA balance behave much like extra retirement savings later on.

When the 401(k) Should Get the Dollar Instead

The HSA is not available to everyone. If your health plan does not meet the HDHP minimums in the table above, you cannot contribute at all.

Medicare ends eligibility too. Pub 969 says your HSA contribution limit drops to zero starting with the first month you are enrolled in Medicare.

The 401(k) also wins on capacity. Once the HSA is full, the 401(k) is the only workplace account left with room, which for 2026 means up to $24,500 plus catch-ups.

Which Account Fits Your Next Dollar

Decision Rules: Match first, HSA second, then 401(k); Age 55 and up adds $1,000 to the HSA; Medicare enrollment stops HSA deposits

The right split depends on your health plan, your age and how much you can set aside each paycheck. These are the most common situations.

On an eligible HDHP with the match already collected: Fund the HSA next, up to $4,500 or $9,000 for 2027. Then send any remaining savings to the 401(k).

Aged 55 or older and HSA eligible: Add the $1,000 HSA catch-up. It is one of the few places where turning 55 raises a limit.

Expecting large medical bills next year: The HSA still works, since you can spend contributions as soon as they land. Check your family exposure against the $17,400 out-of-pocket maximum for 2027.

Not on a qualifying HDHP: Skip the HSA question and look at a health FSA for medical costs instead. Our comparison of an HSA and an FSA explains what each account lets you keep.

Close to Medicare enrollment: Plan your final HSA contributions around the month coverage starts, since deposits after that point are not allowed.

Spouses Share One Family Limit

Married couples often assume each spouse gets a full family limit. Pub 969 says the family contribution limit is shared and split equally between spouses unless they agree on a different division.

For 2027 that means $9,000 in total across both HSAs, not $9,000 each. A default split puts $4,500 in each account.

This matters most when both spouses have workplace plans that add employer money. Add both employer deposits to both payroll elections before you compare the total with $9,000.

Different Deadlines for Each Account

The HSA gives you more time than a 401(k). Pub 969 says contributions for 2025 could be made through April 15, 2026, the filing deadline for that year.

A 401(k) deferral only happens through payroll. Once the last paycheck of December is processed, the year is closed for workplace savings.

That difference suggests an order for the end of the year. Settle the 401(k) through payroll first, then top up the HSA directly before the tax deadline if you have room left.

Setting the Split During Open Enrollment

Open enrollment is when most employers let you set an HSA payroll election for the coming year. Divide your annual target by the number of paychecks to get the per-paycheck amount.

If your employer contributes to your HSA, subtract that amount first. Pub 969 counts employer contributions toward the same annual limit as yours.

Leave your 401(k) at least at the match cap while you do this. Then raise it later in the year if your budget has room after the HSA is on track.

Mistakes That Undo the HSA Advantage

The most common mistake is treating the HSA like a checking account and spending every dollar on small bills. That gives up the long-term growth that makes it worth funding.

Another is going over the limit when coverage changes mid-year or a spouse also contributes. A family limit is shared, not doubled.

A third is cutting the 401(k) below the match to fund the HSA. That swaps free employer money for a tax break you could have had in addition.

Check Your Plan Documents Before You Elect

The figures here are the IRS amounts read in November 2026, including the 2027 HSA limits and the 2026 401(k) limit. The IRS usually announces the next 401(k) limits in the fall.

Your benefits guide decides which health plans qualify and whether your employer adds HSA money. Confirm current rules with your plan administrator and the IRS Publication 969 before you finalize your elections.

Parents often face a second election in the same enrollment window. Our guide to a dependent care FSA or the child care tax credit runs three families through both options under the 2026 rules.

If your HDHP started partway through the year, a December 1 rule can let you fund a full year anyway. Our guide to the HSA last-month rule shows what a September start allows and what a job change in the following year costs.

FAQ

What are the HSA contribution limits for 2027?

For 2027 the IRS limit is $4,500 for self-only coverage and $9,000 for family coverage under a high deductible health plan. Savers aged 55 or older can add $1,000. The 2026 limits are $4,400 and $8,750.

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

Collect the full employer match first, because no other account adds money for you. After that, an HSA is often the next stop if you are eligible, since qualified medical withdrawals are never taxed. Extra 401(k) deferrals come after.

Can I use HSA money for things other than medical bills?

Yes. Before age 65 you owe income tax plus a 20% additional tax on any withdrawal not used for qualified medical expenses. From 65 on, the 20% no longer applies, and non-medical withdrawals are taxed as ordinary income.

How do I know if my health plan is HSA eligible?

For 2027 a plan must have a deductible of at least $1,750 for self-only coverage or $3,500 for family coverage. Out-of-pocket costs cannot exceed $8,700 or $17,400. Your benefits guide should label which plans qualify.

Is there a deadline to fund an HSA for the year?

You can contribute for a given year until the tax filing deadline the next spring. Payroll contributions through an employer cafeteria plan are usually the better route, because they come out before income tax is withheld.

Sources

About the author. Jay Lim is the pen name of the independent operator who runs MoneyVersus. No professional credentials are claimed. Articles are drafted with AI assistance and checked against the official documentation, pricing pages and regulators listed under Sources, rather than hands-on lab testing. How we research · Report an error


Some links may be affiliate links. We may earn a commission at no extra cost to you.

How this article was made: it was drafted with AI assistance from the official sources listed above, and its figures were checked against those pages on the dates shown. It is not based on personal hands-on testing.

Comments