Top tips to maximize your health savings account

If you've been in the retirement savings game for a while, you're likely taking advantage of an employer-sponsored retirement plan, such as a 401(k) or 403(b), and a Roth or traditional individual retirement account (IRA).

But the latest retirement savings method to join the usual suspects is the health savings account (HSA), which offers an array of tax advantages that can help build up your savings to spend during your post-work life. HSAs should be considered, first and foremost, as a good way to build savings for health-related costs in the future. However, given their structure, these can also act as another kind of retirement account.

Health care costs
Sripfoto | Getty Images

HSAs have been around for a decade, but people are especially talking about them now because of a recent report from the Employee Benefit Research Institute, which found that a person contributing for 40 years to an HSA could save up to $360,000 if the rate of return was 2.5 percent, $600,000 if the rate of return was 5 percent, and nearly $1.1 million if the rate of return was 7.5 percent—assuming no withdrawals.

That's a nice chunk of change to add to your retirement coffers. So what's the downside?

Read MoreHow retirees can save on health care

While it's true that these accounts do offer tax advantages—and you can even build up your savings to spend in retirement—HSAs don't operate the way traditional retirement plans do.

To really leverage the benefits of these accounts, it's best to max out your 401(k) and IRA first and then use an HSA as it was intended—for medical expenses.

Here are some reasons why.

Sign Up for Our Newsletter Your Wealth

Weekly advice on managing your money
Get this delivered to your inbox, and more info about about our products and services.
By signing up for newsletters, you are agreeing to our Terms of Use and Privacy Policy.

The HSA loophole

HSAs aren't technically retirement plans, but they are "trusteed" like IRAs under Internal Revenue Service rules, according to Paul Fronstin, director of health research at EBRI. Although an HSA's primary role is to serve as a savings account to offset the cost of high-deductible health plans, you can deposit pretax dollars (or deduct your contributions), and the money grows tax-free—similar to an IRA or 401(k). (You can learn more by reading IRS Publication 969.)

If your health plan's deductible is at least $1,250 ($2,500 for a family), you can open an HSA and contribute up to $3,250 per year for an individual, or $6,450 per family, per year. As with an IRA, there's also a "catch-up provision" that allows you to stash an extra $1,000 a year if you're 55 or older.

Triple tax-free benefit

So what's with all the hype?

  • Unlike Flexible Spending Accounts, you can roll over HSA funds from year to year. There's no "use it or lose it" clause.
  • Depending on where you set up your HSA, you're not limited to keeping it in cash; some companies offer a menu of mutual funds or other investments.
  • While your 401(k) is tied to your employer, your HSA is not. As long as your health plan meets the deductible requirement and permits you to open an HSA, you can open one anywhere, so you can, and should, shop around.
  • You can withdraw the funds tax-free at any time for qualified medical expenses.

Read MoreGen X should prepare to retire now

After age 65, you can withdraw money to pay for non-medical expenses, but the funds will be taxed as income (similar to an IRA). Prior to age 65, you'll get hit with a 20 percent penalty on withdrawals for non-medical expenses—and you'll also owe taxes.

So if you use your HSA funds only for qualified medical expenses, you can net a triple tax break: You get the pretax benefits of an IRA, the tax-free withdrawal benefits of a Roth IRA and the tax-free growth benefits of both. Otherwise, after age 65 you can spend the money on anything, but that money would be taxed, similar to IRA withdrawals. And there are other considerations.

Caveat investor

In terms of HSAs and retirement, these accounts haven't received the same level of scrutiny and oversight as more traditional plans. For example:

Check your costs. While new regulations now require 401(k) plans to be more transparent about various account and investing fees, HSAs aren't subject to those rules, said Kevin McKechnie, executive director of the HSA Council with the American Bankers Association. It's important to ask to see a full schedule of fees and charges when you're shopping around for the right HSA account.

Read MoreTop reasons to not tap 401(k)s

Depending on the provider, you could be charged a monthly account fee, a check-writing fee or other transaction fees, noted Fronstin at EBRI.

Know what you're getting. It's crucial to understand the options your HSA provider is offering, because they vary widely.

One company, Health Savings Administrators, allows you to invest your HSA funds in some 22 Vanguard mutual funds. Others may offer you only an FDIC-insured savings account, which is similar to a savings account at your regular institution but features the ability to contribute pretax dollars.

Some non-bank companies may provide a savings account—but it will not be FDIC-insured. Still others, such as Wells Fargo, require a minimum balance of $2,000 before you can invest it.

Read MoreInvestors fear retirement unknowns

Know the rules. Because the withdrawal rules vary from traditional plans, you have to keep in mind the specific restrictions that apply to HSAs—and try to stay up to date on changes affecting HSAs under the Affordable Care Act.

Right now you can withdraw HSA funds tax-free at any point for qualified medical expenses, but if you use them for non-medical expenses, you'll owe tax on those withdrawals. And if you withdraw money before age 65 for non-medical expenses, you could incur a 20 percent penalty.

Strategic savings

Take the reins. Some HSAs can be set up through your employer, but ultimately you are the owner of the account. You can roll over your current HSA to another provider if you don't like your employer's option, Fronstin said. And unlike an old 401(k), which you typically have to roll over into an IRA or new 401(k), you can take your HSA with you when you leave your job.

An HSA could be a worthy way to supplement your retirement, even if you've maxed out your other retirement plans. Because you can max out your 401(k) and IRA and still save the full amount permitted in your HSA, it does raise the cap on tax-deferred savings.

Read MoreFinding your retirement 'magic number'

That said, the fees can be tricky, the investment options are limited, and you'll only reap the triple tax benefit if you spend the money on medical expenses.

If you have extra cash to invest and haven't yet maxed out your IRA, do that. Even if you make too much money to deduct it or you earn too much to contribute to a Roth IRA, consider a non-deductible IRA—which still gives you the benefit of tax-deferred growth, plus far more control over your investing choices and costs.

"If you're looking for a way to supplement your retirement savings in general, an HSA may not be the ideal place to help you money grow."

Given that, according to industry estimates, the cost of your health care in retirement could be $200,000 or more, using an HSA as a tax-advantaged account just for medical bills is smart.

But if you're looking for a way to supplement your retirement savings in general, an HSA may not be the ideal place to help your money grow.

Read MoreBoosting nest eggs post-50

If you use the funds for ordinary, non-medical retirement expenses after age 65, they'll be taxed at the same rate as IRA withdrawals—but your investment options and the all-in cost could cut into any tax benefits.

—By Jon Stein, special to Stein is founder and CEO of Betterment, which ranked 45th on the 2014 CNBC Disruptor 50 list. The firm offers Web-based money-management services.