HomeFinance › NPV Calculator

NPV Calculator

Discounts a series of end-of-period cash flows at a required rate of return, subtracts the initial investment and reports the net present value, the present value of each cash flow and the profitability index.

When to use

You are appraising a project or investment with an upfront cost followed by periodic cash flows and want to know whether it creates value at a given discount rate.

Do not use when: You want the rate that makes NPV zero (use irr), the time to recover the outlay (use payback-period), or a single future amount (use present-value).

Formula

NPV = −initial_investment + Σ_{t=1..n} cash_flows[t] / (1 + discount_rate_percent/100)^t; profitability_index = (NPV + initial_investment) / initial_investment

Cash flows occur at the end of each period and the rate is constant; the period of the rate must match the period of the cash flows (annual rate with annual flows).

Inputs

ParameterTypeUnitRequiredDescription
discount_rate_percentnumber% per periodyesRequired rate of return or cost of capital per period in percent (annual for yearly cash flows). Range: ≥ -99, ≤ 1000
initial_investmentnumberyesOutlay at time 0, entered as a positive number. Range: ≥ 0, ≤ 1000000000000000
cash_flowsnumber_listyesNet cash flow at the end of periods 1, 2, 3 … (negative values allowed).

Outputs

OutputTypeUnitDescription
npvnumberΣ CF_t / (1 + r)^t − initial_investment.
present_value_of_cash_flowsnumberΣ CF_t / (1 + r)^t (before subtracting the investment).
profitability_indexnumberpresent_value_of_cash_flows / initial_investment (only when the investment is > 0); above 1 means NPV > 0.
discounted_cash_flowsnumber_listEach CF_t / (1 + r)^t in order.
total_undiscounted_cash_flowsnumberΣ CF_t without discounting.
net_undiscounted_gainnumberΣ CF_t − initial_investment (NPV at 0 %).
decisionstring'Accept' when NPV > 0, 'Reject' when NPV < 0, 'Indifferent' at 0.

Example

−1,000 then 500, 400, 300 at 10 %: {"discount_rate_percent":10,"initial_investment":1000,"cash_flows":[500,400,300]}{"npv":10.52,"present_value_of_cash_flows":1010.52,"profitability_index":1.0105,"discounted_cash_flows":[454.55,330.58,225.39],"total_undiscounted_cash_flows":1200,"net_undiscounted_gain":200,"decision":"Accept (NPV > 0)"}

−10,000 then 3,000, 4,000, 5,000, 2,000 at 8 %: {"discount_rate_percent":8,"initial_investment":10000,"cash_flows":[3000,4000,5000,2000]}{"npv":1646.35,"present_value_of_cash_flows":11646.35,"profitability_index":1.1646,"decision":"Accept (NPV > 0)"}

GET https://tttkmbb.com/api/v1/calculate/npv?discount_rate_percent=10&initial_investment=1000&cash_flows=500%2C400%2C300

Machine access

Sources

FAQ

Which discount rate should I use?

The return available on an alternative of similar risk: a company's weighted average cost of capital for projects, or a hurdle rate. A higher rate lowers NPV.

How do I handle monthly cash flows?

Use a monthly rate: annual_rate/12 for a nominal rate, or (1 + annual)^(1/12) − 1 for an effective one, and list one cash flow per month.

Related calculators