XIRR calculator
The annualised return on money that went in and out at different times, which is what a real portfolio does.
Money out is negative, money in is positive. A redemption or the closing value of the holding is the last line.
The maths
How this is calculated.
XIRR is the single annual rate that makes a set of dated cash flows sum to nothing today. Each flow is discounted by how long it was invested:
Σ [ Cₖ ÷ (1 + r)^(dₖ ÷ 365) ] = 0
Where Cₖ is each amount and dₖ is the days between the first flow and that one. There is no closed-form solution, so the rate is found numerically — Newton-Raphson, falling back to bisection when Newton diverges, which it does on the irregular patterns real books produce.
What it assumes. That every flow is dated correctly and signed correctly. Where no rate solves the flows, this returns nothing rather than a plausible wrong number.
Worked example
Four quarterly instalments and a redemption.
₹ 10,000 invested on the first of January, April, July and October 2024, redeemed for ₹ 46,000 on the first of January 2026. Total in: ₹ 40,000. Total out: ₹ 46,000 — a gain of 15 % on the money.
The annualised return is not 15 %, and it is not 15 % ÷ 2 either. Only the first instalment was invested for the full two years; the last was invested for fifteen months. XIRR weights each by its own duration and returns roughly + 8.94 % a year — the number that is comparable with a fund’s own published return.
Questions about this calculator.
Why not just use total gain?
Because it ignores time. Two books that both turned ₹ 40,000 into ₹ 46,000 performed very differently if one did it in a year and the other in five. XIRR is what makes a portfolio comparable with a fund’s published return.
What sign should each amount have?
Money leaving you is negative, money coming back is positive. A purchase is negative, a redemption or dividend is positive, and the closing value of what you still hold goes in as a positive on today’s date.
Why did it not return a rate?
Usually the flows are all one sign — there has to be at least one payment out and one back. Occasionally a set of flows genuinely has no solution or several. Rather than pick one and present it as the answer, this returns nothing.
Is this the same as the XIRR in a spreadsheet?
Yes, the same definition and the same day-count basis, solved the same way. Small differences in the last decimal are the solver stopping at a slightly different tolerance, not a different answer.
Is my input sent anywhere?
No. Everything is parsed and solved in your browser. Nothing is submitted, stored or logged — which matters more here, since these are real portfolio figures.
From the team behind Finvica — the operating platform for multi-product wealth practices. See the platform