Skip to content

NPV in Excel: Formula Syntax & The Year 0 Pitfall

Learn the exact syntax for calculating Net Present Value in Microsoft Excel and Google Sheets, avoid the common Year 0 timing error, and use XNPV for exact calendar dates.

Copy-Ready Excel & Google Sheets Formula Generator

Select your spreadsheet layout parameters below to generate the exact, error-free formula:

Generated Excel Formula
=NPV(B1, B3:B6) + B2
Note: Cell B2 must contain the initial outlay as a negative number (e.g. -$50,000).

The Notorious "Year 0" Excel NPV Timing Bug

The single most common modeling mistake in corporate finance spreadsheets occurs when analysts apply Microsoft Excel's built-in =NPV() function to their entire cash flow range.

INCORRECT (Common Trap)
=NPV(B1, B2:B6)

Excel treats B2 (Year 0) as occurring at the end of Year 1, discounting your upfront cost by (1+r)¹. This artificially inflates your NPV and distorts the valuation.

CORRECT FORMULA
=NPV(B1, B3:B6) + B2

Only Years 1 through n are passed into =NPV(). The undiscounted Year 0 outlay in B2 is added outside the parenthesis.

Step-by-Step Spreadsheet Setup

Follow this standard layout for financial models:

CellLabelValue / FormulaDescription
B1Discount Rate10%Corporate WACC or Hurdle Rate
B2Year 0 (Outlay)-50000Initial upfront investment (Negative)
B3Year 115000First year net cash inflow
B4Year 220000Second year net cash inflow
B5Year 325000Third year net cash inflow
B6Year 430000Fourth year net cash inflow
B8Net Present Value=NPV(B1, B3:B6) + B2Outputs: $19,438.56

When to Use XNPV Instead of NPV

In real-world mergers, infrastructure projects, and private equity deals, cash flows rarely occur on neat 365-day annual anniversaries. For irregular dates (e.g., closing on March 15, milestone payouts on August 10), use Microsoft Excel's =XNPV() function:

=XNPV(rate, values_range, dates_range)Important XNPV Difference: Unlike =NPV(), the =XNPV() function expects Year 0 to be included directly in the values_range (e.g. B2:B6), with the corresponding start date in C2:C6.

Verify all spreadsheet calculations with our online NPV calculator, which validates cash flow timelines and discount compounding.

Frequently Asked Questions

Q1Why is the Excel NPV function notoriously misleading?
The Excel =NPV() function assumes that the very first number passed in its range occurs at Period 1 (end of Year 1), NOT Period 0. If you include your initial investment (Year 0) inside the formula like =NPV(rate, CF0:CFn), Excel incorrectly discounts your upfront cash outlay by one year, producing a completely wrong answer.
Q2What is the correct syntax for NPV in Excel?
The correct formula is:
=NPV(rate, CF1:CFn) + CF0
or if CF0 is entered as a positive cost:
=NPV(rate, CF1:CFn) − Initial_Cost.
Q3What is the difference between NPV and XNPV in Excel?
=NPV() requires cash flows to occur at strictly equal, periodic intervals (e.g., exactly once per year). In contrast, =XNPV(rate, values_range, dates_range) discounts cash flows based on exact calendar dates, using actual daily discounting: (1 + r)^((d_t − d_0) / 365). Furthermore, XNPV expects the Year 0 initial outlay to be included directly in the values range.
Q4Why does Excel return a #VALUE! error in NPV?
A #VALUE! error occurs if the rate argument or any cell in the cash flow range contains non-numeric characters, text strings, or hidden formatting spaces. Ensure all cells are formatted as Numbers.