DCA Calculator
Compare dollar-cost averaging (investing a fixed amount regularly) against a lump-sum investment.
Enter your values to calculate your result.
About this calculator
The DCA Calculator compares dollar-cost averaging — investing the same amount every month — with putting everything in at once on day one, under a simple price path you choose.
It helps anyone deciding how to deploy a sum: gradually or all at once. It shows when spreading purchases reduces your average cost, and when it simply means missing a rise.
Real prices zig-zag. Here the price moves in a straight line between your two prices, so treat the output as an illustration of the mechanism rather than a forecast.
What each field means
- Total Investment Amount
The total amount you will invest, split into equal monthly purchases.
It sets the monthly amount (total ÷ months) and the size of the lump-sum comparison.
0 or more.
- Number of Months
How many months the purchases are spread over (rounded to a whole number).
More months means smaller purchases and more of them; with 1 month DCA and lump sum are identical.
1 to 120 months.
- Starting Share Price
The share price at the first purchase.
It is the price of the first monthly purchase and of the whole lump sum.
More than 0.
- Ending Share Price
The share price at the last purchase, and the price used to value everything at the end.
Together with the starting price it defines the straight-line path the monthly prices follow.
More than 0.
How it is calculated
- Divide the total investment by the number of months to get the monthly amount.
- Set each month's price on a straight line from the starting price (month 1) to the ending price (last month).
- Each month buy shares = monthly amount ÷ that month's price, and add them up.
- DCA value = total shares × ending price; average cost = total invested ÷ total shares.
- For the lump sum, buy everything at the starting price and value it at the ending price; the difference is DCA minus lump sum.
Shares = Σ (Monthly Amount ÷ Price_k); DCA Value = Shares × Ending Price; Average Cost = Total Invested ÷ Shares
Each month the same amount buys shares at that month's price, so you get more shares when the price is low and fewer when it is high. Your average cost is the total invested divided by all the shares bought; the price is assumed to move in a straight line from the starting to the ending price.
Symbols used
- Shares
- total shares bought across all months
- Price_k
- share price in month k
- Average Cost
- total invested divided by total shares
- DCA Value
- total shares × ending price
Assumptions
- The price moves in a straight line between the two prices; real markets zig-zag.
- The same amount is invested every month, on one date per month.
- Fractional shares are allowed, and no fees, taxes or dividends are included.
- The lump sum is invested at the starting price, the same price as the first DCA purchase.
Example
Investing 12,000 over 12 months while the price rises steadily from 100 to 120 buys about 109.45 shares and ends with a DCA value of about 13,133.78 (in whichever currency you use). A lump sum of 12,000 at 100 would be worth 14,400.
Step by step
- Inputs: total 12,000; 12 months; price from 100 to 120.
- Monthly amount = 12,000 ÷ 12 = 1,000; month 1 buys 10 shares at 100, month 12 buys about 8.33 at 120.
- Adding all twelve purchases gives about 109.4482 shares.
- DCA value = 109.4482 × 120 ≈ 13,133.78; average cost = 12,000 ÷ 109.4482 ≈ 109.64.
- Lump sum = 12,000 ÷ 100 = 120 shares × 120 = 14,400; difference = 13,133.78 − 14,400 = −1,266.22.
Reading your result
- DCA Ending Value
- What the gradual purchases are worth at the ending price.
- Lump Sum Ending Value
- What the same total would be worth if bought all at the starting price.
- DCA Average Cost per Share
- What you paid per share on average. Compare it with the ending price to see whether you are ahead or behind.
- DCA vs. Lump Sum Difference
- DCA value minus lump-sum value. Negative means the lump sum finished ahead; positive means DCA did.
What you can conclude
- Why DCA lags a lump sum when the price rises steadily and beats it when the price falls.
- How buying over several months lowers or raises your average cost relative to the starting price.
- How big the gap is for the two prices you entered.
What you cannot conclude
- Which approach will win in real markets: the actual price path decides, and nobody knows it in advance.
- That DCA is better or worse in general; it mainly reduces the risk of investing everything at a bad moment.
- Anything about risk beyond this one price path.
Limitations
- A straight-line price is a simplification; real prices rise and fall within the period.
- Fees, taxes, dividends and the interest on cash waiting to be invested are not included.
- It is an illustration, not investment advice.
Frequently Asked Questions
Why would DCA ever be worse than a lump sum?
If the price keeps rising, every later purchase costs more than the first, so money invested early would have bought more shares. DCA trades that possible upside for protection against investing everything just before a fall.
Is the straight-line price path realistic?
No, it is a simplification so the effect of spreading purchases is easy to see. Real prices zig-zag, and a different path would give a different result.
What happens with only one month?
With 1 month there is a single purchase at the starting price, so DCA and the lump sum are the same.
Does the calculator include fees or the interest on uninvested cash?
No. It models only the share purchases, so real results would be slightly lower after fees and could be affected by what the waiting cash earns.

