How to calculate discount formula in Excel: Introduction to NPV function

Explain several common functions of the discount formula in Excel: how to use NPV, PV and XNPV, how to place the initial investment, how to align the interest rate and period, and use a reproducible example to demonstrate the complete calculation.

Key points of this article

  • The NPV function defaults to the cash flow at the beginning occurring at the end of period 1. The initial investment (period 0) must be added separately and cannot be directly put into the range of NPV.
  • The interest rate and number of periods should be aligned: annual interest rates are matched with annual cash flows, and monthly interest rates are matched with monthly cash flows. Mixing them will cause great deviation in the results.
  • Fill in negative numbers for cash flow outflows, and fill in positive numbers for inflows. Only when the signs are unified can the positive and negative NPV have decision-making significance.
  • When the cash flow dates are uneven, use XNPV and match the date column, which is closer to reality than NPV.
  • The formula calculates a discounted estimate. The errors in interest rate assumptions and cash flow forecasts themselves need to be checked by yourself.

If you are doing project evaluation, equipment purchase comparison or financial calculation, you will often encounter a question: How much money will be received or spent in the next few years, is it worth now? This is what discounting is about. Many people search for "excel discount formula" in Excel, only to find that there are many functions. NPV, PV, and XNPV all seem to be useful. They don't know which one to choose, and the results are not correct.

This article specifically talks about the basic functions and usage of discount calculation in Excel, focusing on the NPV function. After reading, you should be able to know what scenarios each function is suitable for, be able to correctly put the initial investment and subsequent cash flow into the formula, and be able to use a small example to reproduce the results yourself and judge whether the table calculation is correct.

How to calculate discount using Excel? One sentence conclusion

Use the NPV function to calculate the present value of a set of cash flows that occur at fixed intervals, and add the initial investment in period 0 separately; use XNPV instead when the cash flow dates are irregular; PV is only considered when the amounts in each period are the same.

your situationRecommended practicesreason
Cash flow amounts vary from year to year (or month to month) at fixed intervalsNPV function, plus initial investmentNPV is automatically discounted according to the number of periods, and the writing method is straightforward.
The amount of each installment is exactly the same, such as fixed annual repaymentPV functionA formula directly calculates the present value of an annuity
Cash flow occurs on irregular dates, such as receipts and payments on specific datesXNPV function, with date columnDiscount based on the actual number of days, not relying on period assumptions
Just want to know how much a future amount is worth nowManual formula: amount ÷ (1+interest rate)^number of periodsTransparent for checking and teaching
Want to calculate project return rate rather than present valueIRR or XIRR (viewed in conjunction with NPV)Find the interest rate that makes NPV equal zero

What is discount and why should we use Excel to calculate it?

The core idea of discounting is: the same amount of money is more valuable today than in the future. Reasons include the opportunity cost of capital, inflation and risk. The discount rate is the interest rate used to convert future amounts into current values.

The calculation method is: the amount in a certain period in the future is divided by (1 + discount rate) raised to the power of the number of periods. The longer the period, the more part is discounted. Calculating the number of phases by hand is fine, but projects usually have a dozen or more phases, and in this case it is more reliable to use Excel functions.

How the NPV function works

The basic way to write NPV is:

=NPV(interest rate, cash flow range from period 1 to period n)

There is an easily overlooked rule here: NPV defaults to the first number in the range as the cash flow at the end of the first period, and then divides it by (1+interest rate), (1+interest rate)²... It will not automatically include the investment in period 0 (current time point). So the initial investment needs to be added separately:

=NPV(interest rate, range from period 1 to period n) + initial investment cell

Fill in the negative number for the initial investment (indicating outflow) and add it up directly.

NPV ignores empty cells and text in the range, but the number 0 is calculated as a period. Therefore, if there is indeed no cash flow in a certain period, fill in 0 instead of leaving it blank, otherwise the subsequent periods will be moved forward as a whole, and the result will be wrong.

PV function and XNPV function

The PV function is suitable for situations where the amount of each period is the same, such as installment payment and fixed rent. The writing is:

=PV(interest rate, number of periods, amount per period)

It usually returns a negative number because the sign convention of the function is that a positive amount per period represents money received, and the present value represents the amount that needs to be paid. If you want to get a positive number, you can fill in the amount of each period as a negative number, or add a negative sign before the result.

XNPV is suitable for scenarios where cash flow occurs on irregular dates, such as contracts paying based on milestones and funds paying dividends based on specific dates. The writing is:

=XNPV(interest rate, cash flow range, date range)

There are two points to note when using XNPV: First, the start date is the valuation point, and the corresponding cash flow is usually the initial investment; Second, dates must be arranged in ascending order; otherwise, the result will be incorrect. XNPV is discounted by the number of days, so the interest rate is generally set as the annual rate.

Common Misunderstandings and Easily Confused Places

Misconception 1: The result of NPV is the project's net revenue. NPV is calculated as the total discounted future cash flows at the current point in time, then minus the net present value after initial investment. It is an estimate that depends on the discount rate and the accuracy of cash flow forecasts. Changing the interest rate will significantly change the results, so usually you need to estimate under several rates.

Misconception 2: Just fill in any interest rate. The interest rate and the number of installments must be consistent. If cash flow is monthly, the NPV should use the monthly interest rate, i.e., the annual rate divided by 12, rather than directly applying the annual interest rate. Mixing them can cause significant deviations in results, and the errors are not obvious on the surface.

Misconception 3: Positive and negative signs don't matter. The symbols for outflows (investment, expenditure) and inflows (income, returns) must be opposite. If investment is also filled in positively, NPV will be inflated; the project looks good but is actually miscalculated. It is recommended to add a column in the table indicating "inflow" or "outflow" to unify the symbolic rules.

Misconception 4: If NPV is positive, it's definitely worth doing. A positive NPV only means that at a given discount rate, the item has a positive present value. Whether it's worth doing depends on whether the discount rate is reasonable, whether the risk is acceptable, and if there are other options.

📊 Core Comparison

FunctionMain inputSuitable cash flowWhether the initial investment needs to be handled separatelyReturn value
NPVinterest rates, cash flows for each periodThe intervals are fixed each time, and the amount can varyYes, it needs to be added on the outsidePositive or negative numbers
PVInterest rate, number of installments, amount per installmentThe amount for each issue is the sameNo, usually the annuity itselfUsually negative
XNPVInterest rates, cash flow, datesIrregular datesThe value corresponding to the start date is the initial investmentPositive or negative numbers
Manual formulaAmount, interest rate, number of installmentsA single or small cash flowCalculated separatelyAccording to the formula result

How to actually use it

Below is an example you can replicate yourself to demonstrate how to calculate the project's net present value in Excel. Suppose a project's initial investment is negative, and for the next four years, four inflows occur at the end of each year. The discount rate is set by you.

  1. Create two columns in the table: Column A writes the number of periods (0, 1, 2, 3, 4), and column B writes cash flow. B2 is filled in as a negative initial investment, and B3 to B6 are filled in the inflow amounts over four years in sequence.
  2. Enter your set annual interest rate in cell E1. Enter a formula in any cell to calculate the sum of the present values inflows for each period: = NPV(E1, B3:B6).
  3. Add the initial investment, written as: = NPV(E1, B3:B6) + B2, to get the project's net present value at that rate.
  4. Check: Change E1 to another rate and observe whether the results change as expected; Then fill in the investment as positive to see if the result is clearly inflated, confirming the symbol is correct.
  5. If the cash flow dates are irregular, enter the specific dates in column C, using =XNPV(E1, B2:B6, C2:C6), and ensure the dates are in ascending order.

If you need to organize tables and analysis results into documents, you can process them using UniCell tables in OmniDoc's desktop client, or continue editing in the web editor. The calculation logic is unrelated to the specific software.

🎯 Which method suits you?

  • If you're evaluating a multi-year project where cash flow amounts vary each year, NPV plus initial investment is enough, with a clear structure and easy to repeatedly calculate the change rate.
  • If you are calculating the present value of a loan, installment, or annuity with the same amount each period, the PV function saves the process and directly gives the present value.
  • If your payments and receipts have specific dates, such as installment payments with variable dates, XNPV is closer to reality than NPV and easier to reconcile.
  • If you just want to understand the principle or explain the results to others, first use a manual formula for one or two periods, then compare with the function results. This can help you confirm the table is correct.

❓ Frequently Asked Questions (FAQ)

1. Why does the NPV function produce smaller results than my manual calculations?

Most likely, this is because the initial investment was not included, or the initial cash flow is treated as the current point in time. NPV defaults to the first number in the range at the end of period 1, so the initial investment must be added separately outside the formula and confirmed that the period starts from period 1.

2. Should the interest rate in the Excel discount formula be filled in as annual rate or monthly rate?

It depends on the interval between cash flows. Annual cash flow uses the annual interest rate; monthly cash flow uses the monthly interest rate. The annual interest rate is divided by 12. The two cannot be mixed, otherwise the number of installments and interest rates will not match, and the results cannot be compared.

3. Will empty cells in the NPV affect the calculation?

NPV ignores empty cells and does not treat them as zeros, which will move the subsequent period forward and result in errors. If a period truly has no cash flow, it should be filled in as 0.

4. How should you choose the discount rate?

The discount rate usually reflects your cost of capital or the minimum return required by the project, and there is no unified standard. It is recommended to set a range based on your actual situation, calculate the results under several interest rates, and observe whether the conclusion is stable.

5. Are the discounted results calculated in Excel reliable?

Excel's calculations themselves are fine, but the cash flow forecasts and discount rate assumptions may have errors. When making important decisions, it is recommended to double-check the key figures; the results are for reference only and cannot replace professional financial judgment.

📝 Summary

The core of the discount formula is to convert future cash flows into current value. The NPV function commonly used in Excel requires adding the initial investment separately and ensuring the interest rate matches the number of periods. If the amount is the same for each period, use PV; if the dates are irregular, use XNPV. The choice should be based on the actual cash flow pattern. First, use a small example to run the formula smoothly, then apply it to your own project; the result will be more reliable.

Open OmniDoc and process your table file

Updated 2026-11-12