Your car conks out. You lose your job. The roof of your home springs a leak. You need a root canal.

Any of those calamities — and many more like them — can bust even the best-planned budget. That’s why financial planners often urge their clients to build up an emergency fund, just in case.

How much you’ll need depends on a number of factors, including what other sources of cash or credit you have. If you have a working spouse, for example, you might need less of a cushion than if you’re single. If you have a home equity line of credit, it could also provide some cash in a crisis.

You probably don’t want to rely on your credit cards, though. Unless you’re able to pay them off quickly and avoid interest charges, you could end up in a worse financial situation than before.

The most common advice is to set aside enough money to cover to three to six months’ worth of living expenses in a “liquid” account (one that allows you to get your money out immediately). For a lot of us, though, that’s easier advised than accomplished.

Michael J. Garry, a certified financial planner with Yardley Wealth Management in Newtown, Pennsylvania, suggests an initial goal of saving a month’s worth of expenses. After that, he says, try to add a second month’s worth, and then another, until you eventually get up to six. Here are some ways to make that happen.

1. Start small if you have to, but start. “The best way to build up an emergency fund is to treat it like a bill,” Garry says. “Figure out a timeframe in which you can reasonably get to your goal and set aside the appropriate weekly or monthly amount.”

2. Keep it in a separate account. That way you’ll be less likely to dip into your fund for non-emergencies. Plus you’ll always know how close you are to reaching your savings goal. What type of account should you choose? To begin with, Garry suggests a money market account at your bank, linked to your regular checking account. Once you have a couple of months’ worth of cash tucked away, he adds, consider switching to a money market account at a major online bank, where you’ll earn a higher interest rate. For added safety, be sure the account is FDIC-insured.

3. Make it automatic. Consider having a fixed amount transferred automatically from your checking account to your rainy day fund each month. Or ask your employer if it’s possible to do a “split deposit” with your paycheck. An amount you designate will go into your emergency fund, and the rest will be deposited into your checking account. The less you have to think about going to the bank and making deposits, the more likely you are to stay on track.

4. Add “found money” when you have it. In addition to your automatic contributions, consider putting any unexpected cash into your emergency fund until you’ve reached your goal. That might include a year-end bonus at work, a tax refund or a birthday check from a generous relative.

5. Round up your spare change. Once you’ve accumulated a jar full of coins, take them to the bank and deposit them in your emergency fund.

6. Replenish it. If you’re lucky, you may never face a financial emergency and need to tap your fund. But if you do, try to resume your contributions as soon as the crisis has passed. You never know when there might be another one.

Greg Daugherty is a longtime personal-finance writer and a former senior editor of Money magazine.