How do you calculate your dollar cost average?
Add up the dollars you spent, then divide by the shares you got. It isn't the average of the prices. Your $2,500 in the example buys 30.5 shares, so the average cost is $81.97.
Average cost per share = total dollars spent ÷ total shares bought| Buy | Price | Shares bought | Total shares | Average cost so far |
|---|---|---|---|---|
| 1 | $100.00 | 5.00 | 5.00 | $100.00 |
| 2 | $80.00 | 6.25 | 11.25 | $88.89 |
| 3 | $62.50 | 8.00 | 19.25 | $77.92 |
| 4 | $80.00 | 6.25 | 25.50 | $78.43 |
| 5 | $100.00 | 5.00 | 30.50 | $81.97 |
The math is the same for a stock, a fund, or crypto, so any of those fit in the list above. In Excel, divide the sum of your dollars by the sum of dollars ÷ price for each row. With equal buys, the average cost always falls below the plain average price if prices changed, because the same dollars buy more shares at lower prices. That gap comes from arithmetic. It says nothing about whether you timed anything well.
Your average cost is also your break-even price before tax and fees. At $81.97, the price has to get back above that level for the whole position to show a gain, even though your first buy was at $100.00. Enter a current price above to see where you stand.
Is it better to invest all at once or dollar cost average?
Neither wins every time. If you have $60,000 to invest, the winner depends on where prices go next, which nobody knows in advance. Here are $60,000 and four price paths, each spread over 12 monthly buys and compared after 24 months. Lump sum wins 2 of these four, but the four are illustrations we picked, not a measure of how often either wins.
| Price path | Lump sum | Spreading | Ahead | By |
|---|---|---|---|---|
| Rises 20% | $72,000 | $69,077 | Lump sum | $2,923 |
| Falls 20% | $48,000 | $50,544 | Spreading | $2,544 |
| Dips 20%, then recovers | $60,000 | $66,598 | Spreading | $6,598 |
| Jumps 20%, then fades | $60,000 | $55,266 | Lump sum | $4,734 |
FINRA, the brokerage industry regulator, describes the tradeoff this way: spreading out has lower risk but often produces lower returns than lump sum investing, especially over longer periods, because part of your money stays in cash. It can also limit your losses in a sharp decline, since the money you haven't invested yet isn't affected by the drop.
This tool also shows the low point along the way. In the falling example, lump sum bottoms at $48,000 and spreading at $50,544. If a smaller paper loss would keep you from selling in a panic, that has real value, even when spreading ends behind on a rising path.
What decides whether dollar cost averaging wins?
When waiting cash earns nothing, the winner is whichever approach bought more shares. That comes from one comparison: your first price against the average cost of your later buys. The final price only scales the gap. On a path rising from $100.00 to $120.00, spreading pays $104.43 a share and lump sum $100.00, so lump sum finishes $3,052 ahead. Crash the final month to $70.00 and both lose, but lump sum still finishes $1,780 ahead, since it still holds more shares.
Bigger swings make the gap larger. These paths fall partway and then return to where they began, so a lump sum simply ends flat.
| Size of dip | Lump sum | Spreading | Spreading cost per share |
|---|---|---|---|
| 10% | $60,000 | $62,997 | $95.24 |
| 30% | $60,000 | $71,028 | $84.47 |
| 50% | $60,000 | $84,086 | $71.36 |
This is why a backtest of one index or one coin can't settle the question. It tells you about one path. Your own path hasn't happened yet.
What about interest on the cash, and trading fees?
Money waiting to be invested can earn interest. On a path rising from $100.00 to $110.00, spreading $60,000 over 12 months earns $1,174 at an example 4% rate. That moves spreading's final value from $64,547 to $65,721, against $66,000 for a lump sum. Interest is taxable, which this tool doesn't count. Keep waiting cash somewhere you can reach it, and the savings calculator can size what it earns.
Fees work the other way. Each buy pays any commission. With $1,200 split over 12 buys and a $5 fee, spreading loses $60 to fees against $5 for one buy. If your broker charges no commission, leave this at zero.
When dollar cost averaging is not really a choice
If you invest a set amount from each paycheck, as in a 401(k), you are dollar cost averaging already, and you aren't holding back a lump sum. You're investing money as you earn it, so the comparison above doesn't apply. The case against waiting only applies when you have the cash today.
To see how regular buying can grow over decades, use the investment calculator. For income from a holding that reinvests along the way, try the dividend calculator.
One trap at tax time: your average cost here is useful for tracking, but your cost basis may be tracked lot by lot. IRS Publication 550 explains the average basis method for fund shares and how to choose it. When you sell, your gain depends on the basis method used, so check with your broker or a tax professional before a large sale. The capital gains tax calculator estimates the tax.
Common questions
What does dollar cost averaging mean?
It means investing a set amount at regular intervals, whatever the price is. You buy more shares when prices are low and fewer when they are high.
Does dollar cost averaging prevent losses?
No. If prices fall and stay down, spreading out still loses money, as the falling path in the table shows. It lowers how much of your money is exposed early on, nothing more.
How long should I spread out a lump sum?
No period is right for everyone. A longer spread leaves more money out of the market for longer, which can feel safer and can cost more if prices rise. Try different numbers of buys above, on a rising and a falling path, and see which regret you could live with.
Does this work for bitcoin and other crypto?
The arithmetic works for anything with a price. Enter your buys and prices in the average cost mode. Fees matter more when they are charged on each small purchase, so include them. Crypto prices can drop sharply, and this tool makes no prediction about them.
Should I count reinvested dividends as purchases?
Yes, if you are tracking cost. Each reinvested dividend is a purchase at that day's price, so add it as a row. Dividends are generally still taxable when reinvested, under IRS rules.
Sources
- The Benefits and Limitations of Dollar-Cost Averaging · FINRA
- Publication 550: Investment Income and Expenses · Internal Revenue Service