HSA or 401(k)?
By The BuckGuide team. Last reviewed 25 November 2026. Educational information, not financial, tax, or legal advice.
Capture the employer match in the 401(k) first. It is compensation, and it does not depend on health-plan eligibility. After the match, high-interest debt, and the emergency fund, an eligible HSA comes before extra 401(k) deferrals beyond the match. If you are not eligible, you do not contribute to an HSA at all. A high deductible is not eligibility. The plan also has to meet the out-of-pocket ceiling, and you cannot have disqualifying coverage.
Conditions. You are comparing the match with the HSA, or extra deferrals with the HSA. Employer HSA contributions count against the annual HSA limit. Payroll HSA contributions avoid payroll taxes that a later deduction does not. State tax treatment of HSAs is not uniform. This page is federal.
Example. Someone who has not captured a 50% match should not send the next dollar to an HSA instead. The match is an immediate return on the deferral. After that match is set, and if the person is eligible, HSA room for the year they select comes before raising the 401(k) from the match percent toward the employee cap. The limits table has the self-only and family figures for 2026 and 2027. The age-55 catch-up stays at the statutory $1,000.
Exceptions. Medicare enrollment ends new HSA contributions. A general-purpose FSA usually does too. A limited-purpose dental and vision FSA is a different product. Bronze and catastrophic marketplace plans and some direct primary care arrangements can be compatible under IRS guidance that started in 2026. A plan label is not proof. Read the plan summary.
Try the numbers
Nothing you type is uploaded. The year toggle uses the shared limits file.
The match is done. An eligible HSA comes before extra workplace deferrals beyond the match. 2026 HSA room is $4,400 self-only or $8,750 family, plus the statutory $1,000 at 55. Employer HSA contributions count against that room. A high deductible alone does not prove eligibility.
Eligibility is a test, not a vibe
An HSA’s federal tax treatment is the reason it outranks a Roth IRA and extra 401(k) deferrals: the contribution can be deducted, the growth is untaxed, and qualified medical withdrawals are untaxed. That treatment is available only if you are an eligible individual for the month. Eligibility requires a high-deductible health plan that also respects the out-of-pocket maximum, and it fails if you have other disqualifying coverage, are enrolled in Medicare, or can be claimed as a dependent.
Both the deductible floor and the out-of-pocket ceiling have to be met. A plan with a high deductible and a high out-of-pocket maximum can fail. The numbers move by year. Use the year toggle rather than a blog post from a prior open enrollment. You accrue one-twelfth of the annual limit for each month you are eligible on the first day of the month. Employer contributions, including amounts the employer sends because you completed a wellness task, count against the same limit.
If any disqualifier applies, the HSA is not a partial option. Do not contribute and plan to remove it later. The penalty and the income inclusion are a worse outcome than simply using the IRA or the 401(k). The Roth IRA page compares the HSA with a Roth once you know you are eligible. This page compares it with the workplace plan, where the match is the piece people skip by accident.
After the HSA is full
When HSA room for the year is used, extra workplace deferrals and an IRA are the remaining sheltered choices. Which one comes next depends on the plan’s fees and on whether a direct Roth or a traditional deduction is available at your income. The 401(k) versus IRA page is that comparison. Neither one jumps ahead of high-interest debt or the emergency fund.
Keep enough cash inside the HSA for bills you expect this year if you cannot pay them from other money. Investing the rest is reasonable when fees are low. It is not a requirement, and it is a bad idea for a prescription you will fill next month. Several states do not follow the federal treatment of contributions or earnings. If you live in one of them, the federal ranking still describes the federal tax, not your state return.
When the 401(k) comes first
The match always comes before the HSA. Extra deferrals beyond the match come before the HSA only if you are not eligible for the HSA. If you are eligible, those extra deferrals wait until HSA room is used.
When the HSA comes first
After the match, the starter buffer, high-interest debt, and the emergency fund, eligible HSA contributions come before additional 401(k) deferrals and before a Roth IRA. Payroll is the better pipe because of the payroll-tax difference.
What changes the answer
A job change, a new health plan, Medicare, or a spouse’s general-purpose FSA can turn eligibility off mid-year. The limit is monthly. Stop contributing for months you are not eligible instead of averaging the year and hoping.
Next three actions
Common questions
Can I do both in the same year?
Yes. The match and the HSA are different limits. The order is match, then eligible HSA, then more 401(k) if the earlier rungs are done.
What if my employer contributes to the HSA?
Count it. The annual limit is shared. Ignoring the employer deposit is the usual way people over-contribute.
I have a high deductible. Am I eligible?
Not by that fact alone. Check the out-of-pocket maximum and any other coverage. The HSA page lists the disqualifiers.
2026 figures, last reviewed 25 November 2026. Educational information, not advice. State tax rules can differ.
Sources: Rev. Proc. 2026-24; Rev. Proc. 2025-19 (2026 HSA); IRS 2027 401(k) limits; BuckGuide methodology. Methodology. Editorial policy.
Educational information, not individualized investment, tax, or legal advice. Your financial answers stay on your device.