Free tool · Finance calculators
XIRR calculator
XIRR is the yearly return on a set of deposits and withdrawals that happen on irregular dates. Paste your dates and amounts and get the rate with the working.
- Free
- No sign-up
- Runs in your browser
6.65%a year, from 4 flows over 2.96 years
- Gain $2,000.00
- Money back 1.20× what went out
- 2022-01-15 to 2024-12-31
- Money paid out
- $10,000.00
- Money received
- $12,000.00
- Net
- $2,000.00
- Check: net value at this rate
- $0.00
Rule: find r so that the sum of amount ÷ (1 + r)days ÷ 365 over every flow is zero. Days are counted from the earliest date, and a year is always 365 days.
Your numbers: r = 6.6546%. The last column shows each flow discounted back to 2022-01-15; they add up to about zero, which is the proof that r fits.
| Date | Day | Amount | Worth then |
|---|---|---|---|
| 2022-01-15 | 0 | -$10,000.00 | -$10,000.00 |
| 2022-12-31 | 350 | $500.00 | $470.05 |
| 2023-12-31 | 715 | $500.00 | $440.72 |
| 2024-12-31 | 1081 | $11,000.00 | $9,089.24 |
How to use the XIRR Calculator
- Write one flow per line in the box: the date as year-month-day, a comma, then the amount.
- Make money you pay out negative and money you receive positive. Include the current value of what you still hold as the last, positive line.
- Pick a Currency symbol, then read the yearly rate, the gain and the table of flows.
- Check the line that says the net value at the rate is zero. It proves the rate fits your flows.
What does XIRR tell me?
XIRR is the single yearly rate that explains a list of cash flows with exact dates. It is the rate at which every payment, brought back to the first date, adds up to zero. If you paid money in on several days and took money out on others, XIRR says what yearly return that pattern earned.
Try the page's example: pay out 10,000 on 15 January 2022, receive 500 on the last day of 2022, receive 500 on the last day of 2023, and receive 11,000 on 31 December 2024. The return is 6.65% a year. The money received is 12,000 on 10,000 paid, so a plain gain of 20%. That gain took almost three years and part of the money came back early, which is why the yearly figure is not just 20% divided by the years.
A second case is saving in steps. Put in 1,000 on 1 January, 1,000 on 1 February and 1,000 on 1 March 2024, then take out 3,150 on 1 June 2024. You paid in 3,000 and got 3,150, a gain of 5%. The average coin sat for a shorter time than the whole 152 days, and XIRR accounts for that: the yearly rate is 15.75%. Write each deposit on its own line to get this kind of answer.
A plain percentage gain ignores timing. XIRR does not: the same profit made quickly counts as a better return than the same profit made slowly.
How is XIRR calculated?
The rule is sum of amount ÷ (1 + r)days ÷ 365 = 0. Each flow is counted in days from the earliest date, and a year is always 365 days. There is no formula that solves it directly when there are three or more flows, so the page searches for r.
The search starts at 10% and improves its guess in steps (Newton's method). If that fails, it scans a wide range of rates for the place where the sum changes sign and narrows in on it. Microsoft documents the same rule for its XIRR function: later payments are discounted over a 365-day year, the list needs at least one positive and one negative value, and the search stops when the answer is accurate to 0.000001 percent or after 100 tries.
The last line of the result is a check. It adds up every flow discounted at the rate found. A result near zero shows the rate is right. The table lists each flow, its day count and its worth on the first date.
How does the rate change with the final amount?
Pay out 10,000 on 15 January 2022 and take out one amount on 31 December 2024, which is 1,081 days later. The table shows the rate for several final amounts. With only two flows, XIRR equals the compound growth rate over those days.
So for 12,000 the rate is 6.35%. If you want that result for a plain start and end value, the CAGR calculator does it with years instead of dates. This page is for the harder case where money moves in and out several times.
| Amount received | Yearly rate (XIRR) |
|---|---|
| 11,000 | 3.27% |
| 12,000 | 6.35% |
| 13,000 | 9.26% |
| 15,000 | 14.67% |
| 20,000 | 26.37% |
What can go wrong with XIRR?
You need at least one negative and one positive amount. If all money goes one way, there is no rate. Mixing the signs up gives a wrong sign on the result, so check that deposits are negative.
Some patterns have more than one answer, such as a flow that changes sign several times. The page returns the first rate it finds scanning up from a loss, which is the usual one, but treat such results with care. Very short periods can produce enormous rates: money that grows 2% in a week is a huge yearly figure, and it says little about what comes next.
XIRR is also not a forecast. It describes what already happened, or what would happen if the dates and amounts you typed came true. To value future payments today, use the present value calculator. For a quick percent change between two numbers, use the percentage change calculator.
Dates matter more than they look. Moving one large deposit a month earlier lowers the rate, because the money worked for longer to reach the same end value. When you check a fund or a loan, make sure each date is the day the money really moved, not the day you remember it.
Fees, tax and risk are not in the maths unless you put them in as flows.
Use it with
- Dividend Calculator: dividend income and yield.
- Annuity Calculator: payments from a lump sum, or the value of a payment stream.
- Compound Interest Calculator: growth with monthly deposits.
Questions
What is XIRR?
XIRR is the yearly rate that makes dated cash flows net to zero, with each flow discounted over days ÷ 365. It is the return on money moved in and out on irregular dates.
How do I enter deposits and withdrawals?
One line each, as date, comma, amount. Money you pay out is negative and money you receive is positive. End with the current value of what you still hold as a positive amount.
Why does XIRR use a 365-day year?
It counts the days between each flow and the first date and divides by 365. Microsoft documents the same convention for its XIRR function, so results line up with a spreadsheet.
What is the XIRR of 10,000 that becomes 12,000 in 1,081 days?
About 6.35% a year. With only two flows it equals the compound annual growth rate over those days.
Why do I get an error or no rate?
Usually because all amounts have the same sign, a date is not valid, or a line is missing its amount. The message names the line to fix.
Is XIRR the same as a plain percentage return?
No. A percentage return ignores when the money moved. XIRR takes the timing into account, so a quick gain scores higher than a slow one.
Sources
The tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations are checked against the tool's own output.