Save and Invest

More Americans are using a trick that can help you save money for retirement—there's just 1 catch

Maleka Ali | Twenty20

More and more Americans are using a health savings account (HSA): As of January 2017, 21.8 million people had opened a HSA, a 9 percent increase in enrollment from 2016. Besides being a good way to save money on health care costs, HSAs can supplement your retirement savings.

"It's kind of like this retirement loophole trick," says certified financial planner at Betterment Nick Holeman.

While HSAs are not intended to be used for retirement — they're designed to help you pay for qualifying healthcare expenses — they're a tax-friendly investment vehicle that can act as a powerful retirement-savings tool if you let your balance compound over years.

There is one catch: You can only contribute money to an HSA if you have a high-deductible health care plan (HDHP), one that has a lower monthly premium and a higher deductible, or amount you must pay for your medical care before insurance kicks in.

Whether or not you have access to an HSA "is really employer-decided," says Andrew Crowell, vice chairman of Wealth Management at D.A. Davidson. "This is just a benefit that's available to the employees of companies that fall within a high-deductible health plan." Note that if you're self-employed or if your company does not offer a health plan, you may be able to contribute to an HSA if you're enrolled in an HSA-qualified high deductible health insurance plan.

Even if you do have an HDHP, these plans aren't for everyone, Holeman notes: "If you are on medications, have a chronic illness or if you're older — anything where you might be going to the doctor a lot — then having a high-deductible will probably be very expensive for you. Typically, it only makes sense if you're healthy and you don't use the doctor very often."

The definitive guide to retirement savings plans
The definitive guide to retirement savings plans

Before signing up for an HDHP, you'll want to sit down and ask yourself a few questions, says Holeman: "How often do you go to the doctor? Do you have a safety net that's large enough so that if you do need to pay the high deductible, you can pay that out of pocket without having to eat rice and beans for a month?"

If an HDHP is right for you, you should consider opening an HSA account. Here's why:

You get a triple tax benefit

HSAs offer significant tax advantages:

1. The money is tax deductible when you put it in. As with a 401(k), you contribute pre-tax dollars to an HSA and you get a deduction whenever you make a contribution. Deductions reduce your taxable income, which could place you in a lower tax bracket.

For 2019, the HSA contribution limit is $3,500 per year if you're single and $7,000 per year if you have a family. If you're 55 or older, you can make an additional $1,000 "catch up" contribution.

This is much less money than you can put into traditional retirement savings vehicles: With a 401(k) plan, the contribution limit for 2019 is $19,000 if you're under age 50 and $25,000 if you're 50 or older. For traditional and Roth IRAs, the maximum yearly contribution is $6,000, or $7,000 for people age 50 or older.

That means that saving in an HSA alone won't be enough to fund your retirement, Holeman notes, "but it can be a nice addition to your normal retirement savings."

Health savings account: A great 401(k) alternative
Health savings account: A great 401(k) alternative

2. Your earnings grow tax-free. When you contribute to an HSA, you can invest your funds, and whatever interest you earn is tax-free.

Since your HSA is not tied to your employer in the manner of a 401(k), you can choose whatever provider you want. "Typically, the [HSA] providers offer mutual funds — some more aggressive than others — but a range of mutual funds or index funds that the contributions could be invested in," says Crowell.

When choosing how you want to invest your money, do your homework and shop around. Fees and investment options matter. Note that some accounts will require a minimum balance. HSASearch lets you compare hundreds of providers.

3. You can take the money out tax-free if you use it for qualified medical expenses. If you're withdrawing the funds for qualified medical expenses, you get to take it out tax-free.

The list of qualified expenses, which you can find on the IRS website, "are pretty broad," says Crowell, and include things like co-payments, flu shots, X-ray fees and physical therapy. "Pretty much any doctor visit would be covered, and typically, dental and vision are also considered qualified medical expenses," which would include things like braces, teeth cleanings and contact lenses.

That said, "you want to make sure you're not pushing the boundaries of what's considered a medical expense," because if you use your HSA funds for something other than qualified medical expenses, Crowell says, you'll be hit with a 20 percent tax penalty. "This is not an area where you ever want to get in the grey zone because the penalties are stiff."

If you're over age 65, however, you can make withdrawals to cover non-medical expenses. The 20 percent penalty is waived and the distribution would just be taxed at your regular rate.

Keep in mind that while most states align with the federal tax laws around HSAs, not all of them do. California and New Jersey, for example, tax contributions at the state level — plus, residents owe taxes on any interest, dividends or capital gains earned in their HSA.

Ramit Sethi: If you want to build wealth, saving your money isn't enough
Ramit Sethi: If you want to build wealth, saving money isn't enough

There's no 'use it or lose it' policy

Unlike a health care FSA (flexible spending account) — another tool that lets you set aside pre-tax money to pay for eligible medical expenses — you don't have to use the money you contribute to an HSA within a certain time span.

Crowell explains: With an FSA, "whatever dollars you had put away pre-tax in this calendar year are not going to roll over into the next calendar year. You just lose it." With an HSA, the funds don't disappear. In fact, they can keep compounding.

Plus, "there's actually no required minimum distributions even when somebody reaches their senior years," he says. "With a traditional IRA, for example, at age 70 ½, there are required minimum distributions that kick in. The IRS considers that money has been untaxed for long enough and so they tell the holder how much has to come out each year so it can be taxed."

If your money is in an HSA, though, "it can just sit there and grow and grow and grow over time without being forced to be drawn down, so it can be the last bucket tapped for somebody's retirement savings."

HSA plans are also "portable," he adds, "which means, if you change jobs, the HSA can follow you. It's your account. You don't lose the benefit because you change companies. Or, if your company changes insurance plans, again, it's still your funds and your HSA."

Should you use an HSA to save for retirement?

Before using an HSA as a retirement savings tool, take full advantage of your 401(k) plan if you have one, says Crowell. That means contributing enough to get the full company match.

One of the disadvantages of using an HSA for retirement is that the contribution limits are low, he points out: "For an individual in 2019, it's $3,500. If that individual is over 55, they can add an additional $1,000, so the max for an individual would be $4,500, which is typically a lot lower than their retirement plan would offer. And there's no match."

For those reasons, "first, save in that 401(k) plan and get all the matching dollars you can," he says. "Then, if you have additional dollars that your budget allows you to save, an HSA is a great secondary tool."

Don't miss: How much money you need to save to retire by age 65, according to Stanford researchers

Like this story? Subscribe to CNBC Make It on YouTube!

Correction: The story was updated to clarify that if you're self-employed or if your company does not offer a health plan, you may be able to contribute to an HSA if you're enrolled in an HSA-qualified high deductible health insurance plan.

Millennial millionaire: This simple strategy can help you retire decades earlier than you ever thought you could
Millennial millionaire: Retire early with this simple strategy