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

How to invest HSA funds: send your paycheck straight to a Fidelity HSA, buy an S&P 500 index fund automatically, and pay everyday medical bills from checking.

HSA card breaking open into cash with a compounding growth curve

Key Takeaways

  • Send your HSA contribution straight from your paycheck to a Fidelity HSA. Payroll is the only way to skip Social Security and Medicare tax on it.
  • Keep almost nothing in cash. Pay everyday medical bills from checking and let the account grow.
  • Have every contribution invested automatically, the day it lands.
  • Hold a low-cost S&P 500 index fund unless you have a portfolio tested to beat it. Most funds that try, don’t.
  • Judge an HSA company by its total yearly cost against how many years you’ll invest. The longer you invest, the less fee you can afford.

Here’s how to invest HSA funds. Send your contribution straight from your paycheck to a Fidelity HSA, have it buy a low-cost S&P 500 index fund automatically, and pay everyday medical bills from checking so the account can grow. Set it up once and it runs every payday.

Your HSA is the one account where no employer menu decides what you can own. That makes it the place to try to do better than the S&P 500. It’s also where a lot of people try and end up doing worse. The chart further down shows how hard beating that index really is.

Already have an HSA? Start here. If you’re still deciding whether an HSA should get your next dollar, start with HSA vs Roth IRA, or run your own numbers in the HSA vs 401(k) Calculator. If your employer is also offering a flexible spending account, settle that first in HSA vs FSA.


Step 1: Send Your Paycheck Straight to Fidelity

Money that goes into your HSA through payroll skips federal income tax, state income tax in most states, and the 7.65% you pay in Social Security and Medicare tax. Money you deposit yourself still gets the income tax deduction, but the Social Security and Medicare tax was already taken out of your paycheck. That 7.65% is your shining star. Start young enough and over decades it can shave years off your retirement. I worked through the full math, family by family, in HSA vs Roth IRA.

Open a Fidelity HSA first, so you have an account number to hand over. Then call your payroll or human resources department and ask them to send your HSA contribution directly to your Fidelity HSA. The key is you don’t move it. Your paycheck sends it, every pay period, and you never touch it.

You want automation. Make your life simple. Set up systems. You know what to do today, but life gets busy, and without a system in place you’ll forget to do it.

Why Fidelity? Fidelity is always the first option because it’s the cleanest, it gives you the most flexibility, and the costs are negligible. An individual Fidelity HSA you invest yourself has no account fees and no minimum, and buying US stocks and ETFs online costs $0. If your employer offers a Fidelity HSA as its own plan, there can be an administrative fee of up to $48 a year unless your employer pays it. I have no affiliation with Fidelity and get nothing from them.


When Payroll Can Only Use Your Employer’s HSA Company

Most employers don’t care where your HSA money goes after payday, the same way they don’t care which bank your paycheck lands in. A few will only send it to the HSA company they picked. That’s the exception, but if it’s yours, keep your payroll contribution going there anyway. The tax savings only come through payroll, so you never give those up to get to a better account.

Then automate the move. Ask your employer’s HSA company whether your account can be linked to your Fidelity HSA by ACH, the same electronic link your checking account uses, so Fidelity can pull the money over on a schedule. Set the pull for a day or two after each contribution lands, and the money moves without you. Make sure both companies record it as a transfer from one HSA to another. The IRS puts no limit on how many direct transfers between HSAs you can make, and none of them is taxed.

That’s how I moved mine. My HSA was at a bank, money got deposited there, and I transferred it straight to Fidelity.

If the two can’t be linked, ask for a partial transfer you can repeat a few times a year, and whether there’s a fee to transfer money out. If your employer’s HSA company won’t transfer at all, you’re investing in whatever it offers, and the fee table further down tells you whether that’s still worth it.

Don’t take the money out as cash and redeposit it at Fidelity. That’s no bueno. The IRS counts that as a rollover, and you get one rollover in any 12 months, deposited within 60 days. Do it more often and the money you took out is taxed as income, plus a 20% penalty if you’re under 65. A direct transfer between the two HSA companies avoids all of it.


Step 2: Pay Everyday Medical Bills From Checking

How much of your HSA should stay in cash? Ideally, none of it.

If you can pay the ordinary stuff from your checking account, the doctor visits and the kids getting sick, do it. Let the portfolio work for you. Let it compound. Every dollar that stays invested keeps growing, tax-free, for as long as you leave it there.

The big things are different. A cancer diagnosis, a car accident, a stretch where you can’t work and your cash flow takes a hit. That’s what the HSA is for, even if the market just crashed and your account is down. People get sick.

When you pay from checking, keep the receipt, the proof you paid, and the explanation of benefits from your insurer. Years from now you can reimburse yourself tax-free for those bills. I explain why that turns into a source of retirement income in the receipt section of HSA vs Roth IRA, and what changes once you turn 65 in HSA After 65.


Step 3: Have Every Contribution Invested Automatically

Money that lands in a Fidelity HSA doesn’t invest itself. Fidelity parks it in a money market fund until you buy something. It earns a little money market interest, and the fund you meant to buy never gets bought.

So set a recurring investment for the day each contribution shows up. On Fidelity.com, open Accounts & Trade, then Transfers, then Manage recurring activity. Choose Create new activity, then Investment. Set the security type to Stocks/ETFs for an ETF, or Mutual funds for a mutual fund, pick your HSA, enter your fund and a dollar amount, and set the day your contribution usually lands. It’s the same screen I walk through with screenshots for Fidelity BrokerageLink.

Watch two paychecks arrive before you pick the day, so you know which day the money really lands. And when you get a raise or change what you contribute, update the dollar amount to match.

Payday comes, your contribution lands, your fund gets bought, and you never log in to do it.


What to Hold in Your HSA

A low-cost S&P 500 index fund, like IVV or VOO. That’s the default, and it’s a good one.

The S&P 500 index earns its place through a process. A company has to be profitable before it’s let in, and the biggest companies get the most of your money. A total stock market fund owns those same companies plus thousands of small ones, and 42% of the companies in the Russell 2000, the main small-company index, are unprofitable. When you buy a total stock market fund, part of every contribution goes to those money-losing companies. I showed what that drag costs in Dead Weight: Zombies in Your Portfolio.

How much goes in the S&P 500 depends on how far you are from retirement:

  • More than 10 years away: 100% of it.
  • Inside 10 years: 70% stays in the S&P 500 index fund and 30% moves to something steady, like a government money market fund or a floating-rate Treasury fund (USFR is a good choice). It doesn’t move around, and it pays a good, consistent yield. When inflation is clearly falling, an actively managed bond fund can take its place. The free Stock Market Warning Signs page shows which way inflation is moving.

Your HSA lets you own almost anything, so why not try to beat the S&P? Here’s how hard that is.


Beating the S&P 500 Is Harder Than It Looks

The upper right is the sweet spot. Those are funds that earned more than the S&P 500 and fell less when the market fell, and finding them is the hard part. Out of 353 large-company funds, not one beat the S&P 500 by enough to rule out luck. With 353 funds trying, luck alone should have pushed about eight past the bar where a fund starts to stand out. None got there. Eleven looked like winners, but only by a lower bar that luck clears easily.

The red dots are the moves people make when they want to diversify away from the S&P 500. An equal weight fund puts the same amount in every company, so the biggest ones don’t dominate. A value fund buys companies that look cheap for what they earn. A dividend fund buys companies that pay out a lot of their profits. A factor tilt leans toward cheaper and smaller companies. A star manager hand-picks. Each one owns something different from the S&P 500, and in its worst crash every one of them fell further.

Diversifying only helps if it gets you to retirement sooner. These five earned less and fell further in bad markets. The last column of the table shows the cost as extra years of saving: how much longer you’d have to keep saving the same amount to end up with what the S&P 500 would have given you.

The ideaFundSinceReturn per year, fund vs S&P 500Worst drop, fund vs S&P 500Extra years of saving
Star managerTCHP, T. Rowe Price Blue Chip Growth ETF202011.9% vs 16.2%42.3% vs 24.4%5 years 9 months
Equal weightGSEW, Goldman Sachs Equal Weight U.S. Large Cap ETF201711.6% vs 15.1%38.7% vs 33.7%4 years 8 months
ValueVONV, Vanguard Russell 1000 Value ETF201012.1% vs 14.8%38.2% vs 33.7%3 years 6 months
DividendsQDF, Northern Trust Quality Dividend ETF201212.5% vs 15.0%36.6% vs 33.7%3 years 1 month
Factor tiltDFAC, Dimensional U.S. Core Equity 2 ETF201213.6% vs 14.8%37.2% vs 33.7%1 year 5 months

You can’t spend a weekend picking funds and expect to outpace the S&P 500 over a long period. You might find a fund that did better over the last 3 years, and that’s no guarantee that it’s going to continue. What you have to test is the process behind each fund, over decades, and then how the funds behave together in a bad year.

That’s my job. I’ve spent my career designing portfolios, the individual pieces and how they interact, to give you something better than what you can get nearly free in the S&P 500. It’s not easy. I built the Refined FI Accumulation Portfolio to do it, and it’s what my own HSA contributions buy every payday. Since 2020 it has averaged about 5 points a year more than the S&P 500. That’s under seven years, a short record, so I show every year, including the two it trailed, in Fidelity BrokerageLink. The longer proof is the rules behind each fund, tested back to the 1980s.

If you’d rather use a tested portfolio that could save you years, that’s what Gold+ is for. It costs $379 a year, whatever your balance. Many advisors charge about 1% of what they manage, which is $1,000 a year on $100,000 and rises as your balance grows. Some may put clients in funds like the ones in red. Sometimes, not always, the advisor’s firm may have a relationship with the fund company. Without a tested portfolio, stay with the S&P 500 index fund. It’s a good place to be.


What HSA Fees to Watch For

When you can’t move your money to Fidelity, you’re investing inside your employer’s HSA company. Look for five costs:

  1. A monthly or yearly account fee.
  2. An investing fee, charged as a percentage of what you have invested.
  3. Cash you have to leave uninvested before you’re allowed to invest the rest.
  4. The fund’s own yearly cost, its expense ratio.
  5. A fee to transfer money out or close the account.

Here’s how two companies compare. Fidelity’s individual HSA has no account fees and no minimum. Lively charges $24 a year to invest through its Schwab account, unless you keep $3,000 in cash, and 0.50% a year if you choose its managed portfolio.

So how much is too much? Compare the HSA against a Roth IRA, because a Roth IRA is where that money would most likely go instead. Do it apples to apples. Count the total yearly cost of the same investment in both accounts: the fund’s cost plus the account’s fee. Say your Roth IRA holds an S&P 500 index fund costing 0.03% a year with no account fee, and the same kind of fund in your HSA costs 0.03% plus a 0.50% account fee. The difference is 0.50% a year, and that difference is what the table below measures. A fee charged in dollars works the same way once you divide it by your balance: $24 a year on $10,000 is 0.24%.

Years until you spend the moneyHighest extra yearly cost where the HSA still wins
104.5%
153.0%
202.3%
251.8%
301.5%

The longer your money stays invested, the less fee it can afford. The payroll tax savings are a one-time head start. Out of the same paycheck, about 53% more money goes into the HSA than into a Roth IRA. Both accounts grow, and the HSA stays about 53% bigger, but that gap never widens. A fee takes its cut every year, and its damage compounds.

Here’s $10,000 of paycheck going into an HSA with a 2% yearly fee, against the $6,535 it leaves for a Roth IRA with no fee, both earning 10% a year before the fee.

YearsHSA, 8% after the feeRoth IRA, 10%Ahead
10$21,589$16,950HSA by $4,639
30$100,627$114,030Roth by $13,403

Same fee, opposite answers. At 10 years the head start still covers what the fee took. At 30 years the fee has eaten more than the head start was worth.

The table assumes your HSA is spent tax-free on medical bills, growth of 10% a year before fees, and a combined tax rate of 34.65%: 22% federal, 5% state, and 7.65% Social Security and Medicare, the same rates as the family in HSA vs Roth IRA. Growth of 7% gives nearly the same limits. If you earn more than the Social Security wage cap, only the 1.45% Medicare part is saved, so the limits come out lower. If you take the money out after 65 for something other than medical bills, it’s taxed, and the limits drop.


What To Do Now

  1. Open a Fidelity HSA.
  2. Ask payroll to send your HSA contribution straight to it.
  3. If payroll can only use your employer’s HSA company, keep contributing there and have Fidelity pull the money over automatically by ACH, recorded as a transfer between HSAs. Never take it out as cash.
  4. Set a recurring investment for the day each contribution lands.
  5. Buy a low-cost S&P 500 index fund. Inside 10 years of retirement, put 30% in a government money market fund or a floating-rate Treasury fund.
  6. Pay everyday medical bills from checking and keep the receipts.
  7. If you’re stuck with your employer’s HSA company, check its total yearly cost against the fee table.
  8. Use the HSA for the big medical bills. That’s what it’s there for.

How To Invest HSA Funds: Quick FAQ

How should I invest my HSA funds?

Buy a low-cost S&P 500 index fund and have every contribution invested automatically. More than 10 years from retirement, put all of it there. Inside 10 years, keep 70% there and put 30% in a government money market fund or a floating-rate Treasury fund, or an actively managed bond fund when inflation is clearly falling. Move away from the S&P 500 only with a portfolio whose rules have been tested to beat it over decades.

Should I invest my entire HSA balance?

Yes, if you can pay ordinary medical bills from checking. Keep the receipts and leave the HSA invested. Use it when a big bill or a stretch without work hits your cash flow, even in a down market. That’s what it’s there for.

Is contributing through payroll better than contributing manually?

Yes. Payroll contributions skip federal income tax, most state income taxes, and the 7.65% Social Security and Medicare tax. A contribution you make yourself still gets the income tax deduction, but the Social Security and Medicare tax was already withheld from your pay.

Can HSA contributions be invested automatically?

Yes, if your HSA company supports it. At Fidelity, set a recurring investment under Accounts & Trade, Transfers, Manage recurring activity, for the day your contribution lands. Fidelity supports recurring fractional investments starting at $1.

Can I move my HSA to Fidelity?

Yes. Ask your current HSA company whether your account can be linked to your Fidelity HSA by ACH, so Fidelity pulls the money over automatically, or ask for a direct transfer. Either way, make sure it’s recorded as a transfer between HSAs. The IRS sets no limit on direct transfers between HSAs. Taking the money out yourself and redepositing it counts as a rollover, and you get one rollover in any 12 months.

What HSA fees are too high?

It depends on how long the money stays invested. Compare the total yearly cost of an investment in your HSA, the fund plus the account fee, with the same investment in a Roth IRA. The HSA still wins at up to 4.5% more a year over 10 years, 2.3% over 20 years and 1.5% over 30 years.

Can I reimburse myself for old medical expenses?

Yes. Federal rules set no reimbursement deadline, provided the expense happened after you opened the HSA, wasn’t reimbursed somewhere else, and wasn’t claimed as a tax deduction. Keep the receipt, proof of payment, and any explanation of benefits. See IRS Publication 969.

Do you need earned income to contribute to an HSA?

No. Unlike an IRA, an HSA has no earned income requirement. What matters is your coverage: you must be enrolled in a qualifying high-deductible health plan, not enrolled in Medicare, and not claimed as a dependent on someone else’s return.

That matters in early retirement. Someone who has stopped working but still carries a qualifying plan can keep contributing, while the same person can no longer fund a Roth IRA without earned income. Enrolling in Medicare ends HSA contributions, so the window usually closes at 65. 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+ connects your plan, portfolio, and protection in one system. See whether you’re behind, on track, or ahead, follow the Refined FI portfolio built for your stage, and get an email when market risk calls for a change.

Prefer to see it first? Watch the 2-minute look inside Gold+.

See how Gold+ works →


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; confirm yours with your HSA company and payroll department. Fund figures come from Refined FI research on 353 large-company funds with at least 3 years of daily prices, through October 19, 2026, each measured against the S&P 500 over its own dates; DFAC’s history before 2021 is the mutual fund it replaced. Extra years of saving assume the same amount saved each year for 25 years. Past performance does not tell you what happens next. Fidelity fees are from Fidelity’s HSA FAQ, and Lively fees from Lively’s pricing page, both as of November 2026. Transfer and rollover rules are from IRS Publication 969. Consult a qualified tax professional before making tax decisions. Refined FI receives $0 in affiliate revenue, commissions, or compensation from Fidelity, Lively, or any HSA provider or fund company mentioned here.

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) allocation by stage, and what belongs elsewhere.

19 min read

403(b) Retirement Plan: How One Fee Can Add 5½ Years of Additional Work

403(b) Retirement Plan: How One Fee Can Add 5½ Years of Additional Work

I used to sell 403(b) annuities to teachers, but not anymore. What I learned to do and what NOT to do could save you years off your retirement date.

20 min read

457(b) vs 401(k): Can You Retire Seven Years Early?

457(b) vs 401(k): Can You Retire Seven Years Early?

Two people can save the same money and end up with the same portfolio balance. One retires at 52. One has to wait until 59½. The only difference is which account the money went into.

23 min read