XIRR calculator
When you add money to an investment and take some out at different times, a simple percentage gain says little about how well your money actually worked. Paste your cash flows with their dates, money in as negative and money out or today's value as positive, and this calculator finds the XIRR: the yearly rate of return that fits those exact dates. It also shows the simple return beside it, so you can see how much timing changes the picture.
Your money in and out
Totals over the whole period, and what the same deposits would have grown to at your benchmark rate.
Cash flows
Each cash flow, how long after the first one it happened, and its value discounted back to the start at your XIRR. The discounted values add up to zero.
| Date | Amount | Years from start | Discounted at XIRR |
|---|
How XIRR is found
There is no direct formula for XIRR. The calculator searches for the rate that makes the discounted cash flows add up to zero, the same way spreadsheet XIRR functions do.
Time each flow
Days since the first cash flow, divided by 365.
t = (date − first date) ÷ 365
Discount each flow
Bring every amount back to the first date at a trial rate r.
present value = amount ÷ (1 + r)t
Solve
Adjust r until the present values add up to zero, using Newton's method with a bisection fallback.
Σ amount ÷ (1 + r)t = 0
Simple return
For comparison, total gain divided by total money put in, ignoring timing.
simple = (out − in) ÷ in
Benchmark
Each deposit grown at the benchmark rate until the last date, minus withdrawals grown the same way.
value = Σ deposit × (1 + rate)years left
XIRR questions
What is XIRR?
XIRR is the yearly rate of return that accounts for exactly when each amount went in or came out. It is the rate at which the value of all your cash flows, discounted back to the start, adds up to zero. It is the fairest way to measure the return on an investment you added to or withdrew from at different times.
How is XIRR different from a simple return?
A simple return divides your total gain by your total investment and ignores timing. If you invested $1,000 a month for a year and ended with $13,000, the simple return is about 8 percent, but most of the money was only invested for a few months, so the real yearly rate is much higher. XIRR captures that.
How do I enter cash flows?
One per line: a date, then an amount. Money you put in is negative and money you took out, or the value today, is positive. Dates work best as year-month-day, such as 2026-03-15. You need at least one negative and one positive amount.
How do I include an investment I still hold?
Add a final line with today's date and the current value of the investment as a positive amount, as if you sold it today. That is how brokers and fund platforms usually calculate a personal rate of return.
Is XIRR the same as in Excel or Google Sheets?
Yes. This calculator solves the same equation as the XIRR function in spreadsheets, counting days between dates and using a 365-day year. Results should match to within rounding.
Why might XIRR show an error or a strange result?
If all amounts have the same sign there is no rate that balances them. Very short periods can also produce huge annualised numbers, because a small gain over a few days is scaled up to a full year. Check the dates and signs if the result looks off.