Enter the initial investment and the cash flow for each year starting from year 1 (the money received that year). The calculator finds the discount rate that makes NPV (net present value) exactly 0, which is the IRR (internal rate of return).
Table of Contents
-
What you can do on this page
-
What is this calculation used for?
-
How to Use
-
Formulas and graphs
-
Symbols and terms
-
Good to know before you start
-
How to calculate it in Excel
-
How to calculate it in Google Sheets
-
How to calculate it in Python
-
How to write it in LaTeX and other math languages (copy and paste)
-
How to have ChatGPT do the calculation
-
DataChef Features
-
Related Features
-
NumberChef Calculators List
What you can do on this page
- Enter the initial investment and the cash flow for each year (the money received that year), and get the IRR (internal rate of return, per year)
- The investment period, total return (gain or loss over the whole period) and gross return are shown at the same time
- The yearly amounts can all be different, and additional investments in later years (negative cash flows) are supported
- A graph of NPV (net present value) shows at a glance where NPV becomes 0, which is the IRR
- A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
What is this calculation used for?
"If we install a $4,000,000 machine, we expect cost savings of $1,000,000, $2,000,000 and $3,000,000 over 3 years." With this estimate, the IRR is about 19.4% a year. In company investment decisions, the standard use is to compare this IRR with the minimum required return (the hurdle rate, such as the borrowing rate or the cost of capital) and accept the project if it is higher. Every corporate finance textbook covers it.
Future cash flows are only estimates, though, so it is good practice to also run the numbers with a cautious estimate.
The money in a real estate investment flows like this: you buy the property first, rent comes in every year, and the sale price comes in at the end, so the yearly amounts are all different. IRR's strength is turning uneven cash flows like these into one yearly rate, and real estate investors widely use it to compare properties.
Unlike the gross yield (rent ÷ price), it also includes the gain or loss on the sale and years when vacancies cut the rent.
Home solar power has a cash flow that suits IRR: you pay for the installation first, then every year you save on your electric bill and may earn credits for power sent to the grid (such as net metering, where available). For example, if the installation costs $20,000, list the yearly savings and calculate the IRR, and you can compare the system with a savings account or an index fund on the same scale: "this equipment is like an investment returning X% a year".
The result changes when assumptions change, such as electricity rates, credit rules or the life of the equipment, so it is a good idea to calculate a few scenarios.
For investment funds such as venture capital and private equity, IRR is the standard measure of fund performance. When money is called from investors and when it is paid back differs from fund to fund, so only IRR, which takes time into account, gives a fair comparison.
Investment banks and companies considering M&A (mergers and acquisitions) also calculate IRR from the purchase price and the future profit plan to decide whether to go ahead. It is one of the first calculations people learn when they aim for a career in finance.
Suppose investments A and B both cost $100,000 and both pay back $150,000 in total over 5 years (a total return of $50,000 and a gross return of 50%). A pays more early ($5,000, $20,000, $25,000, $40,000, $60,000), while B pays mostly at the end ($0, $10,000, $30,000, $30,000, $80,000).
The totals are the same, but A's IRR is 11.290% a year and B's is 10.259%, so A, which returns money sooner, comes out ahead. Money that comes back can be invested again. IRR shows you this time value of money in numbers.
Formulas and graphs
Symbols and terms
Symbols
| IRR | I R R | Internal rate of return. The discount rate that makes NPV exactly 0; it shows the return per year of the investment. (Example - invest $4,000,000 and receive $1,000,000, $2,000,000 and $3,000,000 over 3 years, and the IRR is 19.438% a year.) |
| NPV | N P V | Net present value. All the money in and out of an investment, turned into today's value and added up. If it is positive, the investment does better than the discount rate. |
| \(CF_t\) | C F sub t | The cash flow in year \(t\). The money received that year (negative if it was money paid). |
| \(CF_0\) | C F sub zero | The cash flow in year 0 (now). The initial investment is money paid, so it is negative. On this calculator you enter it as a positive amount, and it is treated as negative. |
| \(r\) | r | The discount rate. The yearly rate used to turn future money into today's value. IRR is the special \(r\) where NPV is 0. |
| \(t\) | t | The year number. It counts which year the money is in, with the time of the investment as year 0. |
| \(n\) | n | The investment period in years. The year of the last cash flow. |
| \(PV\) | P V | Present value. Future money turned into its value today. |
| \(S\) | S | The total money received. All the cash flows from year 1 to year \(n\) added up (additional investments are added as negative amounts). |
| \(TR\) | T R | Total return. The total received minus the initial investment, the gain or loss over the whole period. |
| \(G\) | G | Gross return. The total return as a % of the initial investment, a whole-period % that ignores time. Note that in the fund industry, "gross return" usually has a different meaning, the return before fees. |
Terms
| cash flow | Money coming in or going out. Money received is a positive number and money paid is a negative number. For IRR, when and how much the money moves both matter. |
| discount rate | The yearly rate used to turn future money into today's value (to discount it). For example, $110,000 one year from now, discounted at 10% a year, is $100,000 today. |
| present value | What future money is worth today. Because money has a time value, the later you receive the same $1,000,000, the smaller its present value. |
| NPV (net present value) | The sum of the present values of all the cash flows of an investment. A positive NPV says the investment earns more than the discount rate. It is the most basic yardstick for investment decisions. |
| IRR (internal rate of return) | The discount rate that makes NPV exactly 0. It shows in one number what return per year the investment is equal to, so it is widely used to evaluate business projects and real estate. |
| hurdle rate | The minimum return required from an investment (such as the cost of capital). In practice, a project is accepted if its IRR is above the hurdle rate. |
| multiple IRR problem | A mathematical property - when the signs of the cash flows change twice or more, two or more discount rates can make NPV equal to 0. IRR alone cannot decide in that case, so you decide by NPV. |
| numerical method | A way to solve an equation that cannot be solved by rearranging, where a computer tries values little by little and gets closer to the answer. IRR is found this way (bisection, Newton's method and others). |
Good to know before you start
Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.
| Percents (Grades 6–7) |
|
| Positive and negative numbers (Grades 6–7) |
|
| Exponents (Grades 6–8) |
|
| The idea of an equation (Grades 7–8) |
|
| Compound interest and the time value of money (high school personal finance and math) |
|
How to calculate it in Excel
| Money received in t years ($) | 110000 |
| Discount rate (%) | 10 |
| Years t | 1 |
| Present value ($) | =B1/(1+B2/100)^B3 |
| Initial investment (enter as negative) | -1000000 |
| Cash flow in year 1 | 550000 |
| Cash flow in year 2 | 605000 |
| Discount rate (%) | 10 |
| NPV ($) | =NPV(B4/100,B2:B3)+B1 |
| Initial investment (enter as negative) | -4000000 |
| Cash flow in year 1 | 1000000 |
| Cash flow in year 2 | 2000000 |
| Cash flow in year 3 | 3000000 |
| IRR (%) | =IRR(B1:B4)*100 |
| Initial investment | 4000000 |
| Total money received | 6000000 |
| Total return ($) | =B2-B1 |
| Gross return (%) | =(B2-B1)/B1*100 |
The NPV function in the second table has a well-known trap. Excel's NPV function should include only the money from year 1 onward in its range; the initial investment (year 0) is added outside the function (the example gives exactly 0).
The first table gives exactly 100,000, and the fourth gives a total return of 2,000,000 and a gross return of 50%. Just replace column B with your own numbers.
How to calculate it in Google Sheets
| Money received in t years ($) | 110000 |
| Discount rate (%) | 10 |
| Years t | 1 |
| Present value ($) | =B1/(1+B2/100)^B3 |
| Initial investment (enter as negative) | -1000000 |
| Cash flow in year 1 | 550000 |
| Cash flow in year 2 | 605000 |
| Discount rate (%) | 10 |
| NPV ($) | =NPV(B4/100,B2:B3)+B1 |
| Initial investment (enter as negative) | -4000000 |
| Cash flow in year 1 | 1000000 |
| Cash flow in year 2 | 2000000 |
| Cash flow in year 3 | 3000000 |
| IRR (%) | =IRR(B1:B4)*100 |
| Initial investment | 4000000 |
| Total money received | 6000000 |
| Total return ($) | =B2-B1 |
| Gross return (%) | =(B2-B1)/B1*100 |
How to calculate it in Python
initial_investment = 4000000 # initial investment ($)
cash_flows = [1000000, 2000000, 3000000] # cash flow for each year from year 1 ($)
# NPV (net present value): turn every cash flow into today's value and add them up
def npv(rate, cfs):
return sum(cf / (1 + rate) ** t for t, cf in enumerate(cfs))
cfs = [-initial_investment] + cash_flows
# Find the discount rate where NPV is 0 (the IRR) by bisection
# (a simple version for ordinary investments whose signs change only once)
low, high = -0.9999, 10.0
for _ in range(200):
mid = (low + high) / 2
if npv(low, cfs) * npv(mid, cfs) <= 0:
high = mid
else:
low = mid
irr = (low + high) / 2
total_return = sum(cash_flows) - initial_investment
gross_return = total_return / initial_investment * 100
print(f"IRR: {irr * 100:.3f}%")
print(f"Total return: ${total_return}")
print(f"Gross return: {gross_return:.3f}%")
How to write it in LaTeX and other math languages (copy and paste)
PV = CFₜ ÷ (1 + r)ᵗ
PV = \dfrac{CF_t}{(1+r)^{t}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>PV</mi>
<mo>=</mo>
<mfrac>
<msub><mi>CF</mi><mi>t</mi></msub>
<msup>
<mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>r</mi><mo>)</mo></mrow>
<mi>t</mi>
</msup>
</mfrac>
</mrow>
</math>
PV = (CF_t) / ((1 + r)^t)
cf/(1 + r)^t
PV := cf/(1 + r)^t;
PV = cf/(1 + r)^t;
PV = CF_t/(1 + r)^t
NPV = CF₀ + CF₁/(1 + r)¹ + … + CFₙ/(1 + r)ⁿ
\mathrm{NPV} = \sum_{t=0}^{n} \dfrac{CF_t}{(1+r)^{t}}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>NPV</mi>
<mo>=</mo>
<munderover>
<mo>∑</mo>
<mrow><mi>t</mi><mo>=</mo><mn>0</mn></mrow>
<mi>n</mi>
</munderover>
<mfrac>
<msub><mi>CF</mi><mi>t</mi></msub>
<msup>
<mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>r</mi><mo>)</mo></mrow>
<mi>t</mi>
</msup>
</mfrac>
</mrow>
</math>
NPV = sum_(t=0)^n (CF_t) / ((1 + r)^t)
Sum[cf[t]/(1 + r)^t, {t, 0, n}]
NPV := sum(cf(t)/(1 + r)^t, t = 0 .. n);
NPV = sum(cf ./ (1 + r).^(0:n));
NPV = ∑_(t=0)^n CF_t/(1 + r)^t
CF₀ + CF₁/(1 + IRR)¹ + … + CFₙ/(1 + IRR)ⁿ = 0
\sum_{t=0}^{n} \dfrac{CF_t}{(1+\mathrm{IRR})^{t}} = 0
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<munderover>
<mo>∑</mo>
<mrow><mi>t</mi><mo>=</mo><mn>0</mn></mrow>
<mi>n</mi>
</munderover>
<mfrac>
<msub><mi>CF</mi><mi>t</mi></msub>
<msup>
<mrow><mo>(</mo><mn>1</mn><mo>+</mo><mi>IRR</mi><mo>)</mo></mrow>
<mi>t</mi>
</msup>
</mfrac>
<mo>=</mo>
<mn>0</mn>
</mrow>
</math>
sum_(t=0)^n (CF_t) / ((1 + IRR)^t) = 0
Solve[Sum[cf[t]/(1 + x)^t, {t, 0, n}] == 0, x]
solve(sum(cf(t)/(1 + x)^t, t = 0 .. n) = 0, x);
solve(sum(cf ./ (1 + x).^(0:n)) == 0, x)
∑_(t=0)^n CF_t/(1 + IRR)^t = 0
G = (S − C₀) ÷ C₀
G = \dfrac{S - C_0}{C_0}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mrow>
<mi>G</mi>
<mo>=</mo>
<mfrac>
<mrow><mi>S</mi><mo>−</mo><msub><mi>C</mi><mn>0</mn></msub></mrow>
<msub><mi>C</mi><mn>0</mn></msub>
</mfrac>
</mrow>
</math>
G = (S - C_0) / C_0
(s - c0)/c0
G := (s - c0)/c0;
G = (s - c0)/c0;
G = (S − C_0)/C_0
How to have ChatGPT do the calculation
You are an investment calculation assistant. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing). I invested $4,000,000 and received $1,000,000 in year 1, $2,000,000 in year 2 and $3,000,000 in year 3. Find each of the following: 1. The IRR (internal rate of return, in %, to 3 decimal places) = the r that makes NPV(r) = -4000000 + 1000000/(1+r) + 2000000/(1+r)^2 + 3000000/(1+r)^3 equal to 0 2. The total return (in dollars) 3. The gross return (in %, to 3 decimal places) Show the formulas you used and the numbers from the execution result.
How to Use
-
1Enter your numbersType the numbers you want to calculate with into the input fields
-
2CalculatePress the "Calculate" button
-
3Check the resultThe result appears on the spot. The same page also explains the idea behind the calculation and the formula
DataChef Features
No technical knowledge required.
Intuitive and user-friendly operation.
Can be used without registering personal information.
Automatic file deletion by clicking "download".
and rapid file conversion.
No attribution required.
No need to contact us for commercial use permission.
