Finance and Budgeting

Dollar Cost Averaging Calculator

Enter what you invest each time and the price at each purchase to see your average cost and result.

Your numbers

Taken out of each purchase. Leave 0 for none.

One price per line, in order, oldest first. Commas and spaces also work. Up to 500 prices.

Leave blank to value your shares at the last price above.

Result

Average cost per share

$48.8186

6 purchases of $500.00, valued at $60.00

Total invested
$3,000.00
Shares bought
61.452
Average of the purchase prices
$49.6667
Value now
$3,687.12
Gain or loss
$687.12 (22.9%)
Same money invested at the first price
$3,600.00 (60 shares)
Difference versus lump sum
$87.12

Purchases

#PriceSharesTotal shares
1$50.001010
2$45.0011.111121.1111
3$40.0012.533.6111
4$48.0010.416744.0278
5$55.009.090953.1187
6$60.008.333361.452
How this was calculated
  1. Shares bought each time = (amount - fee) / price. Total shares = 61.45202.
  2. Average cost per share = total invested / total shares = $3,000.00 / 61.45202 = $48.8186. Because you buy more shares when the price is low, this is at or below the plain average of the prices (the harmonic mean, when there are no fees).
  3. Value now = shares x $60.00. The lump sum comparison puts the same total in at the first price, without fees on later purchases beyond one fee.
  • Past prices do not predict future prices. Dividends, taxes, trading spreads and the date of each purchase are not modeled, and this is arithmetic only, not investment advice.

Calculated using SumPanda.com · https://sumpanda.com/dollar-cost-averaging-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the dollar cost averaging calculator

  1. Enter the amount you invest at each purchase, and any fee you pay per purchase.
  2. List the price at each purchase, one per line and oldest first. Use real past prices or a scenario you want to test.
  3. Optionally enter a current price. If you leave it blank, the last price is used.
  4. 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.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

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.