If you're tired of seeing your 401(k) balance drop, you're not alone. Even long-term investors are starting to think about throwing in the towel on the markets.

The reason behind the pessimism goes far beyond a bad year. When you back up and take a longer-term look at market history, you can see that stocks have gone essentially nowhere for nearly a decade.

Good times, bad times
This isn't the first time stocks have traded flat for long periods of time. This month's issue of our Rule Your Retirement newsletter, which hits the digital newsstands at 4 p.m. ET today, observes that, at the end of 1964, the Dow was at 874. Seventeen years later, it had risen by less than a single point.

Back in 1981, plenty of today's investors -- myself included -- were paying more attention to gobbling ghosts on Pac-Man than they were to the markets. We've been trained to think of market drops as buying opportunities. In our experience, stocks may fall sharply for a while (think of 1987, 1990, and 1994), but they tend to jump back just as quickly.

What most of us haven't seen before is a long period like the one since 2000. Indices are still well below their 2000 highs, and many stocks haven't come close to recovering their losses from the bear market. So if you're looking for lessons on how to deal with stagnant stock markets, turn back the clock and see what history has to say.

A market of stocks
When market indices don't make any progress, it's easy to think that no one's making any money. Certainly, the popularity of index funds means that plenty of investors are tied to the performance of broad market indices. But the market is made up of individual companies -- companies whose fortunes aren't necessarily tied together. The result is that a flat index can hide the fact that the underlying stocks are seeing big price moves.

Another thing you have to remember is that both the Dow and broader market measures generally don't take dividends into account. As a result, what looks like flat performance often isn't -- especially if you own stocks that pay strong dividends. For instance, take a look at the performance of some dividend-paying Dow components from 1964 to 1981:

Stock

Adjusted Price 12/31/1964

Adjusted Price 12/31/1981

Total Return

Alcoa (NYSE: AA)

0.73

1.61

121%

DuPont (NYSE: DD)

2.55

2.37

(7%)

General Electric (NYSE: GE)

0.26

0.59

127%

General Motors (NYSE: GM)

4.12

4.67

13%

Source: Yahoo! Finance. Prices adjusted for splits and dividends.

Some of those returns don't look too shabby, do they? And other well-known blue chips, including IBM (NYSE: IBM), Kodak (NYSE: EK), and Boeing (NYSE: BA), did even better -- Boeing rose over 350%.

The power of dividends
Granted, not all of those gains came from dividends. But a big part of them did. GM, for example, saw its share price drop by more than half over those 17 years -- yet investors saw a slight overall gain, thanks to dividends.

When you're hoping to find the next multibagger stock, it's easy to neglect the impact dividends play in a stock's return. When the markets are flat, however, they become a retirement investor's best friend.

To learn more about protecting yourself in retirement, read about:

To see more of this month's issue of Rule Your Retirement, sign up for a free trial today. You'll also get access to back issues, useful discussion boards, and much more. Try it out today and make more money for your retirement.

Fool contributor Dan Caplinger has made some pretty good returns since 2000, but he doesn't let it go to his head. He doesn't own shares of the companies discussed in this article. The Fool's disclosure policy doesn't let the market get it flustered.