↑↓ to move ↵ to open Esc to close Browse all tools

NPV and IRR Calculator

Enter a project’s cash flows year by year and a discount rate to see what it is worth today, the rate it really earns and how the answer changes with the rate.

Embed

Your cash flows

% / year Your required return or cost of capital: what the money could earn elsewhere at similar risk.
Cash flow per year Year 0 is today, usually the investment as a negative number. Later years count at year end: money in is positive, money out negative.
Net present value at 10%
$8,307.12

Internal rate of return (IRR)
15.95%

Profitability index
-
MIRR at 10%
-
Discounted payback
-
Cash flows added up
-

NPV profile

NPV at each rateIRRYour rate

Year by year

YearCash flowDiscount factorPresent valueCumulative PV

Estimates only, not financial advice. Runs on your device. Nothing you enter is sent to a server.

Free printablePrintable Savings TrackerColor in your progress toward a savings goal, on paper or in Excel.

NPV and IRR Calculator by Freebiefy, free online tools · Privacy · Legal notice

Embed this tool on your site

Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content. All tools you can embed

What NPV and IRR tell you

A dollar today is worth more than a dollar in five years, because today’s dollar could be invested in the meantime. Net present value (NPV) puts every cash flow of an investment project on the same footing: it discounts each future amount back to today at your discount rate and adds them up, including the money you pay up front. The result is the value the project adds, in today’s money, after earning the return you require.

The internal rate of return (IRR) turns the question around. Instead of asking what the project is worth at a given rate, it asks which rate makes the NPV exactly zero. That is the yearly return the project earns on the money tied up in it. For a typical project, with the investment first and the returns after, the NPV is positive exactly when the IRR is higher than your discount rate.

Net present value
CF0 + CF1 ÷ (1 + r) + CF2 ÷ (1 + r)2 + … + CFn ÷ (1 + r)n
Internal rate of return
The rate r at which NPV = 0
Profitability index
PV of years 1 to n ÷ investment in year 0

Here CFt is the cash flow in year t and r is the discount rate as a decimal, so 10% is 0.10. Year 0 is today and is not discounted. Each later cash flow is treated as arriving at the end of its year. The factor 1 ÷ (1 + r)t is the discount factor: what one dollar received in year t is worth today.

A worked example

A small business considers a machine that costs $50,000.00 and should bring in extra cash for five years. With a discount rate of 10%, the present values look like this:

YearCash flowDiscount factorPresent value
0−$50,000.001.0000−$50,000.00
1$12,000.000.9091$10,909.09
2$15,000.000.8264$12,396.69
3$17,000.000.7513$12,772.35
4$18,000.000.6830$12,294.24
5$16,000.000.6209$9,934.74
NPV$28,000.00$8,307.12

The cash flows add up to $28,000.00 more than the machine costs, but in today’s money the gain is $8,307.12. The NPV is positive, so the machine earns more than 10% a year. Its IRR is 15.95%, and the profitability index of 1.17 means every dollar invested comes back as $1.17 in present value. These are the numbers the calculator shows when you open it.

NPV in Excel: the common mistake

Excel’s NPV function does not work like the formula above. According to Microsoft, its values must be equally spaced and occur at the end of each period, and if the first cash flow happens at the beginning of the first period, it has to be added to the NPV result instead of being included in the values. In other words, =NPV(rate, values) discounts the very first value by a full period.

Put the year 0 investment inside the range and every cash flow is discounted one year too many. Microsoft’s own example uses an 8% rate, an investment of −US$40,000.00 and five yearly returns. The correct =NPV(8%, year 1 to year 5) + year 0 gives US$1,922.06. Including year 0 in the range gives US$1,779.69, which is the right answer divided by 1.08. For the machine above the wrong version shows $7,551.93 instead of $8,307.12.

  • Right: =NPV(10%, B3:B7) + B2, with year 0 in B2 and years 1 to 5 below it.
  • Wrong: =NPV(10%, B2:B7), which only works if your first cash flow really comes one year from now.
  • IRR is safe: =IRR(B2:B7) includes year 0 as it should. Shifting every cash flow by a year does not change the rate at which NPV is zero.
  • Irregular dates: XNPV takes a date for each payment. Microsoft describes it as the NPV for a schedule of cash flows that is not necessarily periodic, with the first payment at the start and the rest discounted on a 365-day year.

Excel’s IRR also searches from a starting guess, 10% unless you give one, and returns a #NUM! error if it finds no result after 20 tries. This calculator scans the whole range from −99% to 100,000% instead, so it finds every IRR or tells you that there is none.

When IRR misleads

  • No IRR. If all cash flows have the same sign, no rate can make the NPV zero. Some mixed patterns have no IRR either, because the NPV stays above or below zero at every rate.
  • Several IRRs. Each time the cash flows switch between negative and positive, the NPV can cross zero once more. The flows −$1,600.00, $10,000.00, −$10,000.00 have two IRRs, 25.00% and 400.00%, yet at a 10% discount rate the NPV is −$773.55. Quoting either IRR as the return would be misleading.
  • Size and length. A 40% return on $1,000.00 adds less value than 15% on $100,000.00. When you choose between projects, compare their NPVs.
  • Reinvestment. The modified IRR (MIRR) avoids the multiple-IRR problem: it discounts the outflows to today at a finance rate, grows the inflows to the final year at a reinvestment rate, and finds the single rate that links the two. This calculator uses your discount rate for both, which matches =MIRR(values, rate, rate) in Excel. For the machine that gives 13.43%.

Tips for better estimates

  • Use cash, not accounting profit. Depreciation is not a cash flow; the purchase price and later repairs are.
  • Include what you get back at the end, like the resale value of equipment, and what you pay at the end, like cleanup or decommissioning costs.
  • Count only the extra cash the project causes. Costs you pay anyway do not belong in the list.
  • Keep inflation consistent. Either estimate cash flows in future dollars and use a normal rate, or estimate them in today’s dollars and use a rate without inflation.
  • Check the NPV profile. If a small change in the discount rate flips the NPV from positive to negative, the decision depends on a number you should look at twice.

To see how long it takes to earn the investment back, use the payback period calculator. For a single amount in and a single amount out, the ROI calculator gives the return and the CAGR calculator the yearly growth rate, which equals the IRR in that simple case.

How to use the NPV and IRR calculator

  1. 1Enter your discount rate per year and pick your currency.
  2. 2Enter the cash flow for each year, starting with year 0, the investment today, as a negative number. Add or remove years, or paste a column of values from a spreadsheet.
  3. 3Read the NPV and the IRR, then check the profitability index, the MIRR, the NPV profile and the year-by-year table. Copy the result, the table as CSV or a link.

Frequently asked questions

What is a good NPV?

Any NPV above zero, as long as the discount rate is right. A positive NPV means the cash flows are worth more than they cost in today’s money after earning your required return, so the project adds value. An NPV of zero means it earns exactly that return. A negative NPV means you would do better with the alternative the discount rate stands for.

Why does Excel’s NPV function give a different answer?

Excel’s NPV treats the first value in the list as a cash flow at the end of the first period, so it discounts it by a full year. If you include the year 0 investment in the range, everything is discounted one year too many and the result is too small by a factor of 1 + rate. Use =NPV(rate, year 1 to the last year) + year 0 instead. This calculator follows that correct setup.

Can a project have more than one IRR?

Yes. When the cash flows change from negative to positive and back again, for example a mine with a big cleanup cost at the end, NPV can cross zero more than once. Each crossing is an IRR, and none of them alone tells you whether the project is good. The number of IRRs is never more than the number of sign changes. In that case, judge the project by its NPV at your discount rate, or by the MIRR.

What discount rate should I use?

The return you could earn elsewhere on money with similar risk. A company can use its cost of capital, the blended cost of its debt and equity, and add a margin for riskier projects. For a personal investment, it can be the return of the alternative you would choose instead, such as paying off a loan or an index fund. Try a few rates: the NPV profile chart shows how sensitive the answer is.

NPV or IRR: which one should I trust?

For a single project with an outflow first and inflows after, they agree: NPV is positive exactly when the IRR is above the discount rate. When you compare projects of different sizes or lengths, or the cash flows change sign more than once, they can disagree. Then NPV is the better guide, because it measures the value added in money, while IRR is a percentage that ignores the size of the project.

What is the profitability index?

The present value of the cash flows from year 1 on, divided by the initial investment in year 0. A PI above 1 means a positive NPV. It is useful when your budget is limited, because it shows the value created per dollar invested, so you can rank several projects that you cannot all afford.

Can I use monthly or quarterly cash flows?

Yes. Treat each row as one period and enter the discount rate per period, for example a monthly rate for monthly flows. The IRR is then a rate per period too. To turn a monthly IRR into a yearly one, compute (1 + monthly IRR)^12 − 1. For payments on irregular dates, use XNPV and XIRR in a spreadsheet.