From BW 9Mar98:
The stock market makes dramatic moves in relatively short periods, and those who miss them effectively miss a lot of the gains. For example, the Standard & Poor's 500-stock index has had an 18.05% average annual return over the past 10 years. But if a market timer had been in Treasury bills during the market's best month, the 10-year average drops by three quarters of a point, says Crandall, Pierce & Co., an investment research firm. Take out the six best months, and the return falls to 12.55%. With small-cap stocks, the moves are more dramatic, and missing the six best months slices the return by 40%.

Downward moves can be swift as well, and one of the allures of timing is the hope of avoiding them. A 10-year investment in the S&P 500 less the six worst months would boost results to a 22.8% average return, according to Crandall Pierce. Even missing the one worst month hikes returns by nearly one percentage point a year.

From Malkiel's Random Walk 7th ed. p163:

During the decade of the 1980s, the S&P 500 index provided a very handsome total return (including dividends and capital changes) of 17.6%. But an investor who happened to be out of the market and missed just the 10 best days of the decade -- out of a total of 2,528 trading days -- was up only 12.8%. Similar statistics are descriptive of the entire period from the early 1960s through the 1990s.
Ibid p.190
An academic study by Profs Richard Woodward and Jess Chua of the University of Calgary shows that holding on to your stocks as long-term investments works better than market timing because your gains from being in stocks during bull markets far outweigh the losses in bear markets. The professors conclude that a market timer would have to make correct decisions 70% of the time to outperform a buy-and-hold investor.

From Larry Swedroe's The Only Guide... p. 68 quotes a Smith Barney study that's summarized by this table. The returns don't include dividends.

Annualized returns for the S&P 500
1980-1993Returns
3,541 trading days15.5%
minus 10 best days11.9%
minus 20 best days9.5%
minus 30 best days7.4%
minus 40 best days5.5%

See also Does Market Timing Really Perform?