Most people who put money into health savings accounts do so to cover their current medical costs. It’s a great way to set aside pre-tax money to spend on the medical bills you have today.

But the HSA has another, potentially better use—to save money for medical expenses once you are in retirement.

“If you can afford to pay your current health care expenses from your regular savings, using an HSA as a retirement account is a no-brainer,” says Peter Stahl, a certified financial planner and president of Bedrock Business Results.  

To save for retirement in an HSA, you must have signed up for a high-deductible health plan either on your own or through your employer. About half of all large employers in the U.S. now offer these plans. According to Mercer Consulting, 66 percent of large employers are expected to offer them by the end of 2017.

Every year, you add money to your HSA from your pretax income, the same way that you might add money to a traditional IRA or a 401(k). The idea is that you don’t spend it on your current medical expenses but instead leave it in the account until you retire.

A Rare Triple Tax-Free Play

By doing this, you’ll get great tax breaks. With an HSA, you can make withdrawals at any time and you won’t pay taxes on that money as long as you use it to cover medical costs. This can help you avoid withdrawing funds—and paying taxes—from a traditional 401(k) or IRA to cover health expenses. 

Since you make contributions to an HSA using pre-tax dollars, you also reduce your current federal tax bill. Those contributions are exempt from state income tax as well, except in Alabama, California, and New Jersey.

Finally, like a 401(k) plan, the money in an HSA grows tax-free.

The savings can really add up. An analysis by Morningstar estimates that if you save in an HSA for 30 years you could end up with nearly $100,000 more than if you had saved in a traditional 401(k) where all withdrawals are taxed as income. You could save about $120,000 more than if the money had been invested in a regular taxable account, where withdrawn earnings would be taxed at 15 percent, the long-term capital gains rate for most people.

Is an HSA Right for You?

Using an HSA for retirement savings isn’t right for everyone. Before you decide to do this, ask yourself these questions:

  • Can I afford to put money in an HSA? An individual can contribute up to $3,350 in 2016. A household with family coverage can contribute up to $6,750. Once you reach age 55 you can contribute an additional $1,000 a year. If you can’t afford to save the maximum allowed in both your 401(k) and an HSA, Stahl recommends investing enough in the 401(k) to get the maximum employer contribution, and then focusing on funding the HSA.

    If you end up with low health care costs in retirement you can use your HSA for non-medical expenses, says Christine Benz, director of financial planning at Morningstar. As long as you are age 65 or older, you can withdraw funds from an HSA for non-medical expenses but you'll have to pay income tax, just like you would on a withdrawal from a traditional IRA or 401(k). But be aware that if you make such a withdrawal before the age of 65, you'll have to pay a 20% penalty plus the income tax.

  • Can I cover my medical expenses today? Besides putting money into your HSA every year, you should be able to cover you current medical expenses. This year, the minimum annual deductible in high-deductible plans is $1,300 for an individual and $2,600 for a family. You should check on the maximum annual out-of-pocket costs for your particular plan. Federal law currently limits the maximum to $6,550 for an individual and $13,100 for a family.

  • Should I invest the money in my HSA? Most of the money people tuck into their HSAs is kept in bank savings accounts. But if you don’t plan to use the funds for 10 years or more, you’d be better off investing it, says Stahl. But be careful. Many of the mutual funds offered in HSA plans through employers tend to come with high fees. Benz suggests taking advantage of a neat quirk in HSA plans: You can move your money from your employer-provided plan to an HSA offered by a different provider such as Health Savings Administrators—even while you remain an employee of the company. It offers low-expense funds from Vanguard, Dimensional Fund Advisors and TIAA. You could also turn to another provider, HSA Bank, which offers self-directed HSAs through TD Ameritrade that includes a lineup of mutual funds you can buy commission free. Many credit unions also offer HSA investment options.