Skip to content

NPV & IRR Calculator

Net present value, IRR, XNPV and XIRR for any cash flows, matching Excel’s NPV and IRR functions, with payback, profitability index and a rate sensitivity table.

Calculator Details

Net present value (NPV):$1,922.06See results ↓

First the initial investment as a negative number, then each period’s cash flow, separated by commas, spaces or new lines

Your required return or cost of capital, per period (per year with dates)

Today (Excel NPV of the later flows + the first) or at the end of period 1 (Excel NPV of every value)

Your Results

Net present value (NPV): $1,922.06

Net present value (NPV)

$1,922.06

At a 8% discount rate per period

Internal rate of return (IRR)

9.63%

Rate per period where NPV = 0

Profitability index

1.0481

PV of inflows ÷ PV of outflows

Payback period

4.06 periods

Cumulative cash flow turns positive

Discounted payback

4.81 periods

Using discounted cash flows

Net cash flow

$13,700.00

All cash flows added up, undiscounted

Excel NPV of every value

$1,779.69

=NPV(rate, CF0…CFn): first flow one period away

At a 8% discount rate the net present value is $1,922.06, so the project adds value compared with earning 8% elsewhere. Its internal rate of return is 9.63% per period.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Present value of inflows vs outflows

Present value of inflows vs outflows

How This Calculator Works

How NPV and IRR are calculated

NPV = Σ CFt ÷ (1 + r)t for t = 0…5. The first cash flow is today and is not discounted: Excel =NPV(rate, CF1…CFn) + CF0. IRR is the rate r where NPV = 0 (found by Newton’s method, then bisection).

With your numbers: −$40,000.00 × 1.000000 + $8,000.00 × 0.925926 + … = $1,922.06, where each factor is 1 ÷ (1 + 8%)t.

Inflows are worth $41,922.06 today and outflows $40,000.00, so the profitability index is 1.0481.

Cash flow breakdown

Each cash flow, its discount factor and present value
PeriodCash flowDiscount factorPresent valueCumulative PV
0−$40,000.001.000000−$40,000.00−$40,000.00
1$8,000.000.925926$7,407.41−$32,592.59
2$9,200.000.857339$7,887.52−$24,705.08
3$10,000.000.793832$7,938.32−$16,766.75
4$12,000.000.735030$8,820.36−$7,946.39
5$14,500.000.680583$9,868.46$1,922.06

NPV at other discount rates

Net present value at a range of discount rates
Discount rateNPV
0.00%$13,700.00
2.00%$10,328.36
4.00%$7,263.78
6.00%$4,471.70
8.00%$1,922.06
10.00%−$411.30 (negative)
12.00%−$2,551.25 (negative)
14.00%−$4,517.83 (negative)
16.00%−$6,328.64 (negative)
18.00%−$7,999.18 (negative)
20.00%−$9,543.15 (negative)

The NPV falls as the rate rises and crosses zero at the IRR (9.63%).

Frequently Asked Questions

What is net present value (NPV)?

NPV is the value today of every cash flow in a project, after discounting each one at your required rate of return. A positive NPV means the project earns more than that rate; a negative NPV means you would do better earning the discount rate elsewhere. NPV = CF0 + CF1 ÷ (1 + r) + CF2 ÷ (1 + r)² + … with CF0 the initial investment as a negative number.

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

Excel’s NPV function treats the first value in its list as arriving one period from now and discounts it. Most projects pay the initial investment today, so the usual spreadsheet formula is =NPV(rate, CF1:CFn) + CF0, which is what this calculator shows by default. Choose “End of period 1” under First cash flow to get the number Excel returns when you pass every value to NPV. Both figures are shown in the breakdown.

What is the internal rate of return (IRR)?

The IRR is the discount rate at which the NPV is exactly zero. If your required return is below the IRR, the NPV is positive. The calculator finds it the way Excel does: Newton’s method starting from a guess (10% by default), with a bisection search as a fallback. The IRR is per period, so with monthly cash flows multiply by 12 for a nominal yearly rate or use (1 + IRR)¹² − 1 for the effective rate.

Can a project have more than one IRR, or none?

Yes. When the cash flows change sign more than once (for example an investment, years of income, then a large clean-up cost), the NPV can cross zero at several rates, and each one is an IRR. The calculator reports the one nearest your starting guess and tells you how many sign changes it found. If every cash flow has the same sign there is no IRR at all, and Excel returns #NUM!. In those cases rely on NPV.

When should I use XNPV and XIRR?

When the cash flows don’t arrive at equal intervals. Enter one date per cash flow under Advanced options and the calculator switches to Excel’s XNPV and XIRR: each cash flow is discounted by (1 + rate) raised to the number of days since the first date divided by 365. The rate is then a yearly rate, and the first date is the starting point.

What discount rate should I use?

Use the return you could earn on an investment of similar risk, or your cost of capital: a business often uses its weighted average cost of capital; an individual might use the return they expect from a diversified portfolio, or the interest rate on debt they could repay instead. The rate sensitivity table shows how the NPV changes across rates, which matters more than picking one exact figure.

What are the payback period and discounted payback?

The payback period is how long it takes for the cumulative cash flow to turn positive, interpolated within the period in which it happens. Discounted payback does the same with the discounted cash flows, so it is always longer when the rate is above zero. Neither counts the cash flows after the payback point, which is why NPV is the better guide to value.

What does the profitability index mean?

The profitability index is the present value of the inflows divided by the present value of the outflows. Above 1 means the project returns more than it costs in today’s money (the same as a positive NPV); it helps rank projects of different sizes when capital is limited.

NPV, IRR, XNPV and XIRR follow Microsoft Excel’s published definitions (dated cash flows use a 365-day year by default; Actual/360 and Actual/Actual are options under Advanced). Rates are per period for equal periods and per year with dates. The calculator doesn’t model taxes, inflation, financing or the reinvestment rate (MIRR), and with several sign changes it reports only the IRR nearest your guess. It is an estimate, not investment advice.

NPV Calculator: Net Present Value, IRR, XNPV and XIRR Explained

By FindMySum · Last reviewed

This NPV calculator answers a simple question about any investment with uneven cash flows: is it worth more than it costs, once you account for the time value of money? You type the cash flows, starting with the amount you invest, choose a discount rate, and it returns the net present value, the internal rate of return, the profitability index and the payback period. It follows the same definitions as the NPV, IRR, XNPV and XIRR functions in Microsoft Excel, so you can check the result in a spreadsheet.

What net present value measures

A dollar received in five years is worth less than a dollar today, because today's dollar could be invested in the meantime. Discounting reverses that growth: a cash flow of CF received t periods from now is worth CF ÷ (1 + r)ᵗ today, where r is the rate you could earn elsewhere on an investment of similar risk. Net present value adds up every discounted cash flow, the initial investment included:

NPV = CF₀ + CF₁ ÷ (1 + r) + CF₂ ÷ (1 + r)² + … + CFₙ ÷ (1 + r)ⁿ

A positive NPV means the project returns more than r, by that many dollars in today's money. A negative NPV means you would be better off earning r somewhere else. An NPV of exactly zero means the project earns exactly r, and the rate at which that happens is the internal rate of return.

The Excel NPV trap

The most common spreadsheet mistake with NPV comes from how Excel's function is defined. Excel's NPV treats the first value you pass as arriving at the end of period 1 and discounts it. If you write =NPV(8%, B1:B6) with the initial investment in B1, Excel discounts the investment by one year, as if you paid it a year from now. Microsoft's own help page shows both uses: its first example deliberately discounts an investment made one year from today, and its second example keeps the initial cost outside the function as =NPV(rate, returns) + initial cost.

The calculator's "First cash flow" setting covers both. "Today" (the default) is the second pattern, which is what most people mean. "End of period 1" reproduces Excel's NPV function applied to every value. The results panel always shows the other convention too, so if your spreadsheet disagrees with a colleague's you can see which one each of you used. The IRR is the same under both settings, because shifting every cash flow by one period doesn't change the rate at which their present values sum to zero.

How the IRR is found

There is no formula for the IRR of more than a few cash flows, so it has to be found by searching. The calculator does what Excel does: it starts at a guess (10% unless you change it) and applies Newton's method, which uses the slope of the NPV curve to jump towards the rate where the NPV is zero. If that doesn't settle, it scans rates from −99% upwards for a point where the NPV changes sign and narrows the interval by bisection.

Two situations need care. If every cash flow has the same sign there is no IRR, and the calculator says so instead of inventing one. If the cash flows change sign more than once, for example an investment followed by income and then a large cost at the end, the NPV curve can cross zero at more than one rate. The calculator reports the number of sign changes, returns the IRR nearest your guess, and lets you move the guess to look for others. In those cases the IRR is not a reliable guide on its own and the NPV at your chosen rate is the figure to rely on.

Dated cash flows: XNPV and XIRR

Real cash flows rarely arrive on neat anniversaries. Under the advanced options you can give a date for every cash flow, written as YYYY-MM-DD. The calculator then uses Excel's XNPV definition: each cash flow is discounted by (1 + r) raised to the number of days since the first date divided by 365, and the first date is the starting point. That Actual/365 day count is the default; the advanced options also offer Actual/360, the money-market convention, and Actual/Actual (ISDA), which divides the days that fall in a leap year by 366. The discount rate and the resulting XIRR are yearly rates. Microsoft's example of an investment of $10,000 on January 1, 2008, followed by four irregular payments, has an XNPV of $2,086.65 at 9% and an XIRR of about 37.34%; you can type those dates and amounts in to see the same figures.

Worked example with the default inputs

The calculator opens with Microsoft's second NPV example: an investment of $40,000 today returning $8,000, $9,200, $10,000, $12,000 and $14,500 over the next five years, discounted at 8%.

YearCash flowDiscount factor at 8%Present value
0−$40,0001.000000−$40,000.00
1$8,0000.925926$7,407.41
2$9,2000.857339$7,887.52
3$10,0000.793832$7,938.32
4$12,0000.735030$8,820.36
5$14,5000.680583$9,868.46

The present values of the returns add up to $41,922.06, so the NPV is $41,922.06 − $40,000 = $1,922.06, the figure on Microsoft's help page. The profitability index is $41,922.06 ÷ $40,000 = 1.0481. Passing all six values to Excel's NPV function instead would give $1,779.69, because the $40,000 would be discounted by a year.

The IRR is 9.63%: at that rate the present value of the returns is exactly $40,000. Since 9.63% is above the 8% discount rate, the NPV is positive. The rate sensitivity table confirms it: the NPV is $4,471.70 at 6%, $1,922.06 at 8% and −$411.30 at 10%, crossing zero between the last two.

Undiscounted, the cash flows recover the $40,000 after 4.06 years: $39,200 has come back by the end of year 4, and the remaining $800 is 800 ÷ 14,500 = 0.06 of year 5. With discounted cash flows the payback takes 4.81 years. If you raise the discount rate to 12%, the NPV becomes −$2,551.25 and the discounted payback never arrives within the five years, which is what a negative NPV means in practice.

What the calculator leaves out

The cash flows are taken as given: the calculator doesn't add taxes, inflation, financing costs or the value of options to delay or abandon a project. It uses one discount rate for every period. It doesn't compute the modified IRR (MIRR), which assumes reinvestment at a rate you choose rather than at the IRR. Treat the result as a way to compare options at a consistent rate, not as a forecast. For the value of a level stream of payments, the present value calculator solves the annuity equation directly, and the ROI calculator gives a simpler return figure when timing matters less.

More questions

Should I enter the initial investment as a negative number?

Yes. Money that leaves your pocket (the purchase price, a renovation, a later clean-up cost) is negative and money that comes back is positive. The calculator needs at least one of each to find an IRR. If you type every amount as positive, it will report a large positive NPV and no IRR, which is a sign the signs are wrong.

Can I use monthly cash flows?

Yes. Enter one value per month and use a monthly discount rate, such as 8% ÷ 12 = 0.667% for a nominal 8% a year. The IRR is then a monthly rate too; (1 + monthly IRR)¹² − 1 converts it to an effective yearly rate. Alternatively enter a date for every cash flow and the calculator switches to XNPV and XIRR with a yearly rate.

Why can the IRR and NPV rank two projects differently?

NPV measures value in dollars at your discount rate, while IRR is a percentage that ignores the size of the project and assumes cash can be reinvested at the IRR itself. A small project can have a higher IRR but add fewer dollars than a large one. When the two disagree, finance textbooks and most corporate finance teams follow NPV.

What happens if a cash flow is zero?

Type 0 for that period so the later cash flows keep their correct position in time. Leaving a period out entirely shifts every later cash flow one period earlier, which raises its present value and makes the project look better than it is.

How precise is the IRR?

The search stops when the rate changes by less than one part in a trillion between steps, then the result is rounded to six decimal places of a percent. That is more precise than Excel's display, which typically shows the IRR to one or two decimals, so small differences in the last digits are rounding only.

Does the calculator handle a discount rate that changes over time?

No, it uses one rate for every period. To use different rates, discount each period's cash flow yourself with the product of the yearly factors, or split the project into stages and value each stage separately.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy