Inflation, the steady rise in prices, shrinks what each dollar you hold in cash can buy, even at the modest pace the Federal Reserve aims for. Keep your emergency fund and money you’ll spend within five years in savings, and invest the rest, since stocks have grown faster than prices over long periods.

Source