Calculate Extended Internal Rate of Return for irregular cash flows.
XIRR is calculated by finding the rate that satisfies the equation where the sum of Present Values of all cash flows is zero. The equation uses the Newton-Raphson method.
0 = Σ [ CashFlow_i / (1 + Rate)^(Days_i / 365) ]
Extended Internal Rate of Return calculates the annualized return for a series of cash flows occurring at irregular intervals.
Negative values indicate money going out (investments), positive values indicate money coming in (returns/withdrawals).
CAGR works for point-to-point single investments. XIRR is needed for multiple investments over time like SIPs.
Yes, if your total returns are less than investments, XIRR will be negative.