Life often hands us unexpected challenges.

That’s why it’s so important to have money set aside, in the event we need to pay for unplanned costs and expenses, whether that’s a broken muffler on the highway, a job layoff, or a sudden illness.

But saving to repair your car and saving for a life-changing event can require different savings strategies, with either a rainy-day fund or an emergency fund.

We explain the differences between both types of accounts.

Rainy day fund

Your rainy day fund should contain $500 to $1,000. This will let you pay for things without having to throw smaller expenses on your credit card, or take out a payday loan.

In short, the money in this fund will get you through to your next paycheck.

Say you have a childcare emergency. Or your car stalls out and you need a new battery. Or your dishwasher starts spewing suds on the kitchen floor unexpectedly. You’re going to need a few hundred dollars that you can easily access. You need it, it’s there.

Your rainy day fund is liquid (meaning it’s cash). The best place for it is likely in a bank account, such as a savings account, where you can access the money quickly.

Once it’s spent, you can start saving again for the next time because well, life happens.

Emergency fund

An emergency fund is just that. When life throws you a major curveball, you have money to fall back on.

Your emergency fund should have enough money to cover your expenses for three to six months. You’ll use this money in the event of a more serious setback, such as a layoff or an illness that prevents you from working.

How much should be in this fund? That all depends on you, your fixed expenses, and what you’ll need to keep yourself going in a really tough time.

Is your monthly spending $2,000 or maybe $4,000? Whatever the amount for your monthly expenses is, multiply it by three or by six. That’s how much you should try to put away.

Here’s the thing: It’s important to have a concrete number in mind. If you don’t have a budget, think about making one. Your budget will tell you how much money you spend each month, and how much you can save.

Learn more about how to build a budget here.

So where should you keep your emergency fund?

Since this fund is for longer-term planning, you may want to keep it in a place where it can earn some interest. Why? Your money could sit in this account for years, and the typical bank account pays very low interest, which may wear away at your savings due to inflation.

You can keep it in a money market fund or maybe in a Certificate of Deposit. You may also consider putting the money in an ETF based on short-term U.S. Treasuries.

Important note: Any time you invest in a security such as a stock, bond, or ETF, it involves risk. You can lose money on your investments. The same may not be true for a standard bank account or CD.

Here’s one very important thing to keep in mind: Since you may be keeping your backup fund money in an investment vs. a savings account, it may take you a few days to access it.

How do I get started?

To begin funding your rainy day and emergency funds, start by putting small amounts of money away each month—maybe $25 or $50, more if you can. If you can automate your savings, that’s even better.

Then try increasing that amount over time. It may take a while, but pretty soon you’ll have both your rainy day and emergency funds flush with cash.

Once both accounts are fully funded, you may have the financial freedom to pursue other goals, like saving for retirement, your child’s education, a house, and more.

And more importantly, you’ll know that if things go wrong, you’re covered.