This depends on your personal situation. A good rule of thumb is to invest money that you are comfortable setting aside for at least 5 - 10 years. Although you can withdraw your investment at any time, it’s generally better to go into the stock market with a long term view.