Start free

How to calculate NPV in Excel (and the year-0 mistake)

Works in Excel 365, 2021, 2019, 2016 and Excel for the web

Key takeaways

  • NPV discounts its first value by one period. Keep year 0 outside: =NPV(rate, CF1:CFn) + CF0.
  • Match the rate to the spacing of the cash flows: a yearly rate for yearly flows, a monthly rate for monthly ones.
  • Blank cells in the range are skipped, not counted as zero. Type 0 for a year with no cash.
  • Cash on real, uneven dates? Use XNPV, and there year 0 goes inside the range.
Jump straight to the practice sheet
On this page

To calculate NPV in Excel, use =NPV(rate, year1:yearN) + year0. Excel’s NPV assumes every value arrives at the end of a period, so it discounts even the first one. Your initial investment happens today, so leave it out of the function and add it afterwards. At 10%, with −10,000 today and 3,000, 4,000, 4,000 and 3,000 over the next four years, the NPV is 1,087.36. Putting the −10,000 inside NPV gives 988.51, which is wrong.

The NPV formula in Excel

=NPV(rate, value1, [value2], ...)
Argument Required What it means
rate Yes The discount rate for one period, e.g. 10% a year for yearly cash flows.
value1 Yes The first cash flow, assumed to arrive at the end of period 1.
value2, … No Later cash flows, evenly spaced, each at the end of its period. Up to 254 in total.

NPV returns the present value of a series of future cash flows. It has no idea what “today” is: period 1 is simply the first value it sees. Money going out is negative, money coming in is positive. Inside a range, empty cells, text and TRUE/FALSE are ignored.

Worked example: a 4-year project at 10%

A project costs 10,000 today and returns 3,000, 4,000, 4,000 and 3,000 at the end of each of the next four years. Columns C and D are a check by hand: each cash flow times its discount factor, 1 ÷ (1 + rate) to the power of its year.

B10=NPV(B1,B5:B8)+B4
RowABCD
1Discount rate10%
2
3YearCash flow1/(1+r)^tPresent value
40-10,0001.0000-10,000.00
513,0000.90912,727.27
624,0000.82643,305.79
734,0000.75133,005.26
843,0000.68302,049.04
9
10NPV1,087.361,087.36
=NPV(B1,B5:B8)+B4 → 1,087.36

The sum of column D matches the NPV result, which shows year 0 wasn’t discounted. A positive NPV means the project earns more than 10% a year on the money put in.

Practise it: calculate the NPV yourself

Same idea, new numbers, so you can’t copy the answer above. We check the number your formula returns, then change the rate and the cash flows to make sure it still holds.

Your task: In B10, return the project's NPV at the rate in B1.

Graded live
RowAB
1Discount rate8%
2
3YearCash flow
40-25,000.00
516,000.00
629,000.00
739,000.00
847,000.00
9
10NPV

Write the formula in the bar above, then press Check or Enter.

Hint

Put only years 1 to 4 (B5:B8) inside NPV, with the rate from B1, then add year 0 from B4.

Solution

=NPV(B1,B5:B8)+B4 Any formula that returns the same result passes.

The year-0 mistake, explained

Write =NPV(10%, B4:B8) and Excel treats the −10,000 as if it arrived at the end of year 1, and every later cash flow one year too late. The whole answer is divided by 1.10 one extra time: 1,087.36 ÷ 1.10 = 988.51. The gap grows with the rate and the size of the project, and it’s the most common NPV error in models and interview tests.

Wrong=NPV(B1,B4:B8)988.51
Right=NPV(B1,B5:B8)+B41,087.36

Other common NPV mistakes

  1. A yearly rate with monthly cash flows. Convert it. The effective monthly rate for 10% a year is =(1+10%)^(1/12)-1, about 0.797%. If your 10% is a nominal rate compounded monthly, use 10%/12, about 0.833%.
  2. Blank cells for years with no cash. NPV skips blanks, so every later flow moves one period earlier and the result comes out too high. Type 0.
  3. Uneven timing. NPV assumes equal periods. If cash lands on real dates, use XNPV.
  4. Wrong signs. Investments and costs are negative, money coming in is positive. If every value is positive, you’ve measured value, not NPV.
  5. PV instead of NPV. PV is for the same payment every period, like a loan. Uneven cash flows need NPV.

NPV vs XNPV: which should you use?

NPV XNPV
Syntax =NPV(rate, value1, …) =XNPV(rate, values, dates)
Timing Equal periods, end of each The actual dates you give it
First value Discounted one full period Not discounted: it’s the start date
Year-0 investment Add it outside the function Include it inside the range
Rate Per period Yearly

With the cash on 1 January 2026 and then 1 January 2027 to 2030, =XNPV(B1, B4:B8, A4:A8) (dates in column A) gives 1,086.04, slightly less than NPV’s 1,087.36 because XNPV counts real days on a 365-day year and 2028 has 366.

NPV and IRR: how they connect

IRR is the discount rate at which NPV equals zero. For these cash flows, =IRR(B4:B8) returns 14.90%. Note that IRR does take year 0 inside the range. Because 14.90% is above our 10% rate, the NPV is positive. At any rate above 14.90% it would turn negative.

To try your own cash flows, the NPV and IRR calculator gives the NPV and the IRR with the Excel formulas for both.

FAQ

Why doesn't Excel's NPV match my financial calculator?

Excel's NPV discounts the first value by one period, while financial calculators treat CF0 as today. Use =NPV(rate, CF1:CFn) + CF0 and the two will match.

Does Excel's NPV include the initial investment?

Only if you put it in the range, and then it discounts it by a year, which is wrong for money spent today. Add the year-0 amount outside the function.

What discount rate should I use?

Your required return per period, often the project's cost of capital. Match it to the spacing of the cash flows.

When should I use XNPV instead of NPV?

When the cash flows aren't evenly spaced, or you know their real dates. XNPV takes a yearly rate and counts the actual days between dates, divided by 365.

Can NPV be negative?

Yes. A negative NPV means the project earns less than your discount rate. It doesn't always mean it loses money.

Summarize this guide withChatGPTPerplexityClaude

Keep going

Guides that build on this one.

All guides
Interview prepPractice sheet

PMT interview question: a loan's monthly payment

The finance question in Excel interviews: a loan's monthly payment and its total interest, with the rate, period and sign traps explained, an NPV follow-up, and a sheet that grades yours.

3 min read · Updated
Errors & fixesPractice sheet

#DIV/0! error in Excel: what it means and how to fix it

#DIV/0! means a formula divided by zero or by an empty cell. Why it happens, averages of nothing included, and how to show a clean result, with a practice sheet.

2 min read · Updated
Interview prepPractice sheet

Excel data cleaning interview question

Extra spaces, names in the wrong order, numbers stored as text and dates that aren't dates: the cleaning task interviewers love, solved with formulas, and a sheet that grades yours.

4 min read · Updated

Reading is step one. Writing the formula is the skill.

Practise in a live grid that grades what your formula calculates, with a specific hint when it's wrong.

Runs in your browser · Graded on your result · No install