A wet basement, a faulty transmission, a root-canal procedure. Nearly half of Canadians don’t have enough cash on hand for such unexpected expenses, according to CIBC poll.

Another poll released by the Canadian Payroll Association showed one in four surveyed said they wouldn't be able to afford $2,000 for an emergency like a car accident or surgery.

For those who would be unable to cover an unexpected expense, it may mean having to borrow from family and friends, taking on unwanted debt, or dipping into savings to cover the sudden costs.

So how can you protect your finances from life’s curveballs?

Step one: Understand what emergency funds are for

The first thing to know about emergency funds: The money should be for emergencies only. It sounds obvious, but it isn’t, says Noel D’Souza, a Toronto-based financial planner with Money Coaches Canada.

For example, waking up to a frosty home just after the warranty on the furnace expired is an emergency. Replacing an aging furnace isn’t. A rainy-day fund should be for costs that you can’t predict. On the other hand, money for household expenses you can foresee years in advance is best kept in a separate account labelled “house maintenance,” says D’Souza.

Among the true emergencies, the biggest one you’ll likely ever experience is a job loss. Most people facing a spell of unemployment will need up to six months to find a new, comparable source of income, meaning that they should have savings equivalent to half a year of their after-tax earnings, says Louise Shum, a CIBC financial adviser in Vancouver.

Still, some people may need more, says D’Souza. For a high-level executive, for example, the job search might stretch into one or two years. Single earners should plan a bigger emergency fund than two-income households. And couples might need to beef up their rainy-day savings if one partner’s income isn’t enough to cover routine expenses.

Step two: Take a good look at your insurance coverage

Rainy-day funds are also meant to supplement your insurance coverage. “Insurance doesn’t kick in right away. Depending on the policy, it can take three to six months for the claim to be filed and processed, and the funds to be released,” says CIBC’s Shum. “It’s also important to understand, if your insurance benefit is or isn’t taxable – it depends on the policy,” she adds.

So sit down and read the fine print on your property, supplemental health and disability insurance.

Step three: Set up one or more emergency funds

For smaller emergencies such as unexpected repairs, D’Souza suggests setting aside $10,000 in a high-interest savings account.

A line of credit is also a good option for these kinds of smaller, unforeseen costs, says Shum. Sure, you’ll have to pay interest on it, but your borrowing costs are likely to be much smaller than the returns you’d lose out on by withdrawing from your longer-term investments.

However, lines of credit shouldn’t be your go-to for emergencies that will put a real strain on your finances, such as a long-term illness or a job loss. “There’s nothing like having actual cash for emergencies. It’s your money and it won’t cost you interest,” says D’Souza.

A TFSA is the ideal place to grow that larger rainy-day fund, if you have enough contribution room, says Shum. And that money doesn’t necessarily have to sit there in cash. Good options include low-risk, liquid investments, such as a savings account or cashable Guaranteed Investment Certificates (GICs), says D’Souza.

Whatever you do, avoid cashing out your other investments in case of emergency. In the best-case scenario, this will be a setback for your savings goals. The real risk, though, is that you’ll be forced to divest at the worst possible time. “Remember, stock markets tend to crash during crises, when most people risk losing their jobs,” warns D’Souza.

That’s right: By providing cash at hand when you need it most, an emergency fund protects both your family and your long-term investments.