The best way to do this is by having an emergency fund. Most financial experts like Dave Ramsey recommend you have at least 3-6 months of expenses in an emergency fund.