Finance function
IRR function in Google Sheets and Excel
IRR returns the internal rate of return of a series of cash flows: the discount rate at which their NPV is zero.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
IRR(values, [guess])Arguments in [brackets] are optional. Google Sheets writes it IRR(cashflow_amounts, [rate_guess]).
Example
=IRR(B11:B16) reads: Find the yearly rate at which the cash flows from year 0 (B11, the investment) to year 5 (B16) have a net present value of exactly zero.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Input | Value | |||
| 2 | Loan amount | $15,000.00 | |||
| 3 | Annual rate | 6.0% | |||
| 4 | Years | 4 | |||
| 5 | |||||
| 6 | Monthly saving | $250.00 | |||
| 7 | Saving rate | 4.0% | |||
| 8 | Saving years | 10 | |||
| 9 | Discount rate | 8% | |||
| 10 | Year | Cash flow | IRR | 12.9% | |
| 11 | 0 | -$20,000.00 | |||
| 12 | 1 | $4,500.00 | |||
| 13 | 2 | $5,200.00 | |||
| 14 | 3 | $6,000.00 | |||
| 15 | 4 | $6,400.00 | |||
| 16 | 5 | $7,000.00 |
E10 shows 12.9%: the project returns about 13% a year.
How the spreadsheet calculates it
The internal rate of return of cash flows. Here it's given B11:B16.
- 1. IRR: The internal rate of return of cash flows. Here it's given
B11:B16.cash_flows=`B11:B16`: every cash flow from year 0 on
More IRR examples
=IRR(B11:B16,15%)The same project with a starting guess of 15%.=IRR({-20000,4500,5200,6000,6400,7000})The example's cash flows typed as an array.=IF(IRR(B11:B16)>B9,"Beats the rate","Falls short")Compare the return with the discount rate in B9.=IRR(B11:B15)The return if the project stopped after year 4.
Paste any of these into the formula explainer to see it step by step.
Tips
- Start the range with the year 0 investment as a negative number.
- Format the result as a percentage.
- Check the answer with NPV: at the IRR, the NPV should come out as zero.
What IRR is used for
Comparing investment returns, deciding whether a project beats the cost of borrowing, checking the return on equipment or property, and reporting returns alongside NPV.
Arguments
| Argument | Required | What it is |
|---|---|---|
| values | Yes | Every cash flow in time order, starting with year 0 (the investment, negative): B11:B16. It needs at least one negative and one positive value.Watch out: All positive or all negative values give #NUM!. |
| guess | No | A starting estimate of the rate. Left out, it's 10%; Microsoft suggests trying another guess if IRR gives #NUM!. |
Common mistakes
Leaving out year 0: without an investment there's no return to calculate.
Mixing up the order: IRR reads the values in order as periods, so a range sorted by size gives a meaningless rate.
Comparing a monthly IRR with a yearly rate: with monthly cash flows, IRR returns a monthly rate.
Leaving empty cells for periods with no cash: empty cells and text are ignored, which shifts later years. Type 0 instead.
In Google Sheets
Google Sheets has IRR with the same arguments (IRR(cashflow_amounts, [rate_guess])).
Errors you may see with IRR
Questions
What is a good IRR?
One that's higher than what the money could earn elsewhere, or than your cost of borrowing. Compare it with that rate, not with zero.
Why does IRR return #NUM!?
Either the cash flows don't include at least one negative and one positive value, or IRR didn't settle on a rate within 20 tries. Check the signs, then try a guess such as 5% or 20%.
IRR or NPV: which should I use?
Use both. NPV says how much value a project adds at your rate, in money; IRR says what rate it earns. For choosing between projects of very different sizes, NPV is the safer guide.
What if cash flows aren't yearly?
IRR assumes equal periods. For specific dates, XIRR does the same job; this course doesn't cover it.
Sources
Official documentation the facts on this page were checked against.