IRR / NPV calculator
Enter a cash flow per period and solve the IRR with a grid scan, bisection and Newton refinement (multiple roots flagged), together with NPV, payback, discounted payback, profitability index and MIRR.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Cash flows and discount rate
IRR uses a hybrid solver: a grid scan for sign changes, bisection to converge and Newton iteration to refine; the NPV discount rate is configurable. Everything runs locally in your browser.
Results
16.34%130.732.412.741.130714.60%Solved with:grid scan + bisection + Newton refinement · finance 10.0% · reinvest 10.0%
Discounted schedule
| Period | Cash flow | Discount factor | Present value | Cumulative | Cumulative PV |
|---|---|---|---|---|---|
| 0 | -1,000.00 | 1.000000 | -1,000.00 | -1,000.00 | -1,000.00 |
| 1 | 300.00 | 0.909091 | 272.73 | -700.00 | -727.27 |
| 2 | 420.00 | 0.826446 | 347.11 | -280.00 | -380.17 |
| 3 | 680.00 | 0.751315 | 510.89 | 400.00 | 130.73 |
How it was solved
The NPV sign is scanned between -99.9% and 1000%, each bracket is closed with bisection and then refined with Newton iteration (the table shows the last bisection run).
| Iteration | Rate | NPV |
|---|---|---|
| 189 | 16.340560% | 5.684e-14 |
| 190 | 16.340560% | 5.684e-14 |
| 191 | 16.340560% | 5.684e-14 |
| 192 | 16.340560% | 5.684e-14 |
| 193 | 16.340560% | 5.684e-14 |
| 194 | 16.340560% | 5.684e-14 |
| 195 | 16.340560% | 5.684e-14 |
| 196 | 16.340560% | 5.684e-14 |
| 197 | 16.340560% | 5.684e-14 |
| 198 | 16.340560% | 5.684e-14 |
| 199 | 16.340560% | 5.684e-14 |
| 200 | 16.340560% | 5.684e-14 |
What this tool does
- Evaluate a project: paste the cash flow per period (a negative first value for the investment) and read the IRR to decide whether it is worth doing.
- Compare investment decisions: when the IRR is above your cost of capital the NPV is positive, so looking at both together is safer than the IRR alone.
- Work out the payback: see both the simple and the discounted payback period, the latter being the more conservative and realistic figure.
- Write a business plan or finish an assignment: the discounted schedule, MIRR, profitability index and the NPV-versus-rate curve are all generated at once.
Example
Input
-1000 300 420 680 (discount rate 10%)
Output
Internal rate of return (IRR) 16.34% Net present value (NPV) 130.73 Payback period (periods) 2.41 Discounted payback (periods) 2.74 Profitability index (PI) 1.13 Modified IRR (MIRR) 14.60%
Discounted schedule: period 0 has 1,000.00 with a present value of -1,000.00, period 1 has 300.00 worth 272.73, period 2 has 420.00 worth 347.11 and period 3 has 680.00 worth 510.89. Cumulative present value moves from -1,000.00 to 130.73, which puts the discounted payback inside period 3.
Frequently asked questions
Why does it sometimes find more than one IRR?
When the cash flow changes sign several times (invest, top up, then recover) the NPV curve can cross zero more than once, so mathematically several IRRs exist. The tool scans every sign change and lists all the roots with a warning; in that case rely on the NPV as the deciding figure.
What does "no real solution" mean?
Two common cases: every cash flow has the same sign (no initial investment or nothing recovered), so the IRR is undefined; or the NPV never changes sign across the scanned range, so no real IRR exists. Fall back on the MIRR or simply judge with the NPV.
How is MIRR different from IRR?
IRR implicitly assumes every interim cash flow is reinvested at the IRR itself, which is rarely realistic. MIRR compounds positive flows to the end at the reinvestment rate and discounts negative flows to the start at the finance rate, then annualises the result, so it is usually more conservative and closer to reality.
Why is the payback period not a whole number?
It is interpolated linearly between the two periods where cumulative cash flow crosses from negative to positive. If 280 is still outstanding at the end of period 2 and period 3 brings in 680, the payback is 2 + 280/680 ≈ 2.41 periods. The discounted payback uses discounted cumulative value, so it is always at least as long as the simple one.
How do I enter the cash flow, and how many periods are supported?
One number per line; commas, semicolons and tabs also work as separators, and a minus sign marks an outflow. At least 2 and at most 2000 periods are accepted, and anything non-numeric raises an error. Everything is computed locally in your browser and never uploaded.
Keywords:irrnpvinternal rate of returnnet present valuepayback periodmirr内部收益率净现值投资回收期折现盈亏指数