Finance function
NPV function in Google Sheets and Excel
NPV returns the net present value of future cash flows: what they're worth today at a given discount rate.
Checked against Microsoft's and Google's documentation on · Example calculated on a live sheet
- Excel 2016
- Excel 2019
- Excel 2021
- Excel 2024
- Microsoft 365
- Google Sheets
Syntax
NPV(rate, value1, [value2], ...)Arguments in [brackets] are optional. Google Sheets writes it NPV(discount, cashflow1, [cashflow2, ...]).
Example
=NPV(10%,B12:B16)+B11 reads: Discount the cash flows for years 1 to 5 (B12:B16) at 10% a year back to today, then add year 0's investment in B11, which is already in today's money.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Input | Value | |||
| 2 | Loan amount | $15,000.00 | |||
| 3 | Annual rate | 6.0% | |||
| 4 | Years | 4 | |||
| 5 | |||||
| 6 | Monthly saving | $250.00 | |||
| 7 | Saving rate | 4.0% | |||
| 8 | Saving years | 10 | |||
| 9 | Discount rate | 8% | |||
| 10 | Year | Cash flow | NPV at 10% | $1,614.05 | |
| 11 | 0 | -$20,000.00 | |||
| 12 | 1 | $4,500.00 | |||
| 13 | 2 | $5,200.00 | |||
| 14 | 3 | $6,000.00 | |||
| 15 | 4 | $6,400.00 | |||
| 16 | 5 | $7,000.00 |
E10 shows $1,614.05: the project beats 10% by that much in today's money (years 1–5 discounted, plus year 0's −$20,000).
How the spreadsheet calculates it
Works out the result of NPV (step 1) plus B11.
- 1. NPV: The net present value of future cash flows. Here it's given
10%andB12:B16.rate=`10%`: the discount rate per periodcash_flows=`B12:B16`: the future cash flows, from year 1
- 2. Put together: Puts it together: the result of step 1 plus
B11.
More NPV examples
=NPV(B9,B12:B16)+B11The same project at the 8% discount rate in B9: a higher NPV.=NPV(10%,B12:B16)Today's value of years 1–5 alone, before the investment.=NPV(10%,4500,5200,6000,6400,7000)-20000The example with the numbers typed in.=NPV(IRR(B11:B16),B12:B16)+B11At the IRR, the NPV comes out as zero.
Paste any of these into the formula explainer to see it step by step.
Tips
- Keep year 0 out of NPV and add it afterwards.
- Put the discount rate in a cell, as the loan sheet does in B9, so you can test different rates.
- Type 0 for periods with no cash flow instead of leaving them empty.
What NPV is used for
Comparing investment projects, deciding whether equipment or a new product pays back, valuing a stream of future payments, and testing how sensitive a plan is to the discount rate.
Arguments
| Argument | Required | What it is |
|---|---|---|
| rate | Yes | The discount rate for one period, such as 10% a year. |
| value1 | Yes | The cash flows, in order, starting with the end of period 1: B12:B16. Payments out are negative, money in positive. |
| value2, … | No | More cash flows or ranges, still in time order. |
Common mistakes
Putting year 0 inside NPV: it's discounted a year too many.
Using it for cash flows that aren't evenly spaced: Microsoft's page says the values must be equally spaced in time and at the end of each period.
Leaving gaps or text in the cash-flow range and expecting them to count as zero periods: empty cells and text in a range are ignored, which shifts the later years one period earlier. Type 0 for a year with no cash.
Using a yearly rate with monthly cash flows.
In Google Sheets
Google Sheets has NPV with the same arguments (NPV(discount, cashflow1, [cashflow2, ...])). Add a year-0 investment outside NPV in both apps, as in the example.
Errors you may see with NPV
- #VALUE!: An argument typed into the formula is text that can't be read as a number.
Questions
Why do I add the year 0 investment outside NPV?
NPV treats its first value as arriving one period from now and discounts it. The investment is made today, so it's already in today's money: Microsoft's page says to add a cash flow at the start of the first period to the result, not include it in the values.
What does a positive NPV mean?
The project earns more than the discount rate: after allowing for the time value of money, it adds that much value today. A negative NPV means it earns less than the rate.
How is NPV related to IRR?
IRR is the discount rate at which NPV is exactly zero. If the project's IRR is above your discount rate, its NPV is positive.
What if my cash flows are on irregular dates?
NPV assumes equal periods. Both apps have XNPV for cash flows on specific dates, which this course doesn't cover.
Sources
Official documentation the facts on this page were checked against.