Finance

How XIRR Annualizes Irregular Cash Flows

Two real bisection-solved XIRR runs — a clean one-year round trip and a three-date series with two investments and one withdrawal — show how XIRR turns cash flows on arbitrary dates into a single annualized rate.

A worked example: −₹1,00,000 to ₹1,10,000 over one year

Investing ₹1,00,000 on 2024-01-01 and receiving ₹1,10,000 back on 2025-01-01 produces a real XIRR of 9.97%, just under the 10% a naive "return divided by investment" calculation would suggest. The gap comes from 2024 being a leap year: the actual gap between the two dates is 366 days, not the 365-day year XIRR annualizes against, so the same ₹10,000 gain gets slightly compressed when expressed as a rate per exact calendar year.

The formula: finding the rate where discounted cash flows net to zero

XIRR searches by bisection for the annualized rate that, when used to discount every cash flow back to a common date, makes them sum to zero — each cash flow amount divided by (1 + rate) raised to the power of days-since-first-flow ÷ 365. For the ₹1,00,000 example, the search narrows between −99% and 1000% until the discounted −₹1,00,000 and discounted ₹1,10,000 (at 366/365 years out) net to within a hair of zero, landing on 9.97%.

A three-date example: two investments, one withdrawal

Investing ₹1,00,000 on 2020-01-01, adding ₹50,000 more on 2021-06-01, and withdrawing ₹2,00,000 on 2023-01-01 produces a real XIRR of 11.92%. Unlike a simple return calculation, XIRR correctly weights the second ₹50,000 investment by how much less time — from mid-2021 to 2023, rather than from 2020 — it had to grow, since each cash flow is discounted against its own actual number of days from the first date.

Why XIRR matters for irregular investing patterns

Most real investing doesn't happen in neat annual installments — SIP top-ups, lump-sum additions, and partial withdrawals all land on different, unevenly spaced dates. XIRR is built specifically to handle that: because every cash flow is discounted against its own exact date rather than assumed to fall on a period boundary, it gives one comparable annualized rate even when a plain CAGR calculation, which needs just a start and end value, wouldn't apply at all.