More and more people are using health savings accounts, or HSAs, to help save for future medical expenses or even give a boost to their retirement funds. Almost one-third of covered workers were enrolled in health insurance plans with a savings option in 2021, up from 17 percent in 2011, according to a report from the Kaiser Family Foundation. These accounts come with many benefits, including the opportunity to invest and grow your funds tax-free.

Here are tips for how to invest your HSA and some other things you should know about these increasingly popular savings vehicles.

What is an HSA and how do the tax breaks work?

An HSA is a health savings account that is available if you have a high-deductible health insurance plan, and it helps pay for out-of-pocket medical expenses. In 2023, the minimum deductible for a HDHP is $1,500 for an individual and $3,000 for a family. Those minimums will rise to $1,600 and $3,200, respectively, in 2024.

HSAs come with a triple tax benefit that make them attractive savings options:

  • Contributions to HSAs are tax deductible, with individuals able to contribute $3,850 in 2023 and families able to put in $7,750. Those aged 55 and older can contribute an additional $1,000 as a catch-up contribution. The contribution limits will increase to $4,150 for individuals and $8,300 for families in 2024.
  • Any earnings on the account remain tax-free as long as the money is used for qualified medical expenses such as deductibles, copayments and other expenses.
  • The money can be withdrawn tax-free at any time to pay for qualified medical expenses. The money rolls over from year to year, so you don’t have to worry about spending it within a certain time frame.

If you spend your HSA money on non-qualified expenses, then you’ll be charged a 20 percent bonus penalty in addition to income taxes on the withdrawal. However, once you reach age 65 that bonus penalty disappears, so HSA funds can be withdrawn and used for any reason, but you will be required to pay ordinary income tax on the withdrawal, if so. Of course, you can still use the account to pay for qualified medical expenses and enjoy the tax-free withdrawal.

For this reason, some people even treat their HSA as another retirement account, similar to an IRA or 401(k). This strategy is a favorite among many top financial advisors.

Best ways to invest an HSA

Considering that investing HSA funds is one of the best ways to take advantage of the account, it is surprising how few people actually do it. In 2020, just 9 percent of HSAs were invested, according to a report from the Employee Benefits Research Institute. Part of the reason for that low number could be that HSA providers require high account minimums for investing. But once those thresholds (no more than $2,000) are met, you’ll want to consider the investment options.

Determining how you’d like to invest your HSA will depend on your unique circumstances. Understanding your risk tolerance and potential future medical needs will help determine how aggressively to invest your savings. For example, if you’re using an HSA mainly as a retirement account, then it could make sense to opt for high-return investments. Here are a few options.

Money market funds

If you keep a relatively small balance in your HSA or you plan to regularly tap the account, it could make sense to go with low-risk, low-return options such as money market funds. That way you’ll be sure that your money will be there when you need it to pay bills.

However, it could make sense to keep only the money you’re likely to need in the near term in a money market fund and invest other amounts in higher-return but higher-risk choices below. If you have money in the account that you won’t need to touch for years, then other investments are likely to offer much better long-term returns, but there are no guarantees.

Stocks and funds

For people who don’t expect much in the way of medical expenses in the coming years, stocks are likely to be one of the best ways to invest and grow your HSA. Keep in mind that stocks are volatile, so if you’re counting on your HSA to cover out-of-pocket medical costs over the next year or two, it’s best to keep a portion of your account in cash or money market funds to ensure the money is there when you need it.

Here are a few ways to invest in stocks and stock-based funds:

  • Index funds: Index funds allow investors to purchase a broadly diversified group of stocks that track indexes such as the S&P 500 or Russell 2000. Index funds come with rock-bottom fees, which means more of your returns will go to you instead of the fund’s manager. Index funds are available as both mutual funds and ETFs.
  • Dividend funds: If you’re looking to take a slightly more targeted approach, funds that hold dividend-paying stocks can also be a good fit for HSA investing. Companies that pay dividends are typically profitable and established, which might make them safer than younger companies without a proven business model. Plus, you won’t be taxed on the dividends, which will be available to either be reinvested or held as cash in your account.
  • Individual stocks: The riskiest approach to take with investing your HSA is to hold a small number of individual stocks. While they can provide outsized returns, the risk is magnified if you’re wrong because you won’t have a diversified portfolio to protect you. Make sure you understand the business model, competitive position and valuation of any company you invest in.

Fixed income

If you have a lower risk tolerance or think you might need money for future medical expenses, it’s best to focus on investments with less risk. Short-term bond funds will likely make the most sense for those in that scenario. The funds can generate some cash and will be relatively stable, meaning you’ll be less affected by fluctuating interest rates.

It’s nice to be able to use your HSA as an additional retirement savings account, but that should only be the focus if you can cover medical expenses with other funds. You never want to be in a position where you can’t cover medical costs because of poor investment decisions in an HSA.

Robo-advisor

If you aren’t interested in selecting investments on your own, some HSA providers offer the option of using a robo-advisor. These automated advisors select investments on your behalf after receiving your answers to questions about your risk tolerance, time horizon and a few other topics. Most robo-advisors do charge an annual fee, but it’s typically far below what a traditional financial advisor might cost.

Fidelity’s robo advisor, Fidelity Go, will manage your HSA and doesn’t charge fees for its Fidelity Flex mutual funds. No management fee is charged for accounts with less than $25,000, and the fee is just 0.35 percent for account values of $25,000 or more. It’s a solid option for those who don’t want to manage their HSA investments on their own.

What happens to HSA funds after retirement?

Once you reach age 65, money in your HSA can be withdrawn and used for any reason, but if it’s used for non-qualified expenses, you’ll be subject to ordinary income taxes on the withdrawal. Withdrawals for non-qualified expenses prior to age 65 come with a 20 percent penalty and are taxed as ordinary income, so it’s best to avoid these withdrawals.

You can continue contributing to an HSA as long as you’re covered by an HSA-compatible health plan and aren’t enrolled in Medicare. However, most people enroll in Medicare at age 65, so contributions to an HSA end there, but the money in the account can be used similarly to a 401(k) or IRA. While you may not contribute more to an HSA if you’re on Medicare, you can continue to use any money in the account for qualified medical expenses and take advantage of tax-free withdrawals, too.

Bottom line

Taking advantage of the investment opportunity available through HSAs is necessary if you’re going to fully maximize the benefits of the account. For those with a long time horizon, stocks will likely be the best bet to grow your HSA’s value. If you’re more cautious or may have near-term medical needs, it’s best to stick with short-term fixed-income investments.