Capital Budgeting: NPV, IRR and MIRR for Several Projects
Operator: Abdulla Al Fahad. How tools are built and checked
Take six projects at a 10% discount rate. New product line has the largest NPV (168,991) and Software rollout the best return on money (IRR 27.8%, profitability index 1.63), but a 450,000 capital limit funds either one large project or several small ones. The page finds the best set exactly: New product line alone, NPV 168,991, where the shortcut of ranking by NPV per dollar funds Software rollout and Plant upgrade for only 115,575.
It also catches the case that makes IRR unreliable. The example's Quarry lease has cash flows of -100,000, +235,000 and -138,000, which change sign twice and have two IRRs, 15% and 20%. The page lists both and points to NPV (-413) and MIRR instead: 9.96% with the sample file's explicit zeros through year 5, or 9.89% from the three listed cash flows alone, since trailing zeros lengthen the compounding.
For one stream of dated cash flows, XIRR Calculator is the closer tool, and DCF Valuation Calculator values a company from forecast free cash flow. This page compares several projects with evenly spaced periods side by side.
Key features
- NPV, IRR, MIRR, profitability index, payback and discounted payback for every project
- Every IRR between -99% and 1000%, with a warning when the cash flows change sign more than once
- Best funded set under a capital limit, found exactly for up to 22 candidates, with the NPV-per-dollar shortcut shown beside it
- NPV profile chart, a crossover rate for any two projects and an NPV grid at rates around yours
- CSV outputs and an XLSX where NPV, IRR, MIRR, profitability index, payback, rank and sensitivity are formulas on the cash-flow rows
How each metric is calculated, and what happens when IRR has more than one answer
Two layouts are read. In the wide layout each row is a project and you tick the period columns in order, the first being period 0 (today, usually the investment). In the long layout each row is one project and one period, with the project, a whole period number from 0 and the cash flow in three columns. Currency symbols, thousands commas and bracketed negatives such as (1,250) are accepted.
Cash flows are taken at the end of each period. A blank period cell counts as zero, a project's last non-blank period fixes its length for MIRR and the range of its formulas, and a project that appears on more than one row has its flows added. Up to 40 projects and 60 periods after period 0 are handled.
The capital limit applies to the period-0 outflow only, and a project is funded whole or not at all. IRR, MIRR and the profitability index need at least one negative cash flow; a project without one is listed with a note instead.
How it works
NPV is the sum of each cash flow divided by (1 + rate) to the power of its period. The profitability index is the present value of the inflows over the present value of the outflows, and 1 - 1/PI is how far every inflow could fall before NPV reaches zero. MIRR compounds the positive flows to the last period at the reinvestment rate, discounts the negative flows to today at the finance rate, and takes the nth root of their ratio, which is the spreadsheet MIRR definition. Payback adds up the cash flows and finds the first time the total climbs back to zero after having been negative, interpolating inside that period; a project with no outlay in period 0, such as 0, -200,000, 90,000 and so on, pays back after its later outlay (3.22 periods at 90,000 a year). The discounted version first discounts each flow at your rate.
IRR is a root of the NPV as a function of the rate, and with mixed signs there can be several. The page scans NPV across the rates from -99% to 1000% on a grid of 8,000 steps in ln(1 + r), bisects every sign change to full precision and keeps exact zeros. By Descartes' rule a project with k sign changes has at most k positive roots. A single root is shown as the IRR; several are shown as a count and listed in a warning.
For a capital limit, the page considers projects with a positive NPV whose period-0 outlay fits the budget and tries every combination when there are 22 or fewer (at most about four million subsets, which takes well under a second), keeping the one with the largest total NPV that fits. Above 22 it falls back to a greedy ranking by NPV per dollar. The crossover rate of two projects is the IRR of the difference between their cash flows: the rate at which both have the same NPV.
Common use cases
- A capital committee with six proposals and a 450,000 limit, where the project with the best IRR is not the one to fund first.
- A choice between two mutually exclusive machines, using the crossover rate to show that their ranking flips at about 27%.
- A quarry or mine with a restoration cost at the end, checked for multiple IRRs before anyone quotes a return.
- A teaching example showing NPV and IRR disagreeing, with the NPV profile on screen.
How to use this tool
- Open a table of project cash flows, or press Load example for the six sample projects.
- Choose the layout, the project column and the period columns.
- Enter the discount rate, and the finance and reinvestment rates for MIRR if they differ.
- Enter a capital limit if you have one.
- Read the metrics table, the warnings and the NPV profile, and compare any two projects' crossover rate.
- Download the CSVs or the XLSX.
Example
Example cash flows (excerpt), 10% discount rate, 450,000 capital limit
project,year_0,year_1,year_2,year_3,year_4,year_5
New product line,-400000,60000,120000,180000,210000,220000
Software rollout,-90000,15000,30000,45000,55000,60000
Quarry lease,-100000,235000,-138000,0,0,0
...Metrics at 10%
New product line: NPV 168,991, IRR 22.49%, MIRR 18.03%, PI 1.42, payback 3.19
Software rollout: NPV 57,060, IRR 27.75%, MIRR 21.35%, PI 1.63, payback 3.00
Plant upgrade: NPV 58,515, IRR 18.50%
Quarry lease: NPV -413, IRRs 15.00% and 20.00%, MIRR 9.96%
Best set within 450,000: New product line alone, NPV 168,991
Ranking by NPV per dollar: Software rollout and Plant upgrade, NPV 115,575Tips for best results
- When the page lists several IRRs, ignore IRR for that project and use NPV, or MIRR with finance and reinvestment rates you can defend.
- To see how fragile an NPV is, read the Inflows can fall by column: Warehouse automation's profitability index of 1.05 means a drop of about 5% in every inflow wipes out its NPV.
- Set the MIRR finance and reinvestment rates separately if your borrowing cost differs from what spare cash earns; leaving them blank uses the discount rate for both.
Common pitfalls
Ranking projects by IRR when they have different scales or lives can favour small, short projects. The 27.8% Software rollout adds 57,060 of NPV; the 22.5% New product line adds 168,991.
A payback figure ignores everything after it. The Quarry lease shows a payback of 0.43 periods and then loses money, which the page flags as cumulative cash negative again at the end.
The capital limit covers only the period-0 outlay. A project that needs more money in year 1 looks cheaper than it is.
NPV is only as good as the discount rate. If a project is riskier than your usual ones, use a higher rate for it by running it separately, since this page applies one rate to all.
Common errors and how to fix them
- Choose at least two cash-flow columns (period 0 and period 1)
- In the wide layout tick at least two period columns, in time order. The first ticked column is treated as period 0.
- 2 rows left out: the project is blank or the period is not a whole number from 0 to 60, or the cash flow is not a number
- In the long layout periods must be integers such as 0, 1, 2. Convert dates or fractions to period numbers first.
- "Fleet renewal" has no negative cash flow
- The project shows only inflows, so there is no investment to earn a return on and IRR, MIRR and the profitability index are undefined. Check that the outlay is entered as a negative number.
- The capital budget must be a number of zero or more, or blank
- Remove any text or currency code from the budget field. Leave it blank to skip the capital-limit step.
Best practices
- For two mutually exclusive projects, decide on NPV at your own rate and use the crossover rate only to see how far the discount rate could move before the ranking flips. In the example Plant upgrade overtakes New product line only above about 26.9%.
Why NPV and IRR can disagree
NPV measures value created in money; IRR measures the rate of return on the money invested. A small project can have a very high rate and add little, and a large project can have a modest rate and add a lot. Ranking by NPV is the right answer when you can fund any of them; the two orderings differ when funds are limited or when projects are mutually exclusive.
The NPV profile shows it directly. Each project's curve crosses zero at its IRR, and where two curves cross each other the better project switches. In the example the profiles of Plant upgrade and New product line cross near 26.9%, so below that rate New product line is better on NPV and above it Plant upgrade is.
What MIRR fixes
IRR implicitly assumes every inflow is reinvested at the IRR itself, which for a 27% project is optimistic. MIRR replaces that with a reinvestment rate you choose and discounts outflows at a finance rate, so it gives one answer even when the cash flows change sign more than once. The Quarry lease has two IRRs but a single MIRR (9.96% with the sample's zeros through year 5), below the 10% hurdle, in line with its slightly negative NPV.
MIRR is still a single number that hides the scale of the project, so read it with NPV rather than instead of it.
Frequently asked questions
Why does the best funded set differ from ranking by profitability index?
Projects are indivisible, so ranking by NPV per dollar can fill the budget with small projects and leave the largest NPV unfunded. The exhaustive search compares every combination that fits and keeps the largest total NPV.
How does this differ from the XIRR calculator?
XIRR takes one series of dated cash flows and gives an annualised rate for those dates. This page takes several projects on evenly spaced periods and compares them with NPV, MIRR, profitability index, payback and a capital limit.
Which rate should I use for discounting?
The return you require for a project of that risk: a company's weighted average cost of capital for typical projects, higher for riskier ones. The sensitivity table shows how each NPV changes a few points either side, which is the quickest way to see how much the answer depends on the choice.