Guide
XIRR: the yearly return of money that went in and out on different dates
When you invest a lump sum once and sell it once, the return is easy: use CAGR. Most real investing is messier. You buy a fund every month, add a bonus in March, take some out for a wedding and finally hold whatever is left. The question “what was my return?” then needs a method that respects the dates of each cash flow, because money invested for two years has done more than money invested for two weeks. XIRR is that method.
What XIRR calculates
XIRR finds the annual rate r such that the sum of every cash flow divided by (1 + r) raised to the number of years since the first date equals zero. The years are counted as days ÷ 365. A rupee paid out earlier counts for more, because it was at work for longer, and a rupee received later counts for less. This is the same definition as the XIRR function in spreadsheets, and the page’s solution agrees with the example in Microsoft’s documentation, which gives 37.34 percent.
Entering the flows
Write one cash flow per line as a date and an amount separated by a comma or a space. Money you put in is negative, and money you take out, including the current value of what you still hold, is positive. For example “2023-01-05, -10000” is an investment and “2023-12-20, 66500” is the value at the end. The page accepts the formats 2026-01-31, 31/01/2026, 31-01-2026 and 31.01.2026 and rejects impossible dates such as 30 February.
A worked example
The sample has six monthly investments of 10,000 from 5 January to 5 June 2023 and a final value of 66,500 on 20 December 2023. The page reports an XIRR of 14.666%. The money invested is 60,000, the money received 66,500, so the net gain is 6,500 and the absolute return 10.83%. The period covers 349 days, 0.96 years. The absolute return looks smaller than the annual rate because the average rupee was invested for well under a year. A second sample, a property bought for 50,00,000, let for four years and sold for 72,00,000, returns 11.281% a year over exactly five years.
Why not just use CAGR?
CAGR needs one starting value and one ending value, so it cannot represent a SIP. If you used the total invested as the start and the final value as the end, you would misstate the period. XIRR weights every flow by its own time. When there is a single outflow and a single inflow, the two methods agree, which makes a useful check.
Edge cases
At least one negative and one positive amount on different dates are needed. If all the amounts have the same sign, the page explains that no rate exists. Flows that change sign several times can have more than one solution; the page shows the one its search finds first. Very large gains or losses over a few days produce huge annualised rates, which are correct mathematics for a very short period and not meaningful.
Limits
The result is only as accurate as the dates and amounts you provide. Fees, taxes and exit loads must be entered as flows to be counted. XIRR describes what happened; it does not forecast.
Related tools
- CAGR Calculator gives the simpler growth rate between two values.
- SIP Calculator projects a future value for a regular investment.
- ROI Calculator states the total gain on the money invested without annualising it.
- Stock Average Calculator works out the average cost of several purchases.
Checked against the current version of the XIRR Calculator on .

