If your parents or grandparents extolled the virtues of saving up for a rainy day, maybe you still cling to that mindset.

It’s very possible to take that advice to extremes, though. Make no mistake: Building an emergency savings fund is essential to financial health, as it’s cash at the ready if you have an unexpected job loss, car repair, hospital bill or other unexpected cost to cover.

But if you’re a dedicated saver who’s setting aside more money for emergencies than you need in a savings account that pays little or no interest, it could put you at a financial disadvantage in the long run. Freeing up some of your savings for investments with the potential to earn a higher return may make more sense.

So how much is too much? That all depends on how much you think you’ll need should an unexpected expense arise, and how long you anticipate you’ll need to set those funds aside.

“What is deemed as ‘too much’ in an emergency savings (fund) really depends on your comfort zone and how much money you have in excess of the number of months or years you want your emergency savings to cover,” says Bola Sokunbi, certified financial education instructor and founder of the personal finance platform Clever Girl Finance.

Calculate how much you need in emergency savings

First, determine how much your core living expenses cost each month.

Remember: You don’t necessarily need to replace an entire month’s income – just your basic needs. Stick to the essentials: housing, food, medicine, utilities, insurance, transportation and minimum debt payments. Leave out discretionary expenses like memberships and subscriptions. You may also want to adjust that amount to leave out paycheck deductions, such as 401(k) contributions.

Once you’ve figured out how much you need to live each month, multiply that amount by the number of months you want to save for.

“The general standard is to have three to six months of expenses (saved) to cover your core essentials,” Sokunbi says. “However, given economic uncertainty as a result of the ongoing health crisis, having nine to 12 months of those expenses saved – if you can put the money aside – would be ideal.”

James Brewer, founder of Envision Wealth Planning, says it’s a good idea to ask yourself hypothetical questions when figuring out how many months you’ll need to save for. How long, for example, might it take you to find a new job if you become unemployed? Could you foresee a scenario that would require more than the standard three to six months of expenses?

“It’s thinking through things that could occur, and what cash will be needed for that,” Brewer says.

The danger of overfunding your emergency savings

Hoarding more cash than you need for unexpected costs could actually end up costing you money. Over the long term, you risk losing the purchasing power of your savings if that money is earning less than the rate of inflation. Bankrate’s national average savings account yield is 0.1 percent APY,  but the U.S. inflation rate has hovered around 2 percent in recent years. “Over time, this loss of value can add up,” Sokunbi says.

Although it may be tempting to park all of your money in a federally insured savings account that won’t ever lose its principal balance, Brewer says that risk-averse decision comes at the expense of forgoing more lucrative investment opportunities for the portion of your savings that doesn’t need to be set aside to cover emergencies. And the longer you wait to move that money, the more you’ll miss out.

“The kinds of accounts that are designed for emergency money don’t pay much interest on your money,” Brewer says. “So, are you really keeping up?”

Put extra funds to better use

Instead of letting that extra money stagnate in a savings account, you can take steps to make the most of your surplus savings and build wealth.

“Ideally, you want your money to grow and earn more money, and the way to do this is through investing,” Sorobo says.

Three key ways to invest and boost your return potential are via the stock market, real estate and owning a business, Sokunbi says. If tackling the market seems daunting, so-called robo-advisers, or automated advisor apps that rely on algorithms, can automatically select a diversified investment portfolio that fits your risk tolerance for you.

You could also put your extra savings money toward goals like buying a home, building a college fund or saving for retirement while reaping the tax advantages of a 520 college savings account or a 401(k) or IRA retirement account. Another option is to use extra cash to pay down debt, such as student loans or credit cards that carry higher interest rates.

Bottom line

People usually have multiple funding needs in their lives that extend beyond an emergency fund. So, it’s best to direct cash not needed for unexpected emergencies in ways that will either grow your money or you reduce your debt. Brewer recommends thinking about what percentage of your surplus savings you’ll want to allocate to each of those areas.

“Don’t get caught up in a single goal,” Brewer says.

Learn more: