The mechanics of the calculation
DCA does not forecast price. It buys a fixed amount every period, so the same money buys more coins when the price is low and fewer when it is high — which spreads the average cost across periods.
Computationally you roll through each period: convert the fixed amount into coins at that period price and add them up, then multiply the total by the final price.
Formulas
amount per period × number of periodsΣ(amount per period ÷ price at that period)total invested ÷ coins heldcoins held × final price(final value − total invested) ÷ total invested × 100%Worked example (recompute it yourself)
Invest 100 USDT weekly for 52 weeks, with the price rising linearly from 30,000 to 60,000:
Total invested = 100 × 52 = 5,200 USDT. Accumulated coins ≈ 0.120339. Average cost = 5,200 ÷ 0.120339 ≈ 43,211 USDT.
Final value = 0.120339 × 60,000 ≈ 7,220 USDT, a return of about +38.85%.
Note the average cost of 43,211 sits below the arithmetic mean price (~45,000): buying more coins at lower prices pulls the weighted cost down.
Note: this page uses a linear price model
The example assumes the price moves evenly between the start and end values. It demonstrates the bookkeeping of DCA and is not a return forecast.
To see how DCA actually played out over a real period, use the DCA backtest, which uses real daily closes and also reports maximum drawdown.
FAQ
Why is my average cost below the average price?
Because the amount invested is fixed: cheaper periods buy more units, so the amount-weighted cost tilts toward the lower prices.
Does DCA guarantee a profit?
No. If the asset falls over the long run, DCA loses money too. It smooths the cost curve; it does not remove downside risk.
How does the linear model differ from a backtest?
The linear model interpolates evenly between two prices to explain the mechanics. A backtest uses actual daily closes, so the real path of highs and lows changes the buy points.