That is up to you, the level of risk you are willing to tolerate, and how old/close to retirement you are. Bear in mind, the stock market can fluctuate WILDLY. Yes, the anual interest rates average about 9%, but some years you will lose money. For example, the dow and s&p are only now returning to their 2000 levels, some 6-7 years later.
A good rule to always follow is to have at LEAST 3 and preferably 6 months worth of ALL living expenses on hand (in a bank) at all times.
Before you invest in the stock market, thorough research is required. Beware of brokers, as they gain their living off of commission, meaning they may offer advice that isn't completely in your best interest. I have been investing in the market for about 6 months now, do it online through one of the online brokerages, and have been VERY pleased.
Only you can answer the question you posed for yourself, but if you decide to invest, research, research, research, or you stand a very good chance of losing, rather than making money.