Life throws tough choices at us every day. Read a book or watch the next episode of The Marvelous Mrs. Maisel? Go to the gym after work or pour yourself a glass of wine and call it a day? But one choice that has lasting implications is whether to save in your emergency fund or save for retirement.

If you're like many Americans, you have room for improvement in both your cash savings and your invested retirement portfolio. Numerous studies have shown that many Americans don't have enough cash on hand to cover even relatively small unexpected expenses. And a Northwestern Mutual study concludes that 21% of Americans have no retirement savings at all.

Person putting coins in piggy bank

Image Source: Getty Images

Those grim stats represent some big money gaps relative to what experts recommend. A solid emergency fund, for example, should have enough cash to cover three to six months of your living expenses -- just in case you lose your job unexpectedly. And funding a comfortable retirement requires a balance north of $1 million in your investment portfolio.

The question is, when you don't have any savings at all, do you start padding the emergency fund or jump right into retirement saving? Here are four factors to get you to the right answer.

1. Your history with cash

Saving in an emergency fund should not be a long-term effort. You stash away a few hundred bucks monthly in a high-rate savings account until you reach your target balance. When an emergency pops up, you grab the funds you need and start saving again to replenish the money you used.

That all sounds easy enough, assuming you can stay out of that account until you face a true emergency. If you routinely dip into the emergency fund, you end up in an ongoing cycle of saving and spending. Worse, you never actually reach your savings goal. This can be disastrous if you plan on saving for retirement after you fill up your emergency fund -- because you end up failing on both efforts.

If you want to break that cycle, try using a savings app like Simple or Digit to build your emergency fund. These apps help you figure out what you can afford to save and then organize your savings around specific goals. But here's the good part. The money you save toward your goals is transferred out of your main bank and into an account you manage through the app. That bit of separation may be enough to keep you from spending it until you really need it.

You should also prioritize retirement contributions now, even if that means putting less in your emergency fund. You'll gain more traction on the retirement fund, because you can't easily spend your 401(k) balance. Also, the earlier you contribute, the more you'll make in the long run.

2. Job stability

An emergency fund is a critical fallback if you lose your job. But maybe you work in the family business or you're on the fast track to the C-suite, and you can't envision a scenario that would lead to you being unemployed. (Of course, a devil's advocate would say that's exactly the time you'd get fired.)

It's never a good idea to skate by with no cash savings. But if your job is very stable, you could target a lower emergency fund balance that would cover two or three months of your living expenses. Get that saved up fast, and then go big with your retirement contributions.

3. Ability to borrow

If you have a low-cost line of credit, you could use that as a temporary stand-in for emergency cash. Be careful of being over-reliant on this plan, though. Even a 5% interest rate gets pricey if you draw down $10,000 and roll that balance over for a few months.

As with your stable job, you could use your line of credit as justification for a lower emergency fund balance -- but don't use this as a complete replacement for your cash savings.

4. Time until retirement

Are you retiring in five years or 30? If the answer is five or fewer, you don't have much time to benefit from compound returns. Compounding is a beautiful thing for savers. You invest in an asset, it produces dividends, you reinvest those dividends into the asset, and it makes more dividends. That cycle of earning and reinvesting is how wealth is created. The thing is, compounding takes time.

Say you invest $100 monthly at 7% interest. In two years, you'll earn $183 and your total balance will be $2,583. If you stop contributing to that account and let the money stay invested for another 25 years, you'll have almost $15,000 on your hands. So, in two years you can make $183, but in 27 years you can make $12,000. That's a lot of dough considering only $2,400 came out of your pocket.

The point is, you can accumulate a lot when time is on your side. It may seem easier to put off saving for retirement when you're young, but that's exactly the time to prioritize it -- simply because you have so much to gain.

Think about where you are in life

Ideally, we'd all save in our cash accounts and retirement plans from the day we start working. But in real life, money is tight and we have to make choices. If you're not close to retirement, your biggest opportunity to build wealth is in that retirement portfolio. Start saving there now, even if it's only $20 or $50 a month.

On the other hand, if you are close to retirement, focus on your emergency fund. You'll appreciate having a cash safety net once you transition to a fixed income. And remember, once you reach your target cash savings balance, you can increase your contributions to your investment portfolio where you get higher returns. It's kind of like going to the gym first, and then having the glass of wine right after.