How To Invest HSA Funds: Payroll-To-Portfolio Protocol

The payroll-to-portfolio HSA protocol: minimize taxes, automate contributions and investments, and let it compound.

HSA card breaking open into cash with a compounding growth curve

Key Takeaways

  • The name fools people. An HSA can pay medical bills, but its highest purpose is as a retirement compounding engine.
  • Payroll deductions are the best way to fund an HSA because they avoid federal income tax, state income tax, Social Security tax, and Medicare tax.
  • A manual HSA contribution can still be beneficial, but it usually does not recreate the full payroll tax benefit.
  • If you pay ordinary medical bills out of pocket from checking, the HSA becomes the best retirement account.
  • The best HSA system is simple: payroll deduction to your HSA brokerage, automatic investing, saved receipts, long-term compounding.

Don’t Let The Name Fool You

A Health Savings Account sounds like a place to park money for doctor visits. You can do that, but that would be a mistake.

Yes, you can use an HSA for medical expenses and pay no taxes. That matters, especially later in life when healthcare costs usually rise. Medicare premiums, prescriptions, dental work, vision care, and other qualified expenses can all become real retirement bills.

But if you only use your HSA as a medical checking account, you miss what it can really do. For many investors, an HSA may be the best retirement account available today.

Once set up properly, it can do three jobs at once:

  1. Tax-free growth for retirement.
  2. Tax-free coverage of future medical expenses.
  3. Help you retire earlier.

That combination is rare. A 401(k) can grow for retirement, but it does not give you tax-free withdrawals for qualified medical bills. A taxable brokerage account gives you flexibility, but it does not give you the same tax shelter. A Roth IRA is excellent, but it does not give you the payroll tax advantage an HSA can capture when contributions run through your paycheck. And if you save your medical receipts, you can retire early, claim those receipts in retirement, and create tax-free withdrawals.

That is why the first HSA investing question is not, “Which fund should I buy?”

Start here:

How do I maximize the benefits of this misunderstood account?

I covered the math in the earlier HSA vs Roth IRA vs 401(k) article. This article is the execution map.

How do you allocate and invest HSA funds the right way?

Here is the protocol.


Step 1: Use Payroll Deduction First

If your employer allows HSA payroll deductions, start there. If not, ask them to set it up.

This matters more than most people realize.

When you contribute to an HSA through payroll, the money can avoid four layers of tax:

  1. Federal income tax
  2. State income tax in most states
  3. Social Security tax
  4. Medicare tax

People usually call this the “triple tax advantage.”

I think that undersells it.

The HSA can be a maximum tax advantage account because payroll deductions avoid payroll taxes too. Payroll taxes are the Social Security and Medicare taxes that come out of your paycheck. A manual HSA contribution outside payroll can still create an income tax deduction, but it usually does not give you back the Social Security and Medicare taxes already withheld.

That is the detail many HSA articles skip.

If your employer offers an HSA-eligible health plan, ask payroll how to send contributions directly into your HSA brokerage account. If you have your own HSA-eligible high-deductible health plan and your employer does not pay for the insurance, still ask. The employer does not necessarily need to pay for the insurance for payroll deduction to be possible, but the payroll system has to support HSA salary deductions.

Simple rule:

If payroll deduction is available, use it before making manual HSA contributions.


The 2026 HSA Tax Stack At $250,000 Of Income

Let’s use a married couple with about $250,000 of annual income, family HSA coverage, and Oregon as the example of a high-tax state.

For 2026, the IRS HSA contribution limit is $4,400 for self-only coverage and $8,750 for family coverage, according to IRS Revenue Procedure 2025-19.

Now assume the family contributes the full $8,750 through payroll.

Here is the rough tax stack:

Tax layerAssumptionSavings on $8,750 HSA contribution
Federal income tax24% bracket$2,100
Oregon state income tax9.9% marginal estimate$866
Social Security tax6.2%, if wages are still below the wage base$543
Medicare tax1.45%$127
Total if full payroll tax savings apply41.55%$3,636
Total if Social Security savings do not apply35.35%$3,093

That means the family contributes $8,750 to their HSA while reducing take-home pay by only about $5,114 to $5,657, depending on payroll tax details.

That is a massive win.

You are not just “saving taxes.” You are getting more money into your retirement account than you had to give up in spendable income.

That is why the HSA can be so powerful.

Two important notes:

  • California and New Jersey are major exceptions. They do not follow normal federal HSA state tax treatment.
  • The Social Security portion depends on wages, the annual Social Security wage base, and which spouse’s paycheck funds the HSA. If wages are already above the wage base, the Medicare tax savings may still apply, but the Social Security savings may not.

This is not a reason to overcomplicate the strategy. It is a reason to use payroll deduction if you can.


Step 2: Open The HSA Before Payroll Deductions Start

Before you can automate HSA investing, the brokerage account needs to exist.

I prefer Fidelity for HSA investing. No affiliation. No compensation. No secret handshake.

I like Fidelity because it allows you to automate the investment process.

  • No account fees or minimums for Fidelity HSAs
  • Broad investment access
  • $0 commissions for U.S. stock and exchange-traded fund (ETF) trades
  • Ability to invest directly in ETFs
  • A cleaner path for automatic investing

Fidelity says its HSA offers no account fees or minimums for Fidelity.com individual HSAs, plus $0 commissions for U.S. stock and ETF trades.

If Fidelity is not available or not the right fit, compare Lively and HSA Bank as alternatives. They are not my first choice, and they are not the same clean brokerage-first answer as Fidelity, but they are established HSA providers with investment access and are worth reviewing if your employer already uses one of them or if you need a backup option.

Your HSA should let you invest the way the account is supposed to be used.

Some HSA providers are built like checking accounts. Fine for spending. Terrible for long-term investing. Do not let paperwork friction turn into 20 years of bad investment access.


Step 3: Auto-Invest On Payday

The best HSA setup is boring.

Payday comes -> HSA contribution lands -> Money gets invested -> Compounding starts.

Automation turns every payday into another step toward long-term, tax-free growth.

You do not want HSA cash sitting around waiting for Future You to log in and make a smart decision after dinner. Future You is busy. Future You forgets passwords. Future You says, “I’ll do it this weekend,” and then six months disappear.

Systems beat manual processes.

I personally have my HSA contributions automatically invested into the Refined FI Accumulation Portfolio. If you want to see the exact four ETFs I use, their percentages, and why I use them, you can learn everything on the Gold+ page.

Here’s the key framework to remember:

Your HSA money needs a precise job before it arrives.

For a long-term investor who can pay medical expenses from checking, that job is growth and early retirement.

Not cash.

Not “I’ll figure it out later.”

Growth.

Automatic investing is crucial: HSA benefits compound only if the money is actually put to work. An investment sitting in cash for decades is like planting an orchard and never watering it. You own all the potential, but without growth, there is never a harvest.


Step 4: Use The HSA For Diversification Your 401(k) May Not Offer

Most people think of the HSA as smaller than the 401(k), so they think that it’s less important.

That is the wrong lens. The HSA may be smaller, but it can be a major diversifier.

Many 401(k) plans give you a short menu:

  • Target-date funds
  • S&P 500 index fund
  • Total bond index fund
  • International index fund
  • A few active funds nobody asked for

That menu might be good enough for basic retirement saving, but it usually does not let you build a more refined portfolio. If you have not yet set the 401(k) side of this, start with how to invest your 401(k) and then use the HSA to fill what the plan menu leaves out.

An HSA brokerage account can be optimized. Fidelity allows ETF investing, so you can use the HSA for exposures your 401(k) does not provide.

That matters because every account should be optimized with the options it provides.

Your 401(k) might be the large core engine. Your taxable account can provide flexibility and access. Your HSA provides maximum tax-advantaged growth and a diversification sleeve.

This does not mean every investor should load the HSA with exotic investments. It means you should stop assuming every account needs to own the same vanilla allocation.

The HSA has different tax benefits. It has different withdrawal rules. It can have an optimized investment portfolio.

So it deserves its own job.


Step 5: Do Not Spend The HSA On Ordinary Medical Bills

If you cannot afford to pay medical bills from cash flow, use the HSA. That is what it is there for.

But if you can pay ordinary medical expenses from checking, leave the HSA to grow.

Why?

Because every dollar you spend from the HSA is a dollar that stops compounding.

A $200 prescription paid from the HSA is not just a $200 withdrawal. It is also the future growth that $200 could have created over 10, 20, or 30 years.

The stronger strategy is:

  1. Pay the ordinary medical bill from checking.
  2. Save the receipt.
  3. Leave the HSA invested.
  4. Let the account compound.
  5. Reimburse yourself in the future.

The IRS does not require you to reimburse yourself in the same year the qualified medical expense occurs. That creates what I call the receipt reserve.

You pay medical bills now. You save proof. The HSA keeps growing.

Later, you can reimburse yourself tax-free from the HSA using those old qualified medical receipts. That can become especially valuable in retirement because it may give you tax-free cash flow when you are trying to manage taxable income, Roth conversions, required distributions, or Medicare premium thresholds.

Again, keep records. Receipts matter. Explanation of benefits matter. Payment proof matters. The strategy only works if you can prove the expense.


The Refined FI HSA Protocol

Here is the whole system:

StepActionWhy it matters
1Confirm HSA eligibilityYou need an HSA-eligible high-deductible health plan
2Open an HSA brokerage accountThe account must exist before payroll can send money
3Use payroll deductionCaptures the maximum tax advantage when available
4Auto-invest on paydayTurns contribution discipline into a system
5Optimize your HSA’s portfolioImproves diversification and compounding
6Pay ordinary medical bills from checking if possibleKeeps the HSA compounding
7Save receiptsBuilds future tax-free reimbursement capacity

This is not complicated. It’s a system for automatic retirement success.

Payroll deduction.

Automatic investing.

Long-term compounding.

Saved receipts.

That is the map.


What To Do Now

If you want to invest HSA funds correctly, do this in order:

  1. Confirm you are eligible to contribute to an HSA.
  2. Ask payroll whether HSA salary reductions are available.
  3. Open the HSA brokerage account before payroll contributions begin.
  4. Confirm when deposits land.
  5. Set automatic investing into an optimal portfolio.
  6. Pay ordinary medical bills from checking if you can.
  7. Save receipts and proof of payment.
  8. Review the HSA portfolio once per year.

The big mistake is treating the HSA like a medical checking account by default. For some households, that is necessary. Medical bills are real. Cash flow matters.

But if you can afford to let the HSA compound, the account can become something much more powerful:

A maximum tax-advantaged retirement account with a built-in future medical reserve.

The name says Health Savings Account.

The math says financial independence.


How To Invest HSA Funds: Quick FAQ

How should I invest my HSA funds?

Your HSA should have a different job from your 401(k). I recommend my Accumulation Portfolio because it diversifies beyond an S&P 500 allocation.

For a 401(k) with a limited investment menu, the S&P 500 is usually the best option. Your HSA and IRA are not limited to an employer’s menu, so take advantage of that freedom.

Should I invest my entire HSA balance?

Yes, if you can comfortably pay ordinary medical expenses out of pocket. Do your best to leave the HSA invested and let it compound for your future self. If cash flow is tight, use the HSA for medical bills. That is what it is there for.

Is contributing through payroll better than contributing manually?

Yes. Payroll contributions can avoid federal income tax, most state income taxes, Social Security tax, and Medicare tax. Manual contributions generally preserve the federal income tax deduction but do not recover payroll taxes already withheld.

Can HSA contributions be invested automatically?

Yes, if your HSA provider supports automatic investing. The ideal system is simple: payroll contribution, automatic investment, long-term compounding.

I recommend Fidelity, with no affiliation, because it supports recurring fractional investments starting at $1.

Can I reimburse myself for old medical expenses?

Yes. Federal rules impose no reimbursement deadline, provided the expense occurred after the HSA was established, was not reimbursed elsewhere, and was not claimed as a tax deduction. Keep the receipt, proof of payment, and any explanation of benefits. See IRS Publication 969.

What is the 2026 HSA contribution limit?

The 2026 limit is $4,400 for self-only coverage and $8,750 for family coverage. Employer contributions count toward that limit. Eligible individuals age 55 or older can contribute an additional $1,000. See IRS Revenue Procedure 2025-19.


Your HSA is automated. Nobody is watching the rest.

Gold+ is your retirement navigation system: find your number, follow the Accumulation Portfolio built for your wealth-building years, and get a specific action when market risk changes.

Start your Gold+ path →


This article is for educational and informational purposes only and does not constitute investment advice, financial advice, tax advice, legal advice, or a recommendation to use any specific HSA provider or investment. Refined FI is not a registered investment advisor. HSA eligibility, tax treatment, payroll deduction rules, state tax rules, contribution limits, provider fees, and investment options can change. Consult a qualified tax professional before making tax decisions. Refined FI receives $0 in affiliate revenue, commissions, or compensation from Fidelity, Lively, HSA Bank, or any HSA provider mentioned in this article.

Related Articles

Your 401(k) Portfolio: One Job, One Fund, and Where the Rest Belongs

Your 401(k) Portfolio: One Job, One Fund, and Where the Rest Belongs

A little of everything is not a portfolio. Here is the 401(k) mix by stage, and what belongs elsewhere.

19 min read

Best 401(k) Investment: Why Target-Date Funds Delay Retirement

Best 401(k) Investment: Why Target-Date Funds Delay Retirement

Want to delay retirement? Target-date funds took 4.5–5.6 years longer than an S&P 500 index fund.

12 min read

Best Retirement Calculator: Why One Number Is Not Enough

Best Retirement Calculator: Why One Number Is Not Enough

Understand what a retirement calculator should do and use a five-tool framework that turns each answer into your next retirement decision.

16 min read

Before checkout

Please confirm before continuing.

Gold+ gives immediate access to digital member materials. Please read the disclosure page and terms before purchase. Gold+ has no refunds, and you can cancel anytime.