Skip to content

NPV and IRR calculator with worked example

NPV adds every cash flow discounted to today; the IRR is the rate at which the NPV is zero. Paying 50,000 now for 12,000, 15,000, 18,000, 18,000 and 10,000 over the next five years gives an NPV of 8,296.54 at 8% a year, an IRR of 14.06% and a payback of 3.28 years.

Calculator

Your required return or cost of capital; 8 means 8%. A period is usually a year.

Cash flows, one per period (money paid out is negative)
MIRR rates (optional)

Leave a field empty to use the discount rate.

Rate at which the outflows are discounted to today.

Rate at which the inflows earn interest until the last period.

8,296.54NPV at 8.00%

At 8.00% per period, what comes in is worth 8,296.54 more today than what goes out.

IRR 14.06% per period, above the discount rate of 8.00%.

  • MIRR: 11.37% per period (finance rate 8.00%, reinvestment rate 8.00%)
  • Profitability index: 1.1659
  • Payback: 3.28 periods (recovered during period 4)
  • Discounted payback: 3.89 periods (recovered during period 4)
Cash flows by period at 8.00%
PeriodCash flowDiscount factorPresent valueCumulativeCumulative PV
0−50,000.001.0−50,000.00−50,000.00−50,000.00
112,000.000.92592611,111.11−38,000.00−38,888.89
215,000.000.85733912,860.08−23,000.00−26,028.81
318,000.000.79383214,288.98−5,000.00−11,739.83
418,000.000.7350313,230.5413,000.001,490.71
510,000.000.6805836,805.8323,000.008,296.54
NPV profile from 0% to 18% per period. NPV at the discount rate of 8.00%: 8,296.54. The line crosses zero at 14.06%.010,00020,0000%5%10%15%Discount rate per periodYour rate 8.0%IRR 14.1%
NPV at each discount rate
Chart as a table
NPV profile
Discount rateNPV
0.0%23,000.00
1.8%19,230.94
3.6%15,751.31
5.4%12,533.12
7.2%9,551.57
9.0%6,784.64
10.8%4,212.77
12.6%1,818.46
14.4%−413.87
16.2%−2,498.21
18.0%−4,447.09

How it is calculated

  1. CF0(−50,000.00) (now, not discounted) = −50,000.00
  2. CF112,000.00 ÷ 1.081 = 11,111.11
  3. CF215,000.00 ÷ 1.082 = 12,860.08
  4. CF318,000.00 ÷ 1.083 = 14,288.98
  5. CF418,000.00 ÷ 1.084 = 13,230.54
  6. CF510,000.00 ÷ 1.085 = 6,805.83
  7. NPVSum of the present values at 8.00% per period = 8,296.54
  8. IRR (numerical search)The rate per period at which the NPV of the same flows is 0 = 14.0567%
  9. Outflows discounted to today at the finance rate (8.00%)50,000.00 = 50,000.00
  10. Inflows compounded to period 5 at the reinvestment rate (8.00%)12,000.00 × 1.084 + 15,000.00 × 1.083 + 18,000.00 × 1.082 + … (5 terms) = 85,656.75
  11. MIRR(85,656.75 ÷ 50,000.00)1/5 − 1 = 11.3675%
  12. Profitability indexPV of inflows ÷ PV of outflows = 58,296.54 ÷ 50,000.00 = 1.1659
  13. Payback3 + 5,000.00 still to recover ÷ 18,000.00 in period 4 = 3.28 periods
  14. Discounted payback at 8.00%3 + 11,739.83 still to recover ÷ 13,230.54 in period 4 = 3.89 periods

BA II Plus and HP 12C keystrokes for these cash flows

Key facts

  • NPV = Σ CFt ÷ (1 + r)^t, with CF0 not discounted: a positive NPV means the cash flows earn more than the discount rate r.
  • The IRR is the rate at which the NPV is zero. Flows that change sign more than once can have several: −1,000, +2,300 and −1,320 have IRRs of 10.00% and 20.00%.
  • MIRR = (inflows compounded at the reinvestment rate ÷ outflows discounted at the finance rate)^(1/n) − 1, and it always has exactly one value.
  • Payback is the time until the running total of the cash flows reaches zero; discounted payback does the same with present values. Both ignore the flows after that date.
  • Excel’s NPV function treats its first value as one period away, so the cash flow now (CF0) is added outside the function.

How is the result calculated?

Net present value. Each cash flow is discounted to today with the factor 1/(1+r)t1/(1+r)^t, where rr is the discount rate per period and tt the period, and the present values are added. CF0 happens now and is not discounted (Texas Instruments, NPV definition and calculation) (NYU Stern, time value of money (secondary source)):

NPV=∑t=0nCFt(1+r)tNPV = \sum_{t=0}^{n}\frac{CF_t}{(1+r)^t}

Internal rate of return. The IRR is the rate at which the NPV is zero. In general there is no formula for it, so the calculator tries rates between −99% and 1,000% per period, notes every rate at which the NPV changes sign and narrows each one down. Flows that change sign more than once – a later outlay, a clean-up cost – can have more than one IRR (NIST Handbook 135, AIRR and payback) (HP, HP 12C user's guide). The BA II Plus then shows the one closest to zero (Texas Instruments, BA II Plus guidebook); the calculator lists all of them.

Modified internal rate of return. The IRR in effect assumes that money received along the way earns the IRR itself (NIST Handbook 135, AIRR and payback). The MIRR replaces that with two rates you set: the outflows are discounted to today at a finance rate, the inflows compounded to the last period at a reinvestment rate (Microsoft, Excel MIRR function). With ff the finance rate, gg the reinvestment rate and nn the last period:

MIRR=(∑CFt>0CFt (1+g) n−t∑CFt<0∣CFt∣ / (1+f)t)1/n−1MIRR = \left(\frac{\sum_{CF_t>0} CF_t\,(1+g)^{\,n-t}}{\sum_{CF_t<0} |CF_t| \,/\, (1+f)^{t}}\right)^{1/n} - 1

It needs at least one outflow and one inflow and always has exactly one value. Leave both rates empty and they equal the discount rate; the MIRR is then (1+r) PI1/n−1(1+r)\,PI^{1/n} - 1, the adjusted internal rate of return of NIST Handbook 135 (NIST Handbook 135, AIRR and payback), where the profitability index PIPI is the present value of the inflows divided by that of the outflows. A PI above 1 goes with a positive NPV.

Payback. The cash flows are added up period by period until the running total turns from negative to zero or more. The share of that period needed is the amount still to recover divided by the period’s flow, as if it arrived evenly. Discounted payback does the same with the present values (NIST Handbook 135, AIRR and payback). If a later outflow pushes the total below zero again, the calculator takes the last time it turns and says so.

Worked example

1. An outlay now, five uneven returns

You pay 50,000 now and receive 12,000, 15,000, 18,000, 18,000 and 10,000 at the ends of the next five years. At 8% a year:

NPV=−50,000+12,0001.08+15,0001.082+18,0001.083+18,0001.084+10,0001.085≈8,296.54NPV = -50{,}000 + \frac{12{,}000}{1.08} + \frac{15{,}000}{1.08^2} + \frac{18{,}000}{1.08^3} + \frac{18{,}000}{1.08^4} + \frac{10{,}000}{1.08^5} \approx 8{,}296.54

The returns are worth 58,296.54 today, 8,296.54 more than the outlay, so the flows earn more than 8% a year. The IRR is 14.06%; the MIRR, with both rates at 8%, is 11.37%, and the profitability index is 1.1659. The running total of the flows is −5,000 after year three and turns positive in year four: payback after 3.28 years. Counting present values instead, it takes 3.89 years.

2. Two IRRs when a cost comes at the end

A project costs 1,000 now, brings in 2,300 after one year and needs 1,320 for clean-up after two. Setting the NPV to zero and multiplying by (1+r)2(1+r)^2 gives a quadratic:

−1,000 (1+r)2+2,300 (1+r)−1,320=0⇒1+r=1.1 or 1.2-1{,}000\,(1+r)^2 + 2{,}300\,(1+r) - 1{,}320 = 0 \quad\Rightarrow\quad 1+r = 1.1 \ \text{or}\ 1.2

So the NPV is zero at both 10.00% and 20.00%. It is positive only between them: 1.89 at 15%, but −2.06 at 8%. “Accept if the IRR is above the hurdle rate” gives no clear answer here; the NPV at your rate does. The MIRR at 8% is 7.95%, just below 8%, which agrees with the small negative NPV.

3. MIRR with a finance rate and a reinvestment rate

Microsoft uses these flows to show its MIRR function: −120,000 now, then 39,000, 30,000, 21,000, 37,000 and 46,000, with a finance rate of 10% and a reinvestment rate of 12% (Microsoft, Excel MIRR function). The only outflow is now, so its present value is 120,000. The inflows grow at 12% until year five:

MIRR=(39,000×1.124+30,000×1.123+21,000×1.122+37,000×1.12+46,000120,000)1/5−1≈12.61%MIRR = \left(\frac{39{,}000 \times 1.12^4 + 30{,}000 \times 1.12^3 + 21{,}000 \times 1.12^2 + 37{,}000 \times 1.12 + 46{,}000}{120{,}000}\right)^{1/5} - 1 \approx 12.61\%

The sum in the numerator is 217,297.50. Microsoft’s example shows the result rounded to 13%. The IRR of the same flows is 13.07%: higher, because it assumes the inflows earn 13.07% rather than 12% once they are received.

What do the results mean for you?

A positive NPV at your discount rate means the cash flows more than repay that rate; a negative one means they fall short. The IRR tells you the break-even rate, which is handy to compare with a hurdle rate – but only for a plain outlay followed by returns. Payback answers a different question: how long your money is tied up, not whether the investment is worth it. It ignores everything after the payback date (NIST Handbook 135, AIRR and payback).

The same arithmetic works for a personal decision such as a course or a qualification. CF0 is what you pay now, fees and any pay you give up; the later flows are the extra income after tax that you expect. We do not put salary figures into this calculator: use your own estimates, try a cautious version as well, and see the guide on whether the CFA® Program is worth it for what public pay data can and cannot tell you.

Which measure answers which question?
MeasureQuestion it answersWatch out for
NPVHow much more (or less) than your required return do the flows bring, in today’s money?Depends on the rate you choose; try a higher and a lower one
IRRAt what rate per period do the flows just break even?Several answers or none when the flows change sign more than once
MIRRWhat return per period do the flows give if money earns the reinvestment rate?Depends on the finance and reinvestment rates you enter
Profitability indexHow much present value comes back for each unit paid out?Says nothing about the size of the investment
PaybackWhen is the money paid out recovered?Ignores the time value of money and every flow after that date
Discounted paybackWhen is it recovered in today’s money?Also ignores the flows after that date

What should you check before trusting an NPV?

  1. The flows are the extra cash the decision causes, after tax – not profit and not costs already spent.
  2. The rate is per period and matches the spacing of the flows: a yearly rate for yearly flows.
  3. Money paid out is negative, money received positive, and CF0 is the amount now.
  4. The NPV profile crosses zero once; if it crosses more often, rely on the NPV, not the IRR.
  5. The answer still holds when you move the discount rate up and down by a couple of points.

Which NPV and IRR mistakes are common?

  • CF0 inside a spreadsheet’s NPV function. Excel’s NPV treats its first value as arriving one period from now, so the cash flow now must be added outside the function (Microsoft, Excel NPV function). With all six flows of the first example inside the function the result is 7,681.98 instead of 8,296.54.
  • A yearly rate for monthly flows. The rate must be per period; for monthly flows use the monthly rate.
  • Ranking by IRR alone. A small project can have a higher IRR and a lower NPV than a large one. NIST advises against using the adjusted rate of return to choose between mutually exclusive alternatives, and payback should not be used for that either (NIST Handbook 135, AIRR and payback).
  • Trusting a single IRR from the calculator. With more than one sign change, a calculator shows one IRR even when there are several – the BA II Plus the one closest to zero (Texas Instruments, BA II Plus guidebook); check the NPV profile.
  • Reading payback as a profit test. A project can pay back quickly and still have a negative NPV if the rate is high, or pay back slowly and be the better investment.

Which calculator can you use for NPV and IRR in the exam?

This calculator supports study for the CFA® Program Level I, run by CFA Institute (CFA Institute, Level I exam). Our tools complement CFA Institute’s own curriculum; they do not replace it. Which calculators you may use in the exam is set by CFA Institute, so check its current calculator rules before you buy one; our page on which calculators are allowed in the exams sets out the models with their source. The BA II Plus and the HP 12C both compute NPV and IRR from a list of cash flows (Texas Instruments, NPV definition and calculation) (HP, HP 12C user's guide); the link under the result opens the online financial calculator with your flows and the keys to press.

BA II Plus is a trade mark of Texas Instruments, HP 12C a trade mark of HP and Excel a trade mark of Microsoft. None of these companies is connected with this page.

What this tool covers

Last updated
Based on
  • The definitions of NPV, IRR, MIRR, profitability index and payback (see the sources)
  • Your own cash flows and rates; the default values are illustrative
Includes
  • NPV at your discount rate for CF0 and up to 20 later cash flows
  • Every IRR between −99% and 1,000% per period, with a warning when there is more than one
  • MIRR with separate finance and reinvestment rates, and the profitability index
  • Simple and discounted payback, a table by period, the NPV profile and the worked steps
Not included
  • Cash flows at uneven intervals or on dates within a period
  • Taxes, inflation and depreciation – enter cash flows after tax yourself
  • How to choose the discount rate, and risk or scenario analysis
  • Choosing between mutually exclusive projects of different size or length

Frequently asked questions

How do you calculate NPV?

Discount each cash flow to today by dividing it by (1 + r)^t and add the results; the cash flow now (CF0) is not discounted. Paying 50,000 now for 12,000, 15,000, 18,000, 18,000 and 10,000 over five years gives an NPV of 8,296.54 at 8% a year.

How is the IRR calculated?

In general there is no formula for it. The calculator tries rates between −99% and 1,000% per period, notes where the NPV changes sign and narrows each rate down. For the example flows the IRR is 14.06%.

Can cash flows have more than one IRR?

Yes, when they change sign more than once, for example with a clean-up cost at the end. −1,000, +2,300 and −1,320 have an NPV of zero at both 10.00% and 20.00%. The calculator lists every rate it finds; judge such flows by their NPV or MIRR.

What is the difference between IRR and MIRR?

The IRR in effect assumes that money received along the way earns the IRR itself. The MIRR discounts outflows at a finance rate and compounds inflows at a reinvestment rate you choose, and always has one value. For the example at 8% the MIRR is 11.37%, against an IRR of 14.06%.

How is the payback period calculated?

Add the cash flows period by period until the running total turns from negative to zero or more; the part of that period needed is the amount still to recover divided by that period’s flow. The example pays back after 3.28 years, or 3.89 years with the flows discounted at 8%.

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

Excel’s NPV treats its first value as arriving one period from now. Add CF0 outside the function: CF0 + NPV(rate, CF1 … CFn). With all six flows of the example inside the function the result is 7,681.98 instead of 8,296.54.

Which calculators can I use for NPV and IRR in CFA® Program exams?

CFA Institute sets which calculators you may use, so check its current calculator rules before you buy one. The BA II Plus and the HP 12C both compute NPV and IRR from a list of cash flows, and the link under the result shows the keys to press for your numbers.

Does the calculator save my numbers?

No. The calculation runs in your browser. Your numbers appear only in the page address after the # sign, so you can share a result; they are not sent to us.

Sources

  1. Texas Instruments: Solution 11241: Computing Net Present Value (NPV) and Internal Rate of Return (IRR) Using the BA II PLUS and the BA II PLUS PROFESSIONAL. Accessed 29 October 2026.
  2. Aswath Damodaran, NYU Stern School of Business (secondary source): A Primer on the Time Value of Money. Accessed 29 October 2026.
  3. National Institute of Standards and Technology, US Department of Commerce: NIST Handbook 135 (2025 edition), Life Cycle Costing Manual for the Federal Energy Management Program – §6.3 adjusted internal rate of return: savings reinvested at the discount rate, the IRR implicitly at its own rate, more than one IRR possible when later investment costs give negative cash flows, not for choosing among mutually exclusive alternatives (p. 84), AIRR = (1 + r) × SIR^(1/N) − 1 (p. 85); §6.4 simple and discounted payback: time until cumulative savings offset the initial investment, costs and savings after the payback date ignored, not for choosing among mutually exclusive alternatives (pp. 86–87), interpolation for a non-integer payback and a check that payback is not reversed later (p. 88) (August 2025). Accessed 30 October 2026.
  4. Microsoft Support: MIRR function – finance rate paid on the money used and reinvestment rate received on the cash flows; at least one positive and one negative value needed; example: −120,000 then 39,000, 30,000, 21,000, 37,000 and 46,000 at 10% and 12% gives 13%. Accessed 30 October 2026.
  5. Microsoft Support: NPV function – the investment begins one period before the first value, so a cash flow at the start of the first period is added to the result rather than included in the values. Accessed 30 October 2026.
  6. Texas Instruments: BA II PLUS Calculator guidebook: formats, values stored to 13 digits and the reset 2nd RESET ENTER (pp. 4–6); ten memories M0–M9 (p. 12); Time-Value-of-Money worksheet – defaults with P/Y and C/Y of 1, 2nd CLR TVM resets only N, I/Y, PV, PMT and FV, and entering P/Y also sets C/Y (p. 23); Cash Flow worksheet – CFo and up to 24 further cash flows, C01–C24 (pp. 42–43), and with several IRR solutions the one closest to zero is displayed (p. 46); Bond worksheet – ACT or 360 day count, one or two coupons a year (p. 52); Statistics worksheet – up to 50 data points, LIN, Ln, EXP, PWR and 1-V, sample (Sx) and population (σx) standard deviation (pp. 63–65). Accessed 30 October 2026.
  7. Hewlett-Packard; copy kept by the HP Calculator Literature archive: HP 12C User's Guide (Edition 5, part number 0012C-90001): basic financial functions – n, i, PV, PMT, FV, BEG and END; a computed n rounded up, down only below 0.005 (p. 40); odd periods and the C indicator (p. 51); discounted cash flow analysis, CF0 and up to 20 further cash flows with Nj up to 99 (pp. 58–61), several IRR answers possible (p. 64; appendix B, p. 179); error conditions, Error 5 (p. 183); also the CLEAR keys (p. 18), RPN entry with ENTER (pp. 19–20), 20 data storage registers R0–R9 and R.0–R.9 (p. 23), date format D.MY or M.DY (p. 30), bond PRICE and YTM with semiannual coupons on an actual/actual basis (p. 66), Continuous Memory reset and the display format f 0–9 with calculations to 10 digits (pp. 70–71), mean, sample standard deviation and the step for the population standard deviation (pp. 77–79), linear estimation (p. 80), up to 99 program lines (p. 95) (April 2008). Accessed 30 October 2026.
  8. CFA Institute: CFA Program Level I exam: format and topic weights. Accessed 26 October 2026.

Study aid only – not legal, financial or careers advice. The tool runs in your browser and stores nothing.

High Performer Certs is an independent study platform. It is not affiliated with, endorsed by, or sponsored by CFA Institute or the Global Association of Risk Professionals (GARP). We are not a CFA Institute Prep Provider and not a GARP Exam Preparation Provider. CFA Institute does not endorse, promote, review or warrant the accuracy or quality of our products and services. GARP does not endorse, promote, review or warrant the accuracy of our products or services. All questions and explanations are our own original material and contain no CFA Institute or GARP exam, curriculum or practice questions. CFA®, Chartered Financial Analyst®, CIPM® and GIPS® are registered trademarks owned by CFA Institute. FRM® and GARP® are trademarks owned by the Global Association of Risk Professionals.

Choose which optional tools we may use. We store your choice in your browser for 12 months (local storage, “hp.consent”). Details: privacy policy.