This retirement savings account is at least 17% better than a 401(k), says expert: It's 'a complete cheat code'

A health savings account comes with tax advantages that make it a more valuable retirement savings vehicle than a 401(k), financial experts say.

This retirement savings account is at least 17% better than a 401(k), says expert: It's 'a complete cheat code'

You'll soon be able to contribute much more money to your health savings account.

Last week, the IRS announced the largest-ever increase in maximum contributions to the popular savings vehicles.

In 2024, the maximum HSA contribution will be $4,150 for an individual and $8,300 for a family, up from $3,850 and $7,750, respectively, in 2023. Add on the extra $1,000 you can put in if you're over 55, and the maximum contributions are $5,150 for individuals and $10,300 for couples.

That's a big deal for long-term savers. That's because, if used to its full potential, an HSA can be a more powerful retirement savings account than more conventional vehicles, such as 401(k)s and individual retirement accounts.

Consider a calculation from Blake Hilgemann, a financial coach and author of the "Pathway to Financial Independence" newsletter: "Every dollar in an HSA is worth at least 17.65% more than a dollar in a 401(k)," he wrote in a recent tweet.

Hilgemann's arithmetic works because of an HSA's unique tax advantages. Unlike other types of tax-advantaged retirement accounts, HSA contributions and investment earnings are never taxed, provided you follow the rules when withdrawing from the account.

That means you avoid paying income tax on your withdrawals, which, at current rates, is at least 10%. And because HSA funds aren't subject to the 7.65% payroll tax employees owe, you come out at least 17.65% ahead when you save in one, says Hilgemann.

That's especially powerful for people who are, or expect to eventually be, high earners. "If you're in a high tax bracket, an HSA is a complete cheat code for you," Hilgemann told CNBC Make It.

Here's a closer look at why HSAs can be more powerful than other retirement accounts.

The HSA tax advantage

If you invest in a traditional 401(k) or IRA, you get a tax advantage right away: Money you invest in these accounts can be deducted from your taxable income for the year you made the contribution.

In exchange for the upfront tax break, you'll owe income tax on any money you withdraw from these accounts in retirement. And if you take the money out before age 59½, you'll owe the tax plus a 10% penalty.

But investing in an HSA comes with a triple tax advantage. As with a 401(k), contributions to these accounts can be deducted from your taxable income. While in the account, your investments grow tax-free. Then, when you withdraw the funds, you won't owe any tax as long as you put the money toward qualified medical expenses.

It's easy to see why Hilgemann stressed that you can save "at least" 17.65% with an HSA, because if you're in a higher tax bracket, you can save considerably more by avoiding income tax. Currently, single filers earning in excess of $578,125 pay a top marginal federal income tax rate of 37%.

How to save for retirement using an HSA

To contribute to an HSA, you must be enrolled in a high-deductible savings plan, a type of health insurance with a deductible (the amount you must pay out of pocket before your insurer begins covering costs) of at least $1,500 for self-only coverage and $3,000 for family coverage.

As with the more common flexible spending account, you can make automatic, pre-tax contributions from your paycheck to help fund health-care costs. But unlike an FSA, HSAs don't come with a "use it or lose it" provision.

Instead, the money is held in an account that belongs to you. And once it's in your account, you can invest it as your see fit — in stocks, bonds, mutual funds, exchange-traded funds and other types of securities. The longer you stay invested, the longer your investments have to create compounding returns over time.

"The most important aspect of an HSA, even more than important than the triple tax savings, is the adaptability of using it through the various stages of a person's life," says Kevin Robertson, senior vice president and chief revenue officer at HSA Bank. "Every American, at one point in their life, is going to be a spender or saver for health-care needs."

To be able to use an HSA as a retirement savings vehicle the same way you would a 401(k) or an IRA, though, you're going to have to be comfortable covering health-care expenses out-of-pocket — at least until you hit your deductible every year.

If you have consistently high health-care costs, this can get expensive fast, and a plan with a lower deductible may be more appropriate for you.

If you can cover your costs in the short term, though, you can build powerful tax-free retirement savings.

Remember, the money is only tax-free if you use it on medical expenses. But if you're strategic about it, that should be easy. For one thing, you're likely to have medical bills that need paying in retirement. In 2022, the average 65-year-old retired couple would need approximately $315,000 to cover health-care expenses in retirement, according to Fidelity.

What's more, your medical expenses don't have to be contemporaneous to count when you withdraw the money. Over the years that you you cover your expenses out-of-pocket, be sure to digitally save your receipts.

"Those expenses never go bad. You can have 20 years of expenses, and then in retirement you want to take a fancy vacation," Jeremy Finger, a certified financial planner and founder of Riverbend Wealth Management, told CNBC Make It. "You can take $15,000 out of your HSA and use those receipts to make your withdrawal tax-free."

In other words, as long as you have receipts for medical expenses, you can reimburse yourself and use the money for whatever you want. It's not some bureaucratic process where you're going to have to submit the expenses to get the money out either.

"It's all self-substantiated," says Robertson. "It's between you and the IRS as long as you have the receipts to back up your claims should you ever be audited."

DON'T MISS: Want to be smarter and more successful with your money, work & life? Sign up for our new newsletter!

Get CNBC's free report, 11 Ways to Tell if We're in a Recession, where Kelly Evans reviews the top indicators that a recession is coming or has already begun.

Check out: Why so many people making $100,000 a year don’t feel rich

How a 32-year-old earning $230,000 a year in Washington, D.C. spends her money