How to use the dollar cost averaging calculator
- Enter the amount you invest at each purchase, and any fee you pay per purchase.
- List the price at each purchase, one per line and oldest first. Use real past prices or a scenario you want to test.
- Optionally enter a current price. If you leave it blank, the last price is used.
- Read your shares, average cost per share, current value and gain or loss, then compare with putting the same total in at the first price.
Formula
Shares at each purchase = (amount - fee) / price
Average cost per share = total invested / total shares
Value now = total shares x current price
Gain = value now - total invested
With no fees and equal amounts, the average cost is the harmonic mean of the prices, which is always at or below the plain average of the prices.
Worked example
You invest $500 each month for six months at prices of $50, $45, $40, $48, $55 and $60. You buy 10, 11.11, 12.5, 10.42, 9.09 and 8.33 shares, which is 61.452 shares for $3,000.
Your average cost is $48.8186 a share, a little below the plain average price of $49.6667. At $60 the shares are worth $3,687.12, a gain of $687.12. Putting all $3,000 in at the first price of $50 would have bought 60 shares worth $3,600, so averaging in did better by $87.12 in this rising scenario.
Why the average cost is lower than the average price
A fixed dollar amount buys more shares when the price is low and fewer when it is high. That weights your purchases toward the cheaper prices, so your average cost per share is lower than the simple average of the prices. The effect is real but it is not a guarantee of profit, because a falling market still loses money.
Dollar cost averaging versus a lump sum
If prices rise steadily, investing everything at the start usually ends ahead. If prices fall first, buying in steps usually does better. The comparison above uses the same money at the first price, so you can test both kinds of price paths. For a single average of uneven purchases, use the stock average calculator.
What to test
Try a rising path, a falling path and a path that dips and recovers. The best plan is the one you can keep up through all of them. Compare outcomes with the stock profit calculator and see how steady growth compounds in the compound interest calculator.
Assumptions and limits
- Fractional shares can be bought, so every dollar is invested.
- The prices are the prices you paid. Spreads, taxes, dividends and the timing of purchases within a month are not modeled.
- The fee is a flat amount per purchase and comes out of the amount invested.
- Past prices do not predict future prices. This is arithmetic, not investment advice.
Frequently asked questions
What is dollar cost averaging?
It is investing the same amount at regular intervals, whatever the price. You buy more shares when prices are low and fewer when they are high.
How do I find my average cost per share?
Divide the total dollars invested by the total shares bought. This tool does that after working out the shares from each price.
Does dollar cost averaging beat investing a lump sum?
Not reliably. In a rising market a lump sum often wins, and in a falling or choppy market spreading purchases can win. The result depends on the price path.
Why not just average the prices?
Because you buy different numbers of shares at each price. The true average cost weights each price by the shares you bought at it.