Amongst all the edicts investors should heed, one stands out above all others: It’s time in the market that builds returns, not market timing.

We’ve illustrated this rule with one of the longest-running index data sets available: the daily returns of the S&P 500 from Jan. 2, 1928, through 2014. You can explore the difference that a few years makes by changing the slider or pressing the play button. The interactive presents the distribution of returns an investor would have received for an investment of $100 for a given holding period in the S&P 500. #### Returns by Various Investment Periods in the S&P 500 #### Historical probability of a loss and median return by period length ### How to Read the Interactive x-axis: This represents the final value of a$100 investment over a given period in the S&P 500. To change the investment period, use the slider in upper left corner.

y-axis: This percentage shows the historical proportion of outcomes. For example, 99.3% of investment periods lasting one day resulted in a final investment value between $95 and$105.

Example: From 1928 to 2014 there were 21,502 possible holding periods that lasted 12 months (e.g., Jan. 2, 1928, to Jan. 2, 1929; Jan. 3, 1928, to Jan. 3, 1929, etc.). Of those 21,502 holding periods, 74% resulted in positive returns with a median return of $13 on a$100 investment. On the other end of the slider, there were 18,730 possible holding periods that lasted 12 years. The returns for these holding periods were more widely dispersed and overwhelmingly positive, with a median return of $240 on a$100 investment.

### Risk in the Short Term

The graph below focuses on the relationship between probability of loss and holding period. After one year, the proportion of losses drops substantially. This is one key part of the time-in-the-market advice.  If investing in the S&P 500, the risk of loss is much higher for the short-term investor than the long-term investor.

### Return in the Long Term

Conversely, let’s look at the median total cumulative return for every given holding period. It’s a stable and steady line, rising over time.

#### Holding Period and Cumulative Return in the S&P 500

In combination, we can see clearly the imperative to keep the focus on time. The broader market is, and will almost always be, riskier for the short-term investor than the long-term investor. We previously wrote about the benefit of time in the market and maintaining a long term focus during downturns. We hope this analysis bolsters those points.

Lastly, given the importance of time in the market, Betterment tailors your stock allocation to match your personal investment timeframe. Learn more about how our goals work with your timeframe.

This blog post was produced with Joe Jansen.

NOTE: This information is based on the historical analysis of the S&P 500, not a Betterment account. Historical S&P 500 data is available at Yahoo Finance and from Robert Shiller. The above charts do not factor in trading or transaction costs. ​Investing in securities involves risks, and there is always the potential of losing money when you invest in securities. Before investing, consider your investment objectives and Betterment’s charges and expenses. Past performance does not guarantee future results, and the likelihood of investment outcomes are hypothetical in nature.