NinjaFunction (Ninja Function) logo

NPV & IRR Calculator

Net present value, internal rate of return, payback and discounted payback for a list of cash flows. Free.


Start with the investment as a negative number (year 0), then the cash you expect each year. Lines or commas both work.

Net present value (NPV)
388.77
Internal rate of return (IRR)
24.89%
Payback period
2.60 years
Discounted payback
3.05 years
Periods counted
4

At this rate the project adds value: the cash it returns is worth more than it costs.

About This Tool

NinjaFunction's NPV and IRR Calculator helps you judge a project or investment. Enter a discount rate and a list of cash flows, starting with the investment, and see the net present value, the internal rate of return, the payback period and the discounted payback period. It runs in your browser and stores nothing.

🔑 How to Use

  1. Enter the discount rate, as a percentage per year.
  2. Type the cash flows, one per line. Start with the investment as a negative number.
  3. Read the NPV and the one-line verdict.
  4. Check the IRR and both payback figures to see how fast and how strongly it returns.

💡 Pro Tips

  • ✔ Test several discount rates. A project with a positive NPV at 8% may turn negative at 15%.
  • ✔ Be careful with the forecasts. The answer is only as good as the cash flows you guess.
  • ✔ Put costs and income in the same period units, for example all in years.
  • ✔ For a single start and end value, the CAGR Calculator or ROI Calculator is simpler.

A Worked Example

YearCash flowValue at 10%
0−1,000−1,000.00
1300272.73
2400330.58
3500375.66
4600409.81
Total (NPV)388.77

Reading the Results

With a 10% discount rate, the example has an NPV of 388.77. The cash it brings back is worth about 389 more than the 1,000 invested, so it clears the 10% hurdle with room to spare. The IRR is about 24.9%, meaning the project itself earns roughly that each year. Simple payback is 2.6 years (the first three years return 1,200 against 1,000), and discounted payback is about 3.05 years.

NPV or IRR: Which One?

  • NPV tells you how much value a project adds in money, which is what you actually want to maximise.
  • IRR tells you how efficient it is as a percentage, which is easy to compare with a required rate.
  • If they disagree when ranking projects, trust NPV. IRR can favour a small project that returns fast over a bigger one that adds more money.
  • IRR assumes cash can be reinvested at the same rate, which is often too hopeful.

Common Mistakes

  • Forgetting the investment is a negative number in year 0.
  • Mixing yearly rates with monthly cash flows.
  • Counting profit instead of cash. Depreciation is not a cash flow.
  • Using one optimistic forecast. Run a pessimistic case too.
  • Ignoring tax, inflation and the cost of money tied up in stock.

Frequently Asked Questions

What is NPV?

Net present value is today's value of all the cash a project will bring in, minus what it costs. Future cash is worth less than cash today, so each amount is discounted by the rate you choose. A positive NPV means the project earns more than that rate.

What is IRR?

The internal rate of return is the discount rate at which the NPV becomes exactly zero. In plain terms, it is the yearly return the project itself delivers. If it is above your required rate, the project looks worthwhile.

What discount rate should I use?

Use the return you could get elsewhere for the same risk. Many companies use their cost of capital. For a personal decision, you might use what a safe investment pays plus an allowance for risk.

Why does the tool say there is no IRR?

IRR needs at least one outflow (negative) and one inflow (positive). If every cash flow has the same sign, or the numbers do not cross zero within a sensible range, there is no solution. Some patterns, such as several sign changes, can also have more than one.

What is the difference between payback and discounted payback?

Payback counts how long until the plain cash received covers the investment. Discounted payback does the same after discounting each year's cash, so it is always longer.

How do I enter the cash flows?

Put the first line as the investment, as a negative number, for year 0. Each following line is the cash you expect in the next year. Commas or new lines both work.

Always FreeAll tools are 100% free to use.
No Sign UpNo registration or login required.
Blazing FastInstant results, always.