Advanced

How to calculate NPV in Excel: the NPV function, the year-zero mistake and IRR

Calculate a project’s NPV (net present value) in Excel: discounting logic, the year-zero mistake in the NPV function, the blank-cell trap, IRR, XNPV and a rate sensitivity table.

A bakery owner wants to buy a new oven for 60 million soums. By his estimate it will bring an extra 15, 18, 20, 22 and 25 million in net cash over 5 years — 100 million in total. “40 million profit” — worth it, right? But 60 million today and 25 million five years from now are not the same money: today’s money put in a bank at 14% grows too.

NPV (net present value) brings every future cash flow back to today’s value and subtracts the investment. The rule is simple: NPV > 0 — the project earns more than the required return; NPV < 0 — the money is better invested elsewhere.

Книга1 - Excel
—☐✕
B8fx=ЧПС(E1;B3:B7)+B2
ABCDEF
1YearCash flowRate14%
20-60 000 000
3115 000 000
4218 000 000
5320 000 000
6422 000 000
7525 000 000
8NPV6 517 723
9
Готово
At 14%, NPV ≈ +6.5 million soums: the project creates 6.5 million more value than a bank deposit

The logic: discounting by hand

1

For each year, the discount factor: =1/(1+$F$1)^A2. It is 1 in year 0, 0.877 in year 1 and 0.519 in year 5 — 1 soum five years from now is worth only 0.52 soum today.

Книга1 - Excel
—☐✕
C3fx=1/(1+$F$1)^A3
ABCDEFG
1YearCash flowFactorPresent valueRate14%
20-60 000 0001,0000-60 000 000
3115 000 0000,877213 157 895
4218 000 0000,769513 850 416
5320 000 0000,675013 499 430
6422 000 0000,592113 025 766
7525 000 0000,519412 984 217
8Total40 000 0006 517 723
9
Готово
The plain sum is 40 million, the discounted one 6.5 million — the gap is the time value of money

2

Present value = cash flow × factor (=B2*C2). Their sum is the NPV. This table shows what happens inside the NPV function and is very handy for checking your result.

The NPV function — written correctly

1

Syntax: NPV(rate, value1, [value2], …). The key point: NPV assumes the first value arrives at the end of year 1 and discounts it too.

2

So don’t put the year-0 investment inside NPV — add it outside: =ЧПС(E1;B3:B7)+B2. B3:B7 are years 1–5, B2 is today’s (negative) investment.

Книга1 - Excel
—☐✕
B8fx=ЧПС(E1;B3:B7)+B2
ABCDEF
1YearCash flowRate14%
20-60 000 0001
3115 000 000
4218 000 000
5320 000 000
6422 000 000
7525 000 000
8NPV6 517 7232
9
ГотовоСреднее: 20000000Количество: 5Сумма: 100000000
The green border marks the years inside NPV. B2 (the investment) is added outside

3

Don’t hard-code the rate — keep it in a cell (E1) in percent format: 14%. Then change it to see quickly at what rate the project starts losing money.

IRR — the highest rate the project can “bear”

1

=ВСД(B2:B7) is the rate at which NPV is exactly 0. Here the investment goes inside the range (IRR takes all flows starting from year 0). The result is ≈ 18.1%.

Книга1 - Excel
—☐✕
E1fx=ВСД(B2:B7)
ABCDEF
1YearCash flowIRR18,1%
20-60 000 000NPV at IRR0
3115 000 000
4218 000 000
5320 000 000
6422 000 000
7525 000 000
8
Готово
IRR ≈ 18.1%: at this rate NPV is zero (E2). If capital costs more than 18%, the project loses value

2

Decision rule: accept the project if IRR > the required rate. Here 18.1% > 14% — the oven pays off. With a 20% loan, it doesn’t.

Книга1 - Excel
—☐✕
E4fx=ЧПС(E1;B2:B7)
ABCDEF
1YearCash flowRate14%
20-60 000 000
3115 000 000Correct6 517 723
4218 000 000Wrong5 717 3011
5320 000 000Difference800 422
6422 000 000
7525 000 000
8
Готово
With the investment inside NPV, the result is 800 thousand too low — and Excel won’t call it an error

Pro level: sensitivity, XNPV and the profitability index

  • Rate sensitivity. A single NPV says little — calculate it at several rates. Put 12%, 14%, 18%, 20% in a column with =ЧПС(A2;$B$…)+… next to them and you’ll see where NPV turns negative (table below). In Excel you can automate this with What-If Analysis → Data Table.
  • Irregular dates — XNPV. If payments happen on specific dates rather than at year-end: =XNPV(rate;B2:B7;C2:C7), where C holds the dates. XNPV doesn’t discount the first flow, so the investment can stay inside the range. Its partner is XIRR.
  • Profitability index (PI): =ЧПС(E1;B3:B7)/-B2 ≈ 1.11 — every soum invested returns 1.11 soums of present value. Fairer than NPV when choosing between projects of different size.
  • Payback period: the year in which the running total (=СУММ($B$2:B2)) turns positive. For the discounted version, take a running total of the present values in column D.
Книга1 - Excel
—☐✕
B5fx=ЧПС(A5;15000000;18000000;20000000;22000000;25000000)-60000000
ABCD
1RateNPV
212%10 145 021
314%6 517 723
418%86 887
520%-2 769 419
624%-7 873 812
7
Готово
At 18% NPV is close to zero, from 20% it’s negative — the loan rate decides everything

Try it in the simulator

Type =ЧПС(B1;B4:B8)+B3 in B9 — NPV ≈ 6,517,723. Type =ВСД(B3:B8) in B10. Then change the rate in B1 to 0.2 and see NPV turn negative. Bonus: type the wrong version =ЧПС(B1;B3:B8) in B11 and compare.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1Rate0,14
2YearCash flow
30-60000000
4115000000
5218000000
6320000000
7422000000
8525000000
9NPV
10IRR
11Wrong NPV
12
13
14
15
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

153 / 154