Dollar-cost averaging involves deploying capital in batches—each contribution occurs at a different time and in a different amount. Simply calculating (Total Gain / Total Invested)ignores the time value of money. One thousand dollars invested at the start of the year and one thousand dollars invested at the end have vastly different opportunity costs.
**XIRR (Extended Internal Rate of Return) **solves this problem. It accounts for the timing and amount of every cash flow to derive an equivalent annualized rate of return.
At its core, XIRR finds the discount rate rthat makes the net present value (NPV) of all cash flows equal to zero:
Σ CFi / (1+r)^((di - d1)/365) = 0
Where CFiis the i-th cash flow (negative for contributions, positive for withdrawals/redemptions) and diis the corresponding date.
Since there is no algebraic solution, XIRR relies on Newton's method for numerical iteration.
Case Study: 10 Years of CSI 300 DCA
Total Invested: ¥120,000 (10 years × 12 months)
Ending Value: ~¥158,000
Total Gain: ¥38,000
XIRR Annualized: ~5.0%
That 5.0% represents the real annualized return after adjusting for the time value of money.
Calculating (Total Gain / Total Invested / Years)gives you 3.8 / 120 / 10 = 3.2%. This figure is significantly lower than the XIRR result because it fails to account for the fact that earlier investments were deployed for a longer duration and thus had more time to compound.
You can validate this on our "DCA Master" page. Select the CSI 300 ETF, set a 10-year interval, and check the "Fixed Amount DCA" results. The annualized return calculated via XIRR should approximate 5%.
Disclaimer: Historical backtesting does not guarantee future returns. Data is for reference only.