If investment growth using an HSA account is not subjected to taxes, then isn't it better to invest using HSA than investing on stock platforms like Fidelity or Robinhood?

When I use the funds in the HSA account to trade, am I exempted from capital gain taxes? With such benefits, I don't see why one would not pay out of pocket for medical expenses and let the triple tax advantage account grow.

This should be a simple math or Google search, but I couldn't find anything about a strategic way to use HSA.

  • But you can only use the gains for medical expenses... HSAs are neat, but I still struggle to see them as actually useful (ie, spending the money), unless you have a lot of expected medical expenses.
    – user26460
    Nov 6, 2023 at 21:56

1 Answer 1


The US Health Savings Account is tax-free both when the money goes in, and when money is taken out for medical purposes. In between, the investments behave like an IRA or 401(k); growth/earnings are not taxed.

Usual recommendation is to spend savings with tax liabilities first, assuming everything is earning about the same returns -- non-advantaged savings, then traditional 401k/IRA, then Roth. By that rationale, HSA savings most resembles Roth and should be held until you'd be spending Roth accounts. And, of course, should then be spent on medical costs to get full benefit of its advantages.

  • In California and New Jersey HSAs are considered regular taxable accounts, adding a bit to complexity due to manual tracking and reporting adjustments and reducing the tax benefit somewhat.
    – littleadv
    Nov 3, 2023 at 22:10
  • @littleadv: Interesting; didn't know. So where would you put that version on the order-of-spending list?
    – keshlam
    Nov 3, 2023 at 22:20
  • Probably don't spend until retiring in Florida, and keep close track of transactions and dividends while in CA/NJ.
    – littleadv
    Nov 3, 2023 at 22:49
  • An alternative if you live in CA or NJ is to put all your HSA money into Treasury bonds (or a 100% Treasury bond fund). In CA it's important to never sell however because capital gains are still taxable; in NJ they're exempt. Either way I don't think this is sufficient to change the priority of HSAs, either contributing or spending.
    – Craig W
    Nov 3, 2023 at 23:20
  • @keshlam "But the HSA isn't usually all that huge a pile of money," I disagree. If you can do this the 2024 contribution limit for a Roth/Traditional IRA is $7,500 if you are 50 or older. For the HSA family it is $8,300 but if you you are 55 or over it is $1000 more. It is like having a 3rd IRA. Nov 4, 2023 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .