NPV Calculator: Discount Future Cash Flows and Sum Them
About this calculator The net present value (NPV) calculator takes a series of cash flows occurring at fixed intervals—period 0 is usually a negative initial outlay, followed by positive returns in later periods—discounts each of them to “today’s money” at a single discount rate, and adds them up. A positive result means the series is worth more than it costs when measured at the discount rate you specified; a negative result means it is worth less; zero means it exactly breaks even.
The question it is designed to answer is: “If I require an 8% annual return, what is a plan that invests 1,000 now and returns 600 in each of the next two years worth in today’s money?” The same panel also reports the internal rate of return (IRR)—the discount rate at which NPV is exactly zero—and, for reference, the Rule-of-72 doubling time.
What it does not do: it does not tell you what discount rate to use (that depends on your cost of capital, risk and opportunity cost, and is an input, not an output); it does not predict whether the cash flows will actually occur; it ignores taxes, inflation adjustments and financing structure; and it gives no advice on any real project, product or investment. The cash flows and discount rate you enter are your assumptions; the output is the mathematical consequence of those assumptions.
Important notice
This page is an educational and scenario-estimation tool. The 8% and 10% in the examples are demonstration discount rates only and do not represent any market rate, cost of capital or expected return. The results are for informational purposes only and do not constitute investment, tax or legal advice. The calculation convention follows the engine source code; convention date 2026-09-08.
How to use this calculator 01 Open the panel this page corresponds to the “Finance → NPV / IRR” sub-panel (/#/financial/npv-irr). The default cash flows are -100000, 30000, 35000, 40000, 45000 and the default discount rate is 10%. 02 Enter the cash flows in “Cash flows (comma-separated, period 0 first)”, type them in time order; the first number is period 0 (usually the negative outlay). Enter period 0 and at least one later period; every comma-separated item must be a complete finite number, and a zero cash flow must be written explicitly as 0. Blank items, invalid numbers and trailing commas are rejected rather than removed, so later periods are never silently renumbered. 03 Enter the discount rate in “Discount rate (%)”, type a percentage (8, not 0.08). This is the rate per period —if the cash flows are annual it is an annual rate; if monthly, a monthly rate. 04 Read the result card “NPV” is shown to two decimal places; “IRR” is shown as a percentage—if there are several real roots they appear as IRR #1, IRR #2, and if there is none, --- with the reason; “Rule of 72” gives the doubling time at the current discount rate. 05 Check the interpretation and warnings the interpretation below the card explains what the sign of NPV means. When the cash-flow signs change only once the IRR is unique; when they change more than once an orange “multiple IRR” warning appears, and no single IRR can be used on its own for a decision.
Worked examples All three examples were computed by the engine’s npv routine by period-by-period discounting, with IRR found by irrDetailed as the full set of real roots. Displayed amounts follow the interface convention of two decimal places; intermediate values keep four for checking.
Example 1: invest 1,000, receive 600 in each of two years, 8% discount rate
Inputs: cash flows -1000, 600, 600, r = 8 % r = 8\% r = 8% .
Period t t t
Cash flow C F t CF_t C F t
Discount factor 1 / 1.08 t 1/1.08^t 1/1.0 8 t
Present value C F t / 1.08 t CF_t/1.08^t C F t /1.0 8 t
0
−1,000
1.0000
−1,000.0000
1
600
0.9259
555.5556
2
600
0.8573
514.4033
Total
200
—
69.9588
Interface shows: NPV 69.96 , IRR 13.07% , Rule of 72 9.0 years .
Nominally the two years return 1,200, which is 200 more than was invested; but the two payments of 600 are worth only 1,069.96 in today’s money, so against an 8% requirement the plan comes out 69.96 ahead. Raise the discount rate to 12% and NPV falls to 14.03; at 13% only 0.86 remains; a little higher and it turns negative—that crossover is the IRR of 13.07%.
Example 2: panel defaults, five-period cash flows, 10% discount rate
Inputs: cash flows -100000, 30000, 35000, 40000, 45000, r = 10 % r = 10\% r = 10% .
Period t t t
Cash flow C F t CF_t C F t
Discount factor 1 / 1.1 t 1/1.1^t 1/1. 1 t
Present value
0
−100,000
1.0000
−100,000.0000
1
30,000
0.9091
27,272.7273
2
35,000
0.8264
28,925.6198
3
40,000
0.7513
30,052.5920
4
45,000
0.6830
30,735.6055
Total
50,000
—
16,986.5446
Interface shows: NPV 16,986.54 , IRR 17.09% , Rule of 72 7.2 years .
Notice that the 45,000 in period 4 is nominally half again as much as the 30,000 in period 1, yet after discounting it is worth only 3,463 more. Money further in the future is discounted more heavily—this is the time value of money.
Example 3: a plan with negative NPV
Inputs: cash flows -1000, 300, 300, 300, r = 10 % r = 10\% r = 10% .
Present values: − 1000 + 272.7273 + 247.9339 + 225.3944 = − 253.9444 -1000 + 272.7273 + 247.9339 + 225.3944 = -253.9444 − 1000 + 272.7273 + 247.9339 + 225.3944 = − 253.9444 .
The three nominal receipts of 900 are already less than the 1,000 invested; discounting widens the gap.
Interface shows: NPV −253.94 , IRR −5.09% . A negative IRR means the plan does not recover its cost even at a 0% required return; at r = 0 r=0 r = 0 the NPV equals − 1000 + 900 = − 100 -1000+900=-100 − 1000 + 900 = − 100 , which is exactly the nominal loss.
A zero discount rate is a useful sanity check
Set the discount rate to 0 and NPV reduces to the simple sum of the cash flows (200 in Example 1, −100 in Example 3). Every NPV calculation should start with this extreme case to confirm the cash flows were entered correctly.
The inputs of Example 1 can be entered directly into the panel to reproduce it: change the discount rate from 8 to 13.07 and NPV drops to almost zero.
Principles and derivation Why discount
100 today and 100 a year from now are not equivalent: today’s money can be deposited to earn interest, can be used immediately, and carries no risk that the other party fails to pay in a year’s time. If you can deposit money at an annual rate r r r , then C F 1 CF_1 C F 1 received in one year is worth only C F 1 / ( 1 + r ) CF_1/(1+r) C F 1 / ( 1 + r ) today—because depositing that amount for a year grows to exactly C F 1 CF_1 C F 1 . Money two years out is discounted twice, money t t t years out t t t times, giving C F t / ( 1 + r ) t CF_t/(1+r)^t C F t / ( 1 + r ) t . This is the same equation as the future value formula F V = P V ( 1 + r ) t FV = PV(1+r)^t F V = P V ( 1 + r ) t of the compound interest calculator , read in the other direction: compounding pushes today forward into the future; discounting pulls the future back to today.
Figure 1: cash-flow timeline and discounting (8%) for Example 1; the numbers on the arrows are each period’s cash flow discounted to period 0
What NPV means for a decision
NPV measures “how much more today’s money this series earns than break-even, at the return you require”. The discount rate r r r is therefore often called the “required rate of return” or the “opportunity cost of capital”: if the same money could safely earn r r r elsewhere, only a plan with NPV > 0 is worth giving up that alternative for. This is also why the discount rate is an input rather than an output—it is your judgement about the alternative, and the calculator cannot make it for you.
Two important properties of NPV: it is additive (the NPVs of two independent plans sum to the NPV of the combined plan) and scale-sensitive (double every cash flow and NPV doubles). The second property means that when comparing plans of different sizes, the larger NPV is not necessarily the more efficient one—which is why people also look at IRR.
The NPV profile and IRR
Raise the discount rate gradually from 0 and NPV falls from the “nominal sum” (for a conventional invest-then-recover series). The discount rate at which it crosses zero is the IRR. The profile for Example 1 is shown below:
Figure 2: NPV profile for Example 1 (discount rate 0%–30%); the crossing with the horizontal axis is IRR = 13.07%
For Example 1 the IRR can be found by hand: with x = 1 / ( 1 + r ) x = 1/(1+r) x = 1/ ( 1 + r ) , the equation − 1000 + 600 x + 600 x 2 = 0 -1000 + 600x + 600x^2 = 0 − 1000 + 600 x + 600 x 2 = 0 is a quadratic whose positive root is x = − 600 + 600 2 + 4 ⋅ 600 ⋅ 1000 1200 = 0.884437 x = \dfrac{-600 + \sqrt{600^2 + 4\cdot 600 \cdot 1000}}{1200} = 0.884437 x = 1200 − 600 + 60 0 2 + 4 ⋅ 600 ⋅ 1000 = 0.884437 , hence 1 + r = 1 / x = 1.130662 1 + r = 1/x = 1.130662 1 + r = 1/ x = 1.130662 and I R R = 13.0662 % IRR = 13.0662\% I R R = 13.0662% . With more than three cash flows the polynomial is of higher degree and generally has no formula solution; the engine finds the roots numerically.
Why IRR may be multiple, or not exist
N P V ( r ) = 0 NPV(r) = 0 N P V ( r ) = 0 is a polynomial equation of degree n n n in x = 1 / ( 1 + r ) x = 1/(1+r) x = 1/ ( 1 + r ) and has at most n n n real roots. Descartes’ rule of signs tells us the number of positive real roots does not exceed the number of sign changes in the cash-flow sequence. “Invest first, recover later” changes sign once, so the IRR is unique; “invest—recover—invest again” (for example a decommissioning cost at the end of a project) changes sign twice and may have two IRRs. The NPV profile then rises and falls, NPV is positive between the two crossings and negative outside them, and the rule “accept if IRR exceeds the required return” breaks down. If all cash flows are positive or all negative, NPV is never zero and no IRR exists.
The CalcX engine (irrDetailed) finds all real roots and warns explicitly about multiple or missing roots rather than reporting a single number. This is deliberate: collapsing multiple IRRs into one figure is a genuine financial trap.
Relationship to the Rule of 72
The “Rule of 72” shown alongside treats the discount rate as a growth rate and estimates the years needed for money to double as ≈ 72 / r \approx 72/r ≈ 72/ r . It has no direct mathematical connection to NPV; it is simply an intuitive reference at the same rate: at 8%, money nine years out is worth roughly half of its face value today.
Assumptions
Equal spacing : the interval between consecutive cash flows is the same (all annual, or all monthly). Unevenly spaced cash flows need actual-day discounting (XNPV), which this calculator does not support.
End of period : each cash flow is treated as occurring in a single lump at the end of its period; period 0 is “now”.
Single discount rate : the same r r r applies to every period; there is no term structure (different short- and long-term rates).
Rate and periods on the same basis : with annual cash flows r r r is an annual rate; with monthly cash flows it is a monthly rate—the engine does no annualising or de-annualising.
Cash flows are net and certain : one net figure per period, with no split between revenue and cost and no probability or risk adjustment; risk can only be reflected indirectly through a higher discount rate.
Currency-neutral : all cash flows and the NPV share one currency unit; no currency or inflation conversion is performed.
Scope and limitations
Can calculate the total present value of any evenly spaced series of known cash flows at a given discount rate, and every IRR that makes it zero. Suitable for teaching, rough comparison of alternatives and sensitivity analysis (vary the rate and watch NPV).
Approximate only when cash flows do not fall at period end, when rates vary with term, or when the cash flows themselves are uncertain, the result is only a baseline scenario.
Cannot calculate unevenly spaced cash flows (XNPV/XIRR are needed), project appraisals involving taxes and financing structure, or the market value of real assets.
Does not provide a discount rate, judge whether the cash flows are reasonable, or compare or recommend any investment product; results are not return forecasts.
Numerical precision amounts are summed term by term in IEEE 754 double precision and shown to two decimal places; IRR comes from numerical root-finding and is shown to two decimal places, and roots that lie extremely close together may be reported as one.
Common mistakes
Forgetting that period 0 comes first : writing the initial outlay as the last number, or omitting the minus sign, distorts NPV completely. The first number is the cash flow “now”, and an outlay must be negative.
Entering the discount rate as a decimal : the field takes a percentage. Entering 0.08 gives 0.08%, and the NPV of Example 1 becomes 198.56 instead of 69.96.
Monthly cash flows with an annual rate : listing cash flows by month but entering 8% amounts to assuming 8% per month. Either aggregate the cash flows by year or convert the rate to a monthly basis (( 1.08 ) 1 / 12 − 1 ≈ 0.643 % (1.08)^{1/12}-1 \approx 0.643\% ( 1.08 ) 1/12 − 1 ≈ 0.643% ).
Treating NPV as a rate of return : NPV is an amount and scales with size; to compare the efficiency of two plans, look at IRR or normalise by the amount invested.
Concluding from a single IRR : with several sign changes there may be several IRRs; the panel shows IRR #1, IRR #2 and a warning. In that case go by the sign of NPV, not by any one IRR.
Assuming positive NPV is always “good” : NPV > 0 only says the plan pays off at the rate you entered . Set the rate too low and almost everything looks positive; sensitivity analysis (trying several rates) is more informative than a single-point result.
Ignoring the direction of intermediate items : a net outflow in some period (such as a follow-on investment) must be negative; entering it as positive treats a cost as income.
Typical use cases Teaching: an intuitive grasp of the time value of money Enter -100, 0, 0, 0, 100 at 8%: 100 received in four years is worth only 73.50 today, so NPV = −26.50. Set the rate to 0 and NPV returns to 0—the same nominal amount, whose value depends entirely on the discount rate and time.
Rough comparison of two plans Plan A -1000, 600, 600 and Plan B -1000, 0, 1250, both at 8%: A has NPV 69.96, B has 71.67. B returns more in nominal terms (1,250 versus 1,200), but after discounting the two are almost level; raise the rate to 12% and A is 14.03 while B is −3.51—the later-paying B turns negative. Their IRRs are 13.07% and 11.80% respectively: ranked by IRR, A is better; ranked by NPV at 8%, B is marginally better. This is a concrete instance of “NPV and IRR can rank plans differently”.
Sensitivity analysis Hold the cash flows fixed, step the discount rate from 5% to 15%, record how NPV changes, and locate where it crosses zero (the IRR). This says far more about how sensitive the plan is to the rate assumption than a result at a single rate.
Isomorphic problems in engineering and research Whole-life equipment cost (purchase as the period-0 outlay, annual operation and maintenance as negative cash flows, residual value as a final positive cash flow), payback appraisal of energy-efficiency retrofits, and “buy or lease” comparisons for research equipment are all the same discounted sum.
FAQ What discount rate should I use? The calculator cannot decide this for you. Common practice is to use the opportunity cost of capital—the return the same money could earn in an alternative use of similar risk—or a firm’s weighted average cost of capital (WACC). If unsure, try several values and see whether the sign of NPV is stable.
Can NPV and IRR disagree? Yes. When comparing two plans of different size or duration, the plan with the larger NPV may have the lower IRR; when the cash flows change sign more than once, IRR may be multiple or non-existent. The textbook consensus is to rely on NPV, with IRR as a supporting indicator.
Why does IRR show ---? When the cash flows do not change sign (all positive or all negative) the NPV profile never crosses zero and no IRR exists; it also cannot be computed from a single cash flow. The panel states the specific reason underneath.
What if the cash flows are not annual? If they are evenly spaced (monthly, quarterly), simply convert the discount rate to a per-period rate on the same basis. If the spacing is uneven this calculator does not apply; you need XNPV, which discounts by actual days.
Why are results shown to only two decimal places? Amounts are displayed to the cent, following currency convention; internally the calculation is double-precision with no intermediate rounding. If you need more digits, recompute with the discount factors from the example tables.
Can this calculator handle loans or annuities? The principle is the same (a loan is just a series of cash flows with the signs reversed), but the input method is inconvenient. For level repayments use the workbench “Finance → Loan” panel; for deposit-then-withdraw compound-growth problems use the compound interest calculator .
References and further reading
npv (period-by-period discounted sum) and irrDetailed (delegating to numeric.irrAll, an exhaustive real-root search using Descartes’ rule and the Cauchy bound) in the CalcX engine source src/engine/finance.ts; every figure on this page was recomputed by that engine.
Brealey, R. A., Myers, S. C., Allen, F., & Edmans, A. Principles of Corporate Finance , 14th ed. McGraw Hill, 2022. Chapter 2 derives present value and the discount factor; Chapter 5 discusses the NPV and IRR decision rules and the multiple-IRR problem.
Wikipedia, Net present value (访问日期:2026-09-08)—definition, decision rule and comparison with other criteria.
Wikipedia, Internal rate of return (访问日期:2026-09-08)—definition of IRR, multiple solutions and numerical solution.
Wikipedia, Time value of money (访问日期:2026-09-08)—background to the idea of discounting.
Data effective date: 2026-09-08 (this page contains no market rate data; the date refers to when the engine formulas and explanatory text were verified).
Privacy All inputs and calculations run inside your browser and are never uploaded to a server. The text on this page is static content; it neither contains nor records any user input.
Sources & review
Reviewed by CalcX 编辑组
Updated 2026-09-09
Open NPV Calculator: Discount Future Cash Flows and Sum Them in CalcX