The idea that we should all have at least three months' wages saved in an emergency fund has almost become established wisdom in recent years. Of course we would all ideally like to have as much saved up as possible, for a 'just in case' scenario, and building up a nest egg for this reason is certainly worthwhile.

However, there are circumstances when hoarding money for the sake of hoarding is not necessarily the savviest thing you can do with your cash. We look at when emergency funds are the way to go - and when they should be sacrificed for the greater good of your wallet.

What is an emergency fund?

For those who can afford to put a little aside every month into a high-interest savings account, building up a 'rainy day fund' can be a very worthwhile exercise.

By their very nature emergency funds are typically left untouched, only to be dipped into in unforeseen circumstances that would otherwise land you in financial difficulty, such as losing your job, needing to make an expensive payment, or any other emergency cash requirement.

It's up to you how much you save in your emergency fund; some recommend 3 months' of your usual wages, or you may want to work out how much you would need for essential living expenses per month and save up several months' worth of that amount. What constitutes the right amount in your emergency fund is largely dependent on your individual circumstances.

When should I save for an emergency fund?

An emergency fund is a valuable asset to have, but in many situations it shouldn't be top of your financial priorities if it is likely to be over-shadowing more important things such as unpaid borrowings.

The best time to save up an emergency fund is when you have no debts to clear and are comfortably within a credit balance on your current account. In such a situation putting a little aside each month will be the best thing to do with your money.

However, if you have any outstanding credit card balances, loans, or other debts that are accruing interest, you may be better off plugging as much of your spare money as possible into clearing these before you begin to save.

Why clear debts instead of saving?

Money in a savings account is likely to be earning less interest than that which is accruing on your outstanding debt. For example you might have an outstanding credit card balance of 1,000 with an APR of 15.7%, while the money you are dutifully adding to your savings is attracting an interest rate of 3%, which is pittance in comparison to what you are paying on your borrowing. This will be even less if your account isn't an ISA and so tax is being shaved off that percentage too.

In a situation where you have debts it can make sense to pay them off first, either with any spare money you can scrape together each month or with savings you've already built up. After this point you can start growing your emergency fund without needing to pay interest to any bank or lender.

A similar situation might be that you have been diligently putting aside 100 a month into your savings for a while and are aiming to build this pot up to 10,000. However, at the same time you are considering borrowing money for an essential payment you need to make - whether that's on a credit card or by taking out a personal loan.

In this case it may make more sense to dip into what you have already saved to cover those essential outgoings rather than borrow money expensively from a bank or other lender. Look at it as borrowing money from yourself instead, for free - then resolve to pay the money back into your savings when you are in a better financial position to do so.

There's no point in holding onto the belief that you should build up savings, no matter what, when you have more pressing financial matters at hand. Pay off debts and manoeuvre yourself into a steady and stable financial position first - then feel free to save as much money for a rainy day as you can.

Other ways to deal with an unexpected expense

You should remember that the nature of emergencies means they're usually unplanned and unforeseeable. Now might not be the best time to concentrate your efforts on squirreling away money in savings, but if you don't save you'll have to think about how you would be able to meet payments in an emergency situation.

For example, if you lost your job tomorrow and had no savings to fall back on, you may have to be prepared to rely on a low-rate credit card, a personal loan or a low interest overdraft to tide you over.

It may be worthwhile thinking about putting an income protection plan in place - this can help with essential expenses if you lose your income. In a situation where you have no savings, it still pays to be prepared for the worst - until you are in a healthy enough position to begin building your savings again.