How the historical backtest works
Choose “Backtest a real stock or ETF”, enter a ticker, an amount, how often you invest and a start date from October 1, 2020 onward. Each scheduled purchase buys at that day's closing price, or the next trading day's when markets were closed, and the schedule runs through the latest close. Closes are adjusted for splits but not for dividends, so each dividend is counted once: reinvested at the close on its ex-dividend date, or kept as cash. A stock or fund that began trading after your start date begins buying on its first trading day.
The lump-sum comparison takes the entire amount the schedule eventually invests and puts all of it in on the first purchase date, with dividends handled the same way. Both use the same total money and the same dates. It assumes you had the whole sum on day one; if your cash arrives with each paycheck, investing it as it becomes available is a different choice from the one this comparison measures.
Example: $500 a month into SPY, starting Monday, January 4, 2021, with dividends reinvested. Purchases fall on the 4th of each month, or the next trading day, through the latest close, so the result updates each trading day and shows the exact dates and number of purchases used. Open this scenario.
How the calculation works
In the backtest, each scheduled contribution buys shares at the close on its date, or the next trading day when markets were closed, so the number of shares bought rises when the price falls. Closes are split-adjusted but not dividend-adjusted, so each dividend is counted once: reinvested at its ex-dividend date close or kept as cash. The lump-sum comparison invests the entire total the schedule eventually contributes on the first purchase date. In the projection, each contribution is invested at the start of its period and compounds at the per-period equivalent of your annual return.
Formula
Shares bought = amount / closing price that day
Average cost = total invested / shares bought
Value = shares held x latest close
Worked example
Investing $500 a month for 20 years puts in $120,000. At a steady 7% a year, the balance reaches about $86,000 after 10 years and $255,200 after 20.
That makes $135,200 of the ending value growth and 47% money contributed. Most of the growth arrives in the later years, once the balance is large.