Health savings accounts (HSAs) are tax-advantaged savings accounts designed to help people with high-deductible health plans (HDHPs) pay for out-of-pocket medical expenses. While these accounts have been available since 2004, too few Americans are taking advantage of them. According to a July 2015 report from the Employee Benefit Research Institute (EBRI), about 17 million people had HSA-eligible health insurance plans in 2014, but only 13.8 million of that number had opened an HSA.

Moreover, people with HSAs had an average balance of just $1,933 – a pittance, considering that the allowable annual contribution in 2016 is $3,350 for those with self-only health plans and $6,750 for those with family coverage. What's more, the balance can be carried over from year to year and can move with you from job to job. You are not legally obligated to "use it or lose it," as with a flexible spending account (FSA). (See Comparing Health Savings and Flexible Spending Accounts.) In addition, only 6% of HSAs were in investment accounts. EBRI found that virtually no one contributes the maximum, and nearly everyone takes current distributions to pay for medical expenses.

All of this means that consumers who have HSAs, as well as consumers who are eligible for HSAs but haven’t opened one, are missing out on an incredible option for funding their later years. It’s time to start a new trend.

Why Use an HSA for Retirement?

An HSA's triple tax advantage, which is similar to that of a traditional 401(k) plan or IRA, makes it a top-notch way to save for retirement.

1. Your contributions to an HSA (which can be made via payroll deductions, as well as from your own funds) are tax deductible, even if you don't itemize. In addition, any contributions your employer makes do not have to be counted as part of your taxable income.

2. Your account balance grows tax free. Any interest, dividends or capital gains you earn are nontaxable.

3. Withdrawals for qualified medical expenses are tax free. This is a key way in which an HSA is superior to a traditional 401(k) or IRA as a retirement vehicle because once you begin to withdraw funds from those plans, you pay income tax on that money, regardless of how the funds are being used. Also better: Unlike a 401(k) or IRA, an HSA does not require the account holder to begin withdrawing funds at a certain age. The funds can remain untouched as long as you like, although you may no longer contribute once you reach 65 and are eligible for Medicare.

To qualify for an HSA, you must have a high-deductible health plan and no other health insurance. A major concern consumers have about foregoing a preferred provider organization (PPO) or health maintenance organization (HMO) plan and choosing a high-deductible health plan instead is that they will not be able to afford their medical expenses. In 2015 and 2016, an HDHP has a deductible of at least $1,300 for self-only coverage and $2,600 for family coverage. Depending on your coverage, your annual out-of-pocket expenses could run as high as $6,450 in 2015 or $6,550 in 2016 for self-only coverage – or $12,900 in 2015 and $13,100 in 2016 for family coverage – under an HDHP. (See 20 Ways to Save on Medical Bills.) This can be one reason these plans are surprisingly popular among affluent families who will benefit from the tax advantages and can afford the risk (see High-Income Benefits from a Health Savings Account ).

However, according to Fidelity, a lower-deductible plan such as a PPO could be costing you more than $2,000 a year in higher premiums because you’re paying the extra money regardless of the size of your medical expenses that year. With an HDHP, your spending more closely matches your actual healthcare needs. (Of course, if you are in a situation in which you know your healthcare costs are likely to be high – a woman who is planning to give birth, for instance, or someone with a chronic medical condition – a high deductible may not be the best choice for you.) Also, HDHPs completely cover some preventive care services. So an HDHP might be more budget-friendly than you think – especially when you consider its advantages for retirement. Let’s take a look at how you could be using the features of an HSA to more easily and more robustly fund your retirement. (Get up to speed on the basics of these accounts in Rules for Having a Health Savings Account.)

Max Out Contributions Before Age 65

As mentioned above, your HSA contributions are tax deductible before you turn 65 and become eligible for Medicare. The contribution limits of $3,350 (self-only coverage; it rises to $3,400 in 2017) and $6,750 (family coverage) include employer contributions, so if you have self-only health coverage and your employer kicks in $1,000, you can add another $2,400 in 2017. The contributions limits are adjusted annually for inflation; since inflation is low at the moment, they will remain unchanged in 2017, with the one exception noted here.

If you have an HSA and you're 55 or older, you can make an extra "catch-up" contribution of $1,000 per year and a spouse who is 55 or older can do the same, provided each of you has his or her own HSA account. Your family's total annual contribution cannot exceed $8,750.

You can contribute up to the maximum regardless of your income, and your entire contribution is tax deductible. You can even contribute in years when you have no income. You can also contribute if you’re self-employed. (See Top Retirement Strategies for Freelancers and 10 Tax Benefits for the Self-Employed.)

“Maxing out contributions before age 65 allows you to save for general retirement expenses beyond medical expenses. Although you will not receive the tax exemption, it gives retirees more access to more resources to fund general living expenses,” says Mark Hebner, founder and president, Index Fund Advisors, Inc., in Irvine, Calif. and author of “Index Funds: The 12-Step Recovery Program for Active Investors.”

Don’t Spend Your Contributions

This may sound counterintuitive, but we're looking at an HSA primarily as an investment tool. Granted, the basic idea behind an HSA is to give people with a high-deductible health plan a tax break to make their out-of-pocket medical expenses more manageable.

But that triple tax advantage means that the best way to use an HSA is to treat it as an investment tool that will improve your financial picture in retirement. And the best way to do that is to never spend your HSA contributions during your working years and pay cash out of pocket for your medical bills. In other words, think of your HSA contributions the same way you think of your contributions to any other retirement account: untouchable until you retire. Remember, the IRS does not require you to take distributions from your HSA in any year, before or during retirement.

If you absolutely must spend some of your contributions before retirement, be sure to spend them on qualified medical expenses. These distributions are not taxable. If you are forced to spend the money on anything else before you’re 65, you will pay a 20% penalty and you will also pay income tax on those funds.

Invest Your Contributions Wisely

The key to maximizing your unspent contributions, of course, is to invest them wisely. Your investment strategy should be similar to the one you’re using for your other retirement assets, such as a 401(k) plan or a RA. When deciding how to invest your HSA assets, make sure to consider your portfolio as a whole so that your overall diversification strategy and risk profile are where you want them to be (see Retirement Planning: Asset Allocation and Diversification).

Your employer might make it easy for you to open an HSA with a particular administrator, but the choice of where to put your money is yours. An HSA is not as restrictive as a 401(k); it’s more like an IRA. Since some administrators only let you put your money in a savings account, where you’ll barely earn any interest, make sure to shop around for a plan with high quality, low-cost investment options, such as Vanguard or Fidelity funds.

How Much Could You End Up With?

Let's do some simple math to see how handsomely this HSA savings and investment strategy can pay off. We’ll use something close to a best-case scenario and say you’re currently 21, you make the maximum allowable contribution every year to a self-only plan, and you contribute every year until you’re 65. We’ll assume that you invest all your contributions and automatically reinvest all your returns in the stock market, earning an average annual return of 8%, and that your plan has no fees. By retirement, your HSA would have more than $1.2 million.

What about a more conservative estimate? Suppose you’re now 40 years old and you only put in $100 per month until you’re 65, earning an average annual return of 3%. You’d still end up with nearly $45,000 by retirement. Try out an online HSA calculator to play with the numbers for your own situation.

Maximize Your HSA Assets in Retirement

Here are some options for using your accumulated HSA contributions and investment returns in retirement. Remember, distributions for qualified medical expenses are not taxable, so you want to use the money exclusively for those expenses if possible. There are no required minimum distributions, so you can keep the money invested until you need it.

If you do need to use the distributions for another purpose, they will be taxable. However, after age 65, you won’t owe the 20% penalty. Using HSA assets for purposes other than qualified medical expenses is generally less detrimental to your finances once you’ve reached retirement age because you may be in a lower tax bracket if you’ve stopped working, reduced your hours or changed jobs. In this way, an HSA is effectively the same as a 401(k) or any other retirement account, with one key difference: There is no requirement to begin withdrawing the money at age 70.5. So you don’t have to worry about saving too much in your HSA and not being able to use it all effectively.

Withdrawals: It's All in the Timing

By waiting as long as possible to spend your HSA assets, you maximize your potential investment returns and give yourself as much money as possible to work with. You’ll also want to consider market fluctuations when taking distributions, the same way you would when taking distributions from any investment account. You obviously want to avoid selling investments at a loss to pay for medical expenses.

Choose a Beneficiary

When you open your HSA, you will be asked to designate a beneficiary to whom any funds still in the account should go upon your death. The best person to choose is your spouse because he or she can inherit the balance tax-free. (As with any investment with a beneficiary, however, you should revisit your designations from time to time because death, divorce or other life changes may alter your choices.) Anyone else you leave your HSA to will be subject to tax on the plan’s fair market value when they inherit it. Your plan administrator will have a designation-of-beneficiary form you can fill out to formalize your choice. (See Why Your Will Should Name Designated Beneficiaries and Mistakes in Designating a Retirement Beneficiary.)

Pay Medicare and Long-Term Care Insurance Premiums in Retirement

Some common qualified medical expenses that you may want to use your HSA balance to pay for in retirement include contact lenses, teeth cleaning, dental fillings, eye exams, eyeglasses, hearing aids, hospital bills, prescription medications, therapy, wheelchairs and X-rays. You can also use your HSA balance to pay for in-home nursing care, retirement community fees for lifetime care, long-term care services, nursing home fees, and meals and lodging that are necessary while obtaining medical care away from home. You can even use your HSA for modifications that make your home easier to use as you age, such as entrance or exit ramps, grab bars and handrails.

“Using HSA money to pay for medical expenses and long-term care insurance in retirement is a great benefit for investors given the tax exemption on any withdrawals made to fund either. In other words, it’s the most cost-effective way to fund those expenses because they provide investors the highest after-tax value,” says Hebner. (See 20 Medical Expenses You Didn’t Know You Could Deduct and IRS Publication 502, Medical and Dental Expenses.) Also, note that there are limitations on how much you can pay tax-free for long-term care insurance based on your age. Click here for more information.

Reimburse Yourself for Earlier Expenses

An HSA doesn’t require you to take a distribution to reimburse yourself in the same year your incur a particular medical expense.The key limitation is that you can’t use an HSA balance to reimburse yourself for medical expenses you incurred before you established the account. So keep your receipts for all healthcare expenses you pay out of pocket after you establish your HSA. If, in your later years, you find yourself with more money in your HSA than you know what to do with, you can use your HSA balance to reimburse yourself for those earlier expenses.

Caveats

The strategies described in this article are based on federal tax law. Most states follow federal tax law when it comes to HSAs, but yours may not. At the time of writing, Alabama, California and New Jersey tax HSA contributions, and New Hampshire and Tennessee tax HSA earnings. Even if you live in a state that taxes HSAs, however, you’ll still get the federal tax benefits. In some states, bills have been presented, but not passed, to change tax law to match the federal treatment of HSAs. The taxation of these plans could change in the future at either the state or federal levels. The plans could even be eliminated altogether, but if that happens, we would likely see them grandfathered for existing account holders, as was the case with Archer MSAs.

The Bottom Line

A health savings account, available to consumers who choose a high-deductible health plan, has been largely overlooked as an investment tool, but with its triple tax advantage, it provides an excellent way to save, invest and take distributions without paying taxes. The next time you’re choosing a health insurance plan, take a closer look at whether a high deductible health plan might work for you. If so, open an HSA and start contributing as soon as you’re eligible. Through maximizing your contributions, investing them and leaving the balance untouched until retirement, you’ll generate a significant addition to your other retirement options. (For related reading, see Forget 401(k)s: Put Your Next Savings Dollar Here.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.