MSRX Tools

XIRR Calculator

The real return on money that went in and out on irregular dates.

Everything runs inside your browser. Your files never leave your device.

Input

Result

The result appears here as you type.

Ask about XIRR Calculator

Questions about what this tool does, which option to pick, or what it can and cannot handle.

The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong. The tool itself is not guessing: it runs deterministic code on your device.

About the XIRR Calculator

XIRR finds the annualised return on a set of cash flows that happened on irregular dates. It is the right measure for almost every real portfolio, because real portfolios are not one payment in and one payment out — they are a monthly instalment here, a top-up there, a redemption when something came up, and a current balance that is not yet realised.

Paste one flow per line as a date and an amount. Money leaving your pocket is negative and money coming back is positive. If the investment is still running, add today's date and the current value as a final positive line: without it there is nothing for the calculation to solve against and the answer will be badly wrong.

What the tool does is find the discount rate at which all those dated flows net to zero. There is no closed formula for that, so it iterates — Newton's method first, which converges quickly on well-behaved inputs, and a bisection search over a wide bracket when the flows are awkward enough to send the first method wandering. Where no rate can reconcile the flows at all, which usually means every line has the same sign, it says so rather than returning whatever the last iteration held.

The result is directly comparable to a fixed deposit rate or a fund's published return, which is what makes it worth the trouble. A statement showing a total gain of forty per cent tells you nothing until you know across how many instalments and how long; XIRR compresses all of that into one number you can put next to any other rate.

How to use it

  1. 1Write one line per transaction: the date, a comma, then the amount.
  2. 2Make money you paid in negative and money you took out positive.
  3. 3Add today's date and the current value as a final positive line if the investment is still open.
  4. 4Run it and compare the rate against a deposit or an index over the same period.

Questions

What date format does it accept?
Anything the browser can parse, but 2024-04-01 is unambiguous and always works. Formats that put the day first can be read the other way round, so avoid them.
Why do I have to include the current value?
Because otherwise the flows only show money going out, and there is no rate that makes a series of pure outflows net to zero. The current value is what the investment is worth if you sold today, and it belongs in the calculation as a positive line.
How does this differ from the return my fund reports?
A fund reports the return on the fund. XIRR reports the return you got, which depends on when you put money in. Someone who invested heavily just before a fall has a worse XIRR than the fund's own figure, and someone who bought the dip has a better one.
It says no rate fits my flows. What went wrong?
Almost always a sign error — either everything is negative, or everything is positive. There has to be at least one of each for a rate to exist.