XIRR calculator
When money goes in at different times and different amounts, a simple percentage tells you nothing. XIRR is the one annual rate that makes every cash flow add up to what you hold today — the number a fund statement means when it says your return.
Your cash flows
Money you put in is negative. Money you took out, and what the investment is worth today, are positive. There must be at least one of each.
Money in and out, over time
| Date | Amount | Years held | Discounted to today |
|---|
How this is worked out
XIRR is the rate at which every cash flow, discounted back to the first date, sums to zero. There is no formula that solves it directly, so it is found by searching: the calculation starts with a guess, measures how far off it is, and moves closer, repeating until the answer stops changing. This one falls back to a slower but unfailing halving search if the fast method wanders, which is what makes it agree with a spreadsheet rather than giving up.
Days are counted exactly, and a year is taken as 365 days — the same convention Excel and Google Sheets use for XIRR, so the number here should match what you get there on the same flows.
When XIRR does not mean much
Over very short periods it exaggerates: two months of a 3% gain annualises to something near 20%, which nobody is going to earn for a year. Give it at least a year of flows before reading it as a rate of return.
It also needs the signs to make sense. If every flow points the same way there is no rate that balances them, and the calculator will say so rather than invent one.
