Dollar-Cost Averaging Calculator screenshot

Dollar-Cost Averaging Calculator

Compute the average cost per share of investing a fixed amount at each price in a series, and compare it with one lump sum at the first price.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No upload
Deterministic
Formula stated

What this page does

Dollar-cost averaging buys a fixed money amount at each price, so it buys more shares when the price is low and fewer when it is high.

How to use it

Enter this sample with the defaults shown:

20 25 18 30 27 33

Press Run. The page gives:

Periods:     6 at 500.00 each
Invested:    3000.00
Shares:      123.1145 (fractional)
Average:     24.37 per share
Final price: 33.00
DCA value:   4062.78
Lump sum:    4950.00 (all at the first price)
Difference:  -887.22 in favour of the lump sum
Basis:       equal money each period, fractional shares, no fees or taxes

The formula and its basis

Shares bought = Σ (amount ÷ price at each period); average cost = total invested ÷ shares bought.

Prices are in the same currency per share, shares are fractional, and no fees or taxes are applied.

What it is not

It is arithmetic on the numbers you enter, not financial advice: no product, rate or course of action is recommended. Nothing is uploaded, stored or logged.

Dollar-cost averaging buys a fixed money amount at each price, so it buys more shares when the price is low and fewer when it is high.

The rule this page applies: Shares bought = Σ (amount ÷ price at each period); average cost = total invested ÷ shares bought.

Basis: Prices are in the same currency per share, shares are fractional, and no fees or taxes are applied.

Worked example: the sample values below, with the defaults, give exactly the output recorded in What to Expect.

How to use the Dollar-Cost Averaging Calculator

Enter share prices, one per period in the box, set the options beside it, then press Run. The answer appears beside the form and re-runs on the same input.

Every number in the answer follows from your inputs and the assumptions stated below; the page does not choose a rate for you.

The worked example uses "20 25 18 30 27 33" with the defaults shown, and its exact output is printed in What to Expect.

The formula, its basis and its refusals

Shares bought = Σ (amount ÷ price at each period); average cost = total invested ÷ shares bought.

Prices are in the same currency per share, shares are fractional, and no fees or taxes are applied. Money prints to two decimals, percentages to four, and intermediate values are never rounded.

It refuses fewer than two prices, a price of zero or less, a non-numeric value, and an amount of zero or less.

What this page is not

It is arithmetic on the numbers you enter, with each assumption stated. It does not recommend a product, a rate or a course of action.

Where the tool is the wrong choice: Predicting which approach will win in future; Prices that are not comparable across periods.

What to Expect

Best for

  • Understanding why a fixed contribution beats timing a single purchase
  • Comparing an averaging plan with a lump sum over the same path

Not ideal for

  • Predicting which approach will win in future
  • Prices that are not comparable across periods

What this tool keeps

  • The numbers exactly as you entered them
  • The same answer on every run
  • Nothing sent, stored or logged

What may need cleanup

  • Rates entered as fractions rather than percentages: enter 5 for 5 %
  • A currency symbol pasted beside a number, which the page refuses by name

Common errors

  • It refuses fewer than two prices, a price of zero or less, a non-numeric value, and an amount of zero or less.
  • A non-numeric value, which the page names rather than silently treating as zero

Example use cases

  • Reviewing a monthly contribution plan
  • Explaining average cost to a new investor

Sample input

20 25 18 30 27 33

Sample output

Periods: 6 at 500.00 each Invested: 3000.00 Shares: 123.1145 (fractional) Average: 24.37 per share Final price: 33.00 DCA value: 4062.78 Lump sum: 4950.00 (all at the first price) Difference: -887.22 in favour of the lump sum Basis: equal money each period, fractional shares, no fees or taxes

Who this is for

  • savers
  • investors

Frequently asked questions

What formula does this page use?

Shares bought = Σ (amount ÷ price at each period); average cost = total invested ÷ shares bought.

What does it refuse?

It refuses fewer than two prices, a price of zero or less, a non-numeric value, and an amount of zero or less.

Is this financial advice?

It is arithmetic on the numbers you enter, with each assumption stated. It does not recommend a product, a rate or a course of action.

What rate basis and rounding does it use?

Prices are in the same currency per share, shares are fractional, and no fees or taxes are applied. Money prints to two decimals, percentages to four, and intermediate values are never rounded.

Does averaging always beat a lump sum?

No. On a rising path the lump sum wins because it buys at the lowest price. The page prints both endings so the comparison is visible rather than assumed.

Why fractional shares?

They keep the arithmetic exact. A real broker may round to whole shares, which changes the average slightly; the page says it does not.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.