DCA vs Lump Sum: 155 Years of S&P 500 Historical Data
By Ethan Mercer
Financial Technology Analyst • 10+ years in fintech and payments
DCA vs lump sum investing: 150 years of S&P 500 data (1871-2026) show that the month you invest a lump sum matters less than you think -- but timing risk is real. Full methodology, dataset, and CSV downloads.
Does dollar cost averaging actually beat investing a lump sum? We ran a systematic backtest against 155 years of S&P 500 monthly data to find out. The short answer: lump sum and DCA produce nearly identical long-run returns, but the timing of your lump sum purchase creates significant variation in outcomes -- and DCA hedges that risk reliably.
This page presents the full data, methodology, and downloadable results so you can verify or extend the analysis yourself.
What We Tested
We used Robert J. Shiller's S&P 500 dataset (Yale University, shillerdata.com), which provides real (inflation-adjusted) total return prices from January 1871 through April 2026 -- 1,864 months of data. Using real total return prices means the results account for both dividends and inflation, giving a true picture of purchasing power.
For every rolling window of 1, 3, 5, 10, 20, and 30 years we simulated investing $12,000 total in two ways:
- DCA: $1,000 per month for 12 months, then hold to end of window.
- Lump sum (12 variants): Invest all $12,000 in a single month. We tested all 12 possible entry months within the first year to capture timing variance -- investing in January vs. February vs. March, and so on.
For each window we computed: the DCA final value, the best-timed lump sum, the worst-timed lump sum, and the average across all 12 timing variants.
Key Findings
| Window | Windows Tested | Lump Sum Timing Win % | DCA Beats Median Lump % | Avg Timing Spread | Avg Annual Return |
|---|---|---|---|---|---|
| 1 year | 1,852 | 47.8% | 76.2% | $2,524 | 4.6% |
| 3 years | 1,828 | 47.8% | 76.0% | $2,971 | 6.4% |
| 5 years | 1,804 | 47.8% | 76.3% | $3,513 | 6.6% |
| 10 years | 1,744 | 47.8% | 76.1% | $5,007 | 6.7% |
| 20 years | 1,624 | 47.9% | 75.6% | $9,837 | 6.5% |
| 30 years | 1,504 | 48.0% | 75.2% | $19,697 | 6.6% |
Lump Sum Timing Win %: Of all 12 possible lump sum entry months tested across all windows, roughly 47.8% produced a higher final value than DCA. This is close to random -- in a rising market, the month you happen to invest matters almost as much as the coin flip.
DCA Beats Median Lump %: In about 76% of all historical windows, DCA outperformed the median lump sum timing outcome. In other words, the typical investor picking a random month to deploy a lump sum did worse than DCA three quarters of the time.
Avg Timing Spread: This is the average dollar difference between the best-timed and worst-timed lump sum entry within each window. Over 10 years, getting unlucky with timing could cost you $5,007 out of a $12,000 investment -- a 42% gap -- purely due to which month you happened to invest.
What This Means for Investors
Lump sum and DCA produce equivalent average returns over long periods -- the annual return numbers are nearly identical because the market's long-run trajectory dominates short-run timing effects. What differs is variance. The investor who invests a lump sum in the wrong month faces a meaningfully worse outcome than the investor who spreads the same amount over 12 months.
DCA's hedging value is most visible in the median comparison: because DCA captures prices across 12 months, it is unlikely to capture the worst possible month, and it is also unlikely to capture the best. For the majority of historical windows, this averaging lands above the typical (median) single-month outcome.
This supports a practical conclusion: if you have a lump sum and don't know which month to invest it, DCA over 12 months is a reasonable hedge with no long-run return cost. If you're investing from regular income (paycheck), DCA is simply how investing works in practice.
10-Year Rolling Window Chart
The chart below shows the 10-year rolling window results from 1871 to 2016. Each point represents a starting month; the shaded band shows the range between the best and worst lump sum timing for that window. The DCA line runs through the middle of the band in the vast majority of cases.
Download the Data
Both files are comma-separated UTF-8 text. Dollar amounts represent final portfolio value starting from $12,000 invested. Annual returns are real (inflation-adjusted).
-
Summary by window length -- one row per holding period
(1, 3, 5, 10, 20, 30 years):
dca_backtest_summary.csv (columns: window_years, total_windows, lump_any_timing_wins_pct, dca_beats_median_pct, avg_timing_spread_usd, avg_lump_annual_return, avg_dca_annual_return) -
Full 10-year rolling series -- one row per starting month
from 1871 to 2016:
dca_backtest_10yr.csv (columns: start_month, end_month, dca_final_usd, lump_best_timing_usd, lump_worst_timing_usd, lump_avg_timing_usd)
Methodology and Algorithm
The full source code for the backtest is available for inspection and reproduction. Below is the complete algorithm description.
Data Source
Shiller S&P 500 monthly data from shillerdata.com. Column used: Real Total Return Price (column 9 of the "Data" worksheet in the downloadable Excel file). This series compounds dividends and adjusts for CPI inflation, so all results represent real purchasing power gains, not nominal returns.
Simulation Setup
Total investment: $12,000. DCA: $1,000/month for 12 consecutive months, each tranche held to the end of the window. Lump sum: $12,000 invested in a single month. Rather than assume any particular entry month, we tested all 12 possible months within the DCA contribution window (month 0 through month 11) and kept all 12 outcomes separately.
For each window starting at month i with holding period H months:
DCA final value = sum over m in [0..11] of:
$1,000 * (price[i + H] / price[i + m])
Lump sum final value (variant k) =
$12,000 * (price[i + H] / price[i + k])
for k in [0..11]
The ratio price[end] / price[buy] gives total return (including reinvested dividends, inflation-adjusted) from purchase to end of window.
Reported Statistics
- lump_any_timing_wins_pct: Fraction of all (window, timing) pairs where lump sum beat DCA. Denominator: windows × 12. Across all window lengths this is consistently ~47.8%, near random.
- dca_beats_median_pct: Fraction of windows where DCA final value ≥ the lower median of the 12 lump sum variants (6th of 12 when sorted ascending). This is ~76% across all window lengths.
- avg_timing_spread_usd: Average of (lump_max − lump_min) across all windows. Measures the dollar cost of bad timing.
- avg_annual_return: Geometric mean of (final / 12000)^(1/years) − 1, averaged across all windows. Nearly identical for DCA and lump sum because the same market returns drive both.
Limitations
- The simulation uses a fixed $12,000 / $1,000-per-month amount. Results scale linearly with investment size.
- Transaction costs, taxes, and bid/ask spreads are not modeled. Modern zero-commission brokers with fractional shares make the DCA cost negligible, but this was not always true historically.
- The Shiller data uses month-end closing prices. Real investors may buy intramonth. This creates minor variance not captured here.
- Results are for the U.S. S&P 500. International markets have different return and volatility profiles; the relative DCA/lump sum relationship may differ.
Source Code
The backtest is implemented in Perl. The script reads the Shiller XLS,
iterates over all rolling windows, computes DCA and lump sum values per the
formulas above, and writes data/dca_backtest_results.json.
A second script reads that JSON and produces the CSV files.
To reproduce: download the Shiller data Excel file to
data/shiller_sp500.xls, then run:
perl bin/run_dca_backtest.pl
perl bin/generate_dca_csvs.pl
The algorithm matches the formulas described above exactly, with no adjustments, smoothing, or cherry-picking of windows.
We are happy to receive corrections. If you find a bug in the methodology or code, the data files on this page will be updated and the change noted here.
DCA vs Lump Sum Historical Backtest: Questions
Does dollar cost averaging beat lump sum investing historically? ▼
Over 155 years of S&P 500 data, DCA and lump sum investing produce nearly identical average annual returns. The real difference is timing variance: a lump sum investor who happens to buy in the worst month of a year can end up thousands of dollars behind DCA. DCA beats the median lump sum outcome in about 76% of historical windows across all holding periods from 1 to 30 years.
How much does the timing of a lump sum investment matter? ▼
Significantly. In the average 10-year holding period since 1871, the difference between investing your $12,000 in the best month versus the worst month of the year was $5,007 -- a 42% gap. Over 30 years, that average spread grows to $19,697. DCA eliminates this timing risk by spreading purchases across all 12 months.
What data was used for this backtest? ▼
Robert J. Shiller's S&P 500 monthly dataset from Yale University (shillerdata.com), covering January 1871 through April 2026 -- 1,864 months. The analysis uses the Real Total Return Price series, which adjusts for both inflation and reinvested dividends, giving a true measure of purchasing power gains.
Why does lump sum timing win about 47.8% of the time? ▼
Because in a rising market, investing earlier is generally better -- but within a single year, month-to-month price moves are essentially unpredictable. The 47.8% figure means that in roughly half of cases, a randomly-timed lump sum beats DCA, and in the other half it loses. DCA hedges this coin flip by capturing prices across all 12 months.
How does this backtest differ from the Vanguard study? ▼
The Vanguard study compared DCA against investing the full lump sum at the very start of the window (day-one lump sum). This backtest tests all 12 possible lump sum entry months to capture the timing variance most real investors face. The day-one lump sum outperforms DCA roughly two-thirds of the time -- consistent with Vanguard -- but the range of possible outcomes from other entry months is what creates the timing risk DCA addresses.
Investment Disclaimer
This article is for educational purposes only and does not constitute investment advice. Stock prices, financial metrics, and market conditions change constantly. Company examples are provided for illustration and should not be considered recommendations. Always verify current data from official sources such as company investor relations pages or SEC filings, assess your own risk tolerance and investment objectives, and consult a qualified financial advisor before making investment decisions. Past performance does not guarantee future results.