$500 on the first trading day of every month
- Put in
- $29,000 (58 buys)
- Worth now
- $44,912
- Gain
- $15,912 · 54.87%
IRR is the yearly return your money earned, counting when each dollar went in and when it came out. Put $10,000 in and get $12,100 back two years later, and your IRR is 10% a year. Add or take out money along the way and IRR gives each dollar credit only for the time it was invested. Formally, it's the rate that makes the net present value of all the cash flows zero.
That makes it a different number from your total gain. Here is the same S&P 500 fund bought two ways with the same $29,000, valued at the close on 26 October 2026.
Plan B made more money, because all of it was invested from day one, at the top of the market. Plan A earned the higher rate: its dollars were in for about half as long on average, and the ones that went in during 2022 and 2023 bought the fund cheaper than its January 2022 price.
Add what you put in and what you got back, with dates for XIRR or by period for IRR. It uses the same days ÷ 365 formula as Excel's XIRR and lists every answer it finds when there's more than one.
There's no way to rearrange the formula for r, so you try rates until the cash flows net to zero. Spreadsheets do exactly that, just faster.
Each CF is a cash flow: money you put in counts as negative, money you get back (or what the investment is worth at the end) as positive. Each t is how many years after the first cash flow it happened. The r that makes the sum zero is the IRR.
Take a simple case: you invest $10,000, add $5,000 a year later, and a year after that the account is worth $17,600.
Your gain is $2,600 on $15,000, or 17.3%. But the $5,000 was only invested for one of the two years, so the yearly rate is higher than 17.3% ÷ 2.
Discount each cash flow back to the start at a trial rate and add them up. Too low a rate leaves the sum positive, too high a rate pushes it negative.
At 10% the sum is exactly zero, so the IRR is 10% a year. You can check it forwards: $10,000 grown two years at 10% is $12,100, $5,000 grown one year is $5,500, and together they make $17,600.
For cash flows exactly one period apart, every year or every month. It returns the rate per period, so a monthly IRR needs turning into a yearly one: (1 + r)12 − 1.
Each cash flow gets its own date and the answer is a yearly rate, counting time as days ÷ 365. This is the one to use for real buys, sales and dividends.
A modified IRR: you set what borrowed money costs and what the cash you take out earns afterwards, and it gives one rate that includes both.
The two plans from the top of the page, month by month. Plan A's line starts at zero and climbs as each $500 goes in.
Values on the first trading day of each month and on 26 October 2026.
| To 26 October 2026 | Plan A, monthly | Plan B, lump sum |
|---|---|---|
| Put in | $29,000 | $29,000 |
| Worth | $44,911.75 | $49,508.63 |
| Gain | $15,911.75 | $20,508.63 |
| Total return | 54.87% | 70.72% |
| Average time each dollar was invested | about 2.4 years | 4.8 years |
| IRR, a year | 18.27% | 11.75% |
Plan B ended $4,597 ahead. A higher IRR doesn't mean more money, it means each dollar that was invested grew faster while it was in.
Plan B put everything in at the January 2022 high and was down to $21,896 by 12 October that year. Plan A had only $5,000 in by then and kept buying lower.
SPY itself grew 11.75% a year over the window, which is Plan B's IRR, because one amount in and one out is just the fund's return. Plan A's extra comes from when its money went in.
Four numbers people call "my return", each answering a different question. Plan A, the $500-a-month plan, as the example.
| Measure | The question it answers | Counts when you added money | Plan A | Use it for |
|---|---|---|---|---|
| IRR / XIRRmoney-weighted | What did my money earn a year, given when I put it in? | Yes | 18.27% a year | Your own result, a property, a fund you invest in over time, a business project |
| Time-weighted returnTWR | How did the investment itself do, ignoring my deposits? | No, on purpose | 11.75% a year | Comparing a fund or a manager with an index. More on TWR |
| Total return / ROIsimple | How much did I gain on what I put in? | No | 54.87% in total | A quick read on one trade. More on total return |
| CAGRcompound annual growth | What yearly rate turns a starting value into an ending value? | Only one amount in | doesn't apply | A single lump sum, where it equals the IRR. More on CAGR |
There's no single number. A good IRR beats what the same money could have earned elsewhere, on the same dates.
Compare your IRR with the IRR you would have got by putting the same amounts, on the same days, into an index fund. That's the fair test, because it gives the fund the same timing you had.
Comparing your IRR with the index's published return mixes two things: how your picks did, and when you happened to add money. Plan A beat SPY's 11.75% by more than six points while holding nothing but SPY.
Companies compare a project's IRR with their cost of capital, the return their lenders and shareholders expect. For a normal project, money out first and back later, an IRR above it means the project adds value. Many set a higher hurdle rate for riskier projects.
When two projects compete, or the cash changes direction more than once, go by the net present value: IRR ranks percentages, and a smaller project can have the higher IRR while making less money.
IRR is the right number for your own money, but four situations catch people out.
When money changes direction more than once, the equation can have several roots. Put in $100, take out $230 a year later, put back $132 a year after that: both 10% and 20% make the net present value zero, and Excel returns whichever it finds first. All in or all out has no IRR at all.
IRR is a yearly rate, so a quick gain gets compounded as if it went on all year. A 5% gain in 14 days is an IRR of 256.8%. For anything held a few weeks, the plain percentage gain says more.
$1,000 that becomes $1,500 in a year has an IRR of 50%. $100,000 that becomes $115,000 has 15%. At an 8% cost of money, the first adds $388.89 of value and the second $6,481.48. IRR ignores size; net present value doesn't.
IRR measures money while it's invested. A property with a 25% IRR from early rents tells you nothing about what those rents earn after you collect them. If you want one rate that includes that, MIRR takes a reinvestment rate you choose.
AllInvestView works out the IRR from the date and amount of your own buys, sales and dividends, in every account you add, with the same days ÷ 365 method as Excel's XIRR.
Open any holding and its XIRR sits beside the value, cost basis and total return, worked out from the date and amount of every buy and sale. A monthly plan of 32 buys is counted lot by lot, so each $500 earns its return only from the day it went in.
See each holding's IRR
AllInvestView
For stocks and funds, the dashboard's Growth Rate (IRR) card is worked out from the date and amount of every buy, sale and dividend in the accounts you add. Pick a start and end date and it works out the IRR for just that window. Dividends count by default, and you can leave them out in your settings.
See your portfolio's IRR
AllInvestView
Add the accounts you hold and AllInvestView shows the IRR of each holding and of the whole portfolio, next to its time-weighted return, for any dates you choose. No spreadsheet of cash flows to keep up.
It's the yearly return your money earned, taking into account when each dollar went in and came out. Put $10,000 in and get $12,100 back two years later and your IRR is 10% a year. Add money along the way and IRR gives each deposit credit only for the time it was invested.
You look for the yearly rate that makes the value of everything you put in, grown at that rate, equal what you got out. There is no formula to rearrange, so you try rates until the gap reaches zero, or let a spreadsheet do it: =IRR() for evenly spaced cash flows and =XIRR() when each one has its own date. The calculator on this page does the same.
IRR assumes the cash flows are one period apart: every year, or every month. XIRR takes a date for each one and gives a yearly rate, which is what you need for real investing, where you buy, sell and get dividends on any day. Excel and Google Sheets count XIRR's time as days divided by 365, and so does AllInvestView.
One that beats what the same money would have earned elsewhere on the same dates. For a stock portfolio, compare it with the IRR of putting the same amounts into an index fund on the same days. In our example, $500 a month into SPY from January 2022 earned 18.27% a year to 26 October 2026. For a typical business project, where money goes out first and comes back later, a good IRR is one above the company's cost of capital.
Total return is your gain divided by what you put in, with no time in it. IRR is a yearly rate and it counts how long each dollar was invested. $500 a month into SPY since January 2022 gained 54.87% on the $29,000 put in, but the average dollar was in for far less than the full four years, so the IRR is 18.27% a year.
Yes to both. Put $100 in and get $90 back a year later and the IRR is −10%. It can have two answers when money changes direction more than once, for example putting $100 in, taking $230 out and then having to put $132 back: both 10% and 20% make the net present value zero. The calculator here lists every answer it finds instead of picking one.
Only when there is one amount in and one amount out. Then both are the yearly rate that turns the first into the second. Once you add or take out money in between, CAGR has no way to count it and IRR does.
Checked on 27 October 2026.
The SPY plans are worked out by AllInvestView from daily closing prices and the fund's dividends, each dividend reinvested at the close on its ex-date, with no trading costs or taxes. The IRRs come from the same solver the product uses. None of it is investment advice.