At NerdWallet, we adhere to strict standards of editorial integrity to help you make decisions with confidence. Many or all of the products featured here are from our partners. Here’s how we make money.

When you’re signing up for health insurance, you may see some unfamiliar acronyms and wonder, “What is an HSA?”

HSA stands for Health Savings Account, and it is a handy way to save for medical expenses and reduce your taxable income. Read on to learn more about how HSAs work and how they can benefit you.

Qualifying for an HSA

If you are enrolled in a high-deductible health insurance plan (HDHP) as defined by the government, you can qualify for an HSA. For 2017, the IRS defines an HDHP for an individual as a plan with an out-of-pocket maximum of $6,550 and a minimum deductible of $1,300. For a family plan in 2017, the out-of-pocket maximum is $13,100 and the minimum deductible is $2,600.

How an HSA works

It’s common for health insurance providers to offer HSAs. If yours doesn’t have one, you can open a separate HSA account at most financial institutions.

Each year, you decide how much to contribute to your HSA account, though you cannot exceed government-mandated maximums. In 2017, these limits are $3,400 for an individual ($3,350 in 2016) and $6,750 for a family (also $6,750 in 2016); adults over 55 can add up to $1,000 more. If you have an HSA through your workplace, you can set up easy automatic contributions directly from payroll.

You will receive a debit card or checks linked to your HSA balance, and you can use the funds on eligible medical expenses. This includes deductibles, copays and coinsurance, plus other qualified medical expenses not covered by your plan. Be aware that insurance premiums usually cannot be paid for with HSA funds.

Unlike a Flexible Spending Account, your HSA balance rolls over from year to year, so you never have to worry about losing your savings. Once you’re over age 65 and enrolled in Medicare, you can no longer contribute to an HSA, but you can still use the money for out-of-pocket medical expenses. If you use the money on non-eligible expenses, you have to pay income tax on that amount (plus a penalty if you’re under 65).

HSAs have 3 tax advantages

One of the greatest benefits of HSAs is they have three tax advantages, says Matt Irvine, vice president of sales and marketing at Health Savings Administrators, which helps clients invest their HSA funds. “HSA contributions are pre-tax/tax-deductible, the money grows tax-free and the money can come out tax free,” Irvine says. This means your contributions are made before your income is taxed, you don’t pay taxes on the account’s growth, and if you make withdrawals for eligible expenses, you don’t pay tax on that money then, either.

Because income is taxed after you make HSA contributions, you will be taxed as though you make less money. Say, for example, you make $40,000 per year. If you put $3,000 in your HSA, you will be taxed as though you make $37,000, thus lowering your tax burden.

Investment potential for HSAs

Another benefit of HSAs is they can be invested in mutual funds, stocks and other investment tools to generate more money. Different companies can help you do this, depending on your investing preferences.

“The HSA is the most tax-advantaged investment option for medical expenses and retirement,” Irvine says. “There are also no minimum required distributions at 70½ like other retirement accounts.”

Irvine explains that it may even be more beneficial to invest in an HSA rather than a 401(k) or IRA without matching.

“If the contribution goes into my HSA via payroll deduction, it is not subject to FICA,” he explains. FICA, short for Federal Insurance Contributions Act, is the federal income tax that goes toward Social Security and Medicare. “That gives me 7.65% more into my HSA. My 401(k) and IRA contributions may avoid state and federal taxes, but they are subject to the FICA tax,” Irvine says.

If you plan to invest your HSA balance, Irvine says, “The key is to find an HSA that provides first dollar investing with low cost, high performing, reputable funds.” In other words, avoid companies that require a minimum balance for investing or charge hefty fees.