The guide
Spreading a lump sum out buys comfort, and the arithmetic says what that comfort costs
Dollar-cost averaging lowers your cost per share below the average price, yet when prices tend to rise a lump sum usually finishes ahead; a backtest shows how often, never what comes next.
- 13.33 a share cost of 100 bought at 10 and 100 at 20; the average price is 15
- 167 of the 400 synthetic paths where 12 monthly buys beat the lump sum
- minus 1.73 percent median result of averaging against the lump sum, same example
- about 43 percent share of paths averaging won at 15 percent volatility
- 50 percent time-weighted return of a doubling followed by a 25 percent loss
Read the full guide Fold the guide
Dollar-cost averaging means putting money into an investment in equal portions at regular intervals, whatever the market is doing. That is close to the wording in the investor glossary of the Securities and Exchange Commission, which adds the reason people like it: the same sum buys more of the investment when the price is low and less when it is high. The term goes back to Benjamin Graham, who used it in his 1949 book The Intelligent Investor.
The habit is so familiar that it is easy to miss that the phrase covers two different situations. One is the paycheck case. Money arrives every month, and you invest it as it arrives, because that is when you have it. The other is the windfall case. You already hold a large sum and must decide whether to invest it today or feed it in over a year. The arithmetic below matters mostly for the second case, and confusing the two is the source of most arguments about the method.
Why equal money pays less than the average price
Take two purchases of 100 each, one at a price of 10 and one at a price of 20. The first buys 10 shares and the second buys 5. You have paid 200 for 15 shares, which is 13.33 a share. The average of the two prices is 15. The gap is not luck. It is built into the method.
The number you paid is the harmonic mean of the prices: the count of prices divided by the sum of their reciprocals. Here that is 2 divided by one tenth plus one twentieth, which is 13.33. The Wikipedia article on dollar-cost averaging writes the return of the method in exactly these terms, as the final price divided by the harmonic mean of the purchase prices, minus one. The article on the harmonic mean supplies the other half of the argument: for positive numbers that are not all equal, the harmonic mean is always the smallest of the three classical means, below the geometric and the arithmetic mean.
So the claim that averaging gives you a good price is true, and it is true in a narrow sense. Your cost per share will never be above the plain average of the prices you paid, and it will be strictly below it whenever the prices differ at all. Fees chip at this, because a fixed charge per purchase is a larger share of a small purchase, and the Wikipedia article works through exactly that trade between brokerage cost and how often to buy.
What the harmonic mean does not tell you is whether you would have done better buying everything on the first day. That is a different comparison, and it has a different answer.
Why the lump sum usually finishes ahead
If prices tend to drift upward, money that waits is money that misses part of the rise. A plan that spreads a windfall over twelve equal monthly buys keeps, averaged over that year, close to half of it in cash. The Wikipedia article reports one fund manager’s historical study in which investing a windfall immediately came out ahead about two thirds of the time, and it gives the plain reason: if future prices are expected to be higher, choosing to buy later is choosing to pay more.
The tool beside this essay lets you watch that drift work without borrowing anyone’s history. Its synthetic scenario draws prices from a geometric random walk, the process in which the logarithm of the price follows a random walk with a steady drift. Wikipedia’s article on geometric Brownian motion gives the solution used for each step: the price is multiplied by the exponential of the drift less half the variance, plus a random shock scaled by the volatility. Every chart and file from that scenario is stamped SYNTHETIC, because it is a toy model and not a market.
Here is the worked example the page opens with, so you can reproduce it. Invest 10,000 either at once or in 12 monthly purchases of about 833.33, over ten years of monthly prices with a drift of 5 percent a year, volatility of 15 percent a year and seed 7. On that first path the lump sum ends at 11,176.22 and averaging ends at 8,693.17. Averaging bought at an average cost of 128.56 a share while the average buy price was 130.53, exactly as the harmonic mean promises, and it still lost, because the price rose steeply during the year in which the money was going in.
One path proves little, so the tool then runs 400 paths from seeds derived from the first. Averaging finished ahead on 167 of the 400 and behind on 233. The median difference was minus 1.73 percent of the amount invested, and the range ran from about minus 80 to plus 48 percent. That spread is the honest result: a lean toward the lump sum, with a large minority of cases going the other way and a few going very far either way.
Letting idle cash earn interest narrows the gap. With a cash rate of 2 percent a year on the money still waiting, the averaging plan came out ahead on 187 paths instead of 167. It does not reverse the lean, because a year of cash interest is small next to a year of the drift.
Volatility is the other lever, and the tool sweeps it. With the same 200 seeds and the same drift, averaging won on none of the paths when volatility was set to zero, since a price that only rises always punishes waiting. At 7.5 percent it won on about 30 percent of paths, at 15 percent on about 43 percent, and at 30 percent on about half. More randomness gives the waiting money more chances to land on a dip, so averaging wins more often, while the drift still tilts the median against it.
When does averaging win? When the price falls, or wanders down, during the months in which the money is going in. Nobody knows in advance whether that will happen, which is the whole case for and against the method. Some advisers recommend it anyway as a way to make starting easier, and the Wikipedia article notes research on how investors weigh the regret of missing a rise against the regret of buying just before a fall. Those are reasons about behaviour, and they can be good ones. They are not arithmetic.
Two ways to measure a return
Comparing the strategies fairly needs care about what a return is. The tool shows two standard measures, and they disagree on purpose.
The money-weighted return is the internal rate of return: the single yearly rate at which the present value of every cash flow sums to zero. Each purchase counts as money going in on its date, and the shares at the end count as money coming out.
That rate usually has no closed form, so it must be found numerically, and the Internal rate of return article notes that the number of possible rates can never exceed the number of sign changes in the flows. The tool brackets the rate on a grid and then halves each bracket, the bisection method, until the interval is narrower than a trillionth of the growth factor. When no rate balances the flows, for instance when nothing came back, it says so rather than inventing one.
The time-weighted return ignores the size and timing of the flows. It cuts the period at each flow and multiplies the growth of each piece. The Wikipedia example is worth keeping in your head: money doubles in year one and loses a quarter in year two, so the time-weighted return is 50 percent, whatever was added or withdrawn between the two years.
In the worked example the two measures tell different stories. The time-weighted return of averaging is the same as that of the lump sum, about 1.12 percent a year, because both owned the same asset from the first purchase to the end. The money-weighted return of averaging is about minus 1.46 percent a year, because more of its money arrived after the price had already climbed. The first measures the investment. The second measures your timing, and timing is exactly what the comparison is about.
The tool also reports the maximum drawdown, the largest fall from a running peak, measured on the whole account including waiting cash. Averaging often shows a smaller drawdown in the first year simply because less money was exposed. In the worked example both plans eventually sat through the same fall of about 44 percent, because by then all the money was invested.
A backtest is not a forecast
Backtesting, as the Wikipedia article puts it, estimates how a strategy would have done had it been used in a past period. The same article lists the limits: it needs detailed history, it cannot model how the strategy itself would have moved prices, and it invites overfitting, finding a rule that worked in the past and will not work again.
Bring your own price history and the tool runs the comparison for every possible start date in the file, with the same window length, and draws the distribution. Treat those windows with care. Neighbouring windows share almost all of their months, so a thousand windows are far fewer independent experiments than they look. A history that starts in a long boom will flatter the lump sum, and one that starts at a peak will flatter averaging.
What you import matters too. A series made only of companies or funds that still exist carries survivorship bias, the error of studying the survivors and forgetting the failures. Prices that are not adjusted for dividends and splits will mislead in a quieter way: after a two-for-one split each share is worth half as much, so an unadjusted series shows a crash that never happened. Adjusted prices are the safer input.
The file reader follows RFC 4180, the common format for comma-separated files, and it accepts three date formats, decimal commas and files listed newest first. It reports every row it skipped or merged instead of guessing silently. When it writes the ledger back out, any text cell that starts with an equals sign, plus, minus or at sign gets a quote in front, the guard OWASP describes against spreadsheet formula injection.
So the method has a clear shape. Equal purchases pay the harmonic mean, which is always below the average price. With prices that drift upward, investing all at once tends to finish ahead, by a margin that shrinks as volatility grows and as waiting cash earns more. No backtest, synthetic or historical, can tell you which side of that distribution your next year will land on.
Sources
Every source consulted for this guide. Links checked October 21, 2026.
- Dollar Cost Averaging Investor.gov, U.S. Securities and Exchange Commission
- Dollar-cost averaging Wikipedia
- Harmonic mean Wikipedia
- Internal rate of return Wikipedia
- Rate of return Wikipedia
- Time-weighted return Wikipedia
- Drawdown (economics) Wikipedia
- Geometric Brownian motion Wikipedia
- Bisection method Wikipedia
- Xorshift Wikipedia
- Backtesting Wikipedia
- Survivorship bias Wikipedia
- Stock split Wikipedia
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files RFC Editor, Internet Engineering Task Force
- CSV Injection OWASP Foundation