Fill in the empty fields to see the result.
Units = Σ amount / price; average cost = total invested / units. The comparison holds only for this price list: on a rising path a lump sum ends higher, on a falling one regular buys do.
What the DCA calculator does
Dollar-cost averaging (DCA) means investing the same amount of money at regular intervals, such as every month, whatever the price is. When the price is low, the fixed amount buys more units. When the price is high, it buys fewer.
The tool takes three things:
- Contribution per period: the fixed amount you put in each time.
- Price list: the price at each purchase date. You can type your own prices or let the tool model a path.
- Final price: the price used to value the holding at the end. By default this is the last price on the list.
For each period it shows the units bought, the running total invested, the running total of units and the value at that period's price. Above the table it gives a summary for DCA and for a lump sum on the same path.
The inputs start with neutral sample values. Change them to match the asset and the period you want to study. The results update next to the inputs.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
How the lump sum comparison works
The lump sum line assumes the whole total that DCA invests over the period is put in at once, at the price at the start of the list. Both approaches use the same prices, so the difference you see comes only from the timing of the purchases.
- On a price path that mostly rises, the lump sum usually ends with more units, because it buys everything before the rise.
- On a path that falls and then recovers, DCA often ends with a lower average cost, because some purchases happen at lower prices.
- On a path that keeps falling, both lose value. DCA spreads the entry, but it does not prevent a loss.
The calculator describes a past or hypothetical path. It does not predict future prices, and it does not show which approach you should choose.
Formula
For each period i with price Pᵢ and fixed contribution C:
| Quantity | Formula |
|---|---|
| Units bought in period i | C ÷ Pᵢ |
| Total invested | C × number of periods |
| Total units | sum of all units bought |
| DCA average cost per unit | total invested ÷ total units |
| Value at the end | total units × final price |
| Gain or loss | value at the end − total invested |
| Lump sum units | total invested ÷ starting price |
| Lump sum value | lump sum units × final price |
The DCA average cost is the harmonic mean of the purchase prices. It is always equal to or lower than the simple average of those prices, because more units are bought at lower prices. This does not mean DCA ends in profit. The result still depends on the final price.
What the result leaves out
- Costs: brokerage, commissions, spreads, taxes and transfer fees reduce the units you actually receive. Each fee is charged on every purchase, so small regular purchases can carry a higher cost share.
- Inflation: a nominal gain can still be a loss in real terms. Check it with the inflation calculator or the real return calculator.
- Income and reinvestment: dividends or profit payouts are not added. For growth with reinvestment, see the compound interest calculator.
- Leverage: the tool assumes you pay the full price for each unit. It does not model margin or CFD positions. Leveraged trading can lose money fast, and averaging into a losing leveraged position can make losses larger. Read risk management before you use averaging with margin.
If you already hold a position bought at different prices and sizes, the average price calculator gives the weighted entry price. For listed shares in Pakistan, PSX basics explains how buying through a licensed broker works.
More tools are on the calculators page.
Frequently asked questions
What is a dollar-cost averaging calculator?
It is a tool that applies a fixed regular contribution to a list of prices. It shows the units you would have bought, your average cost per unit and the value of the holding at the end.
Is DCA investing better than a lump sum?
Neither approach wins on every price path. Enter different paths in the calculator to see when each one ends higher. The tool shows outcomes and does not recommend a method.
Why is my DCA average cost lower than the average price?
A fixed amount buys more units when the price is low. This weights your cost towards the lower prices, so the average cost per unit falls below the simple average of the prices.
Can I use my own prices?
Yes. Type the price for each period into the price list. You can also let the tool model a path and then edit individual prices.
Does the calculator include fees or taxes?
No. Reduce the contribution by your expected costs if you want a rough estimate, and check the actual charges with your broker or bank.
Does DCA protect me from losses?
No. If the price at the end is below your average cost, the holding shows a loss. DCA changes the average entry price. It does not remove market risk.
