NPV Calculator

Calculate net present value from an initial outlay and a stream of future cash flows, or the simple future value of a lump sum.

How NPV is calculated

NPV sums every cash flow after converting it to today's dollars: NPV = Σ CF_t / (1 + r)^tfor t = 0 to n, where CF_0 is usually the initial investment entered as a negative number, r is the discount rate, and later cash flows get divided by a larger power of (1+r), shrinking their present-day weight the further out they occur.

Worked example

Put $10,000 in, get $3,000 back every year for 5 years, discount at 8%. Adding the outlay and the five discounted payments gives an NPV of $1,978.13, so the deal clears an 8% bar. The undiscounted cash flows total $15,000 against the $10,000 cost. Discounting cuts that $5,000 spread down to under $2,000, which is the actual number that matters for the decision.

Limitations of this calculator

The NPV tab assumes the same cash flow repeats every year. Real projects usually have uneven cash flows year to year, which this simplified version does not model. It also does not account for taxes, inflation beyond whatever is baked into your chosen discount rate, or the risk that projected cash flows simply do not materialize.

How to calculate NPV in Python

def npv(rate, cashflows): # cashflows[0] is at t=0 (usually negative, the initial outlay) return sum(cf / (1 + rate) ** t for t, cf in enumerate(cashflows)) cashflows = [-10000, 3000, 3000, 3000, 3000, 3000] result = npv(0.08, cashflows) print(round(result, 2)) # 1978.13

Nothing here is investment advice, just arithmetic. Real decisions need to weigh risk, taxes, and the chance projected cash flows never show up, none of which a simple NPV model captures on its own. Run the numbers with an advisor before committing real money.

Related Tools