NPV and IRR
npv_irrStandard precision: this calculator uses ordinary floating-point arithmetic, keeps no dated table of official rates, and has not yet passed our full reference-test suite. Compute Net Present Value (NPV), Internal Rate of Return (IRR) via iterative Newton-Raphson polynomial convergence, and discounted payback period for capital budgeting and investment appraisal.
Behavior: Deterministic, idempotent calculation with zero external side effects. Evaluates NPV = -C0 + sum(Ct / (1 + r)^t). Computes exact IRR by finding the discount rate where NPV equals zero using up to 100 Newton-Raphson iterations with tolerance 1e-7. Returns NPV, IRR percentage, profitability index (PI), and payback period in periods/years.
Usage Guidelines: Use for evaluating capital investments, M&A valuations, corporate projects, and multi-year cash flow hurdle rates. Do not use for simple compound interest projections with fixed monthly deposits; use compound_wealth instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cashflows | Yes | Series of sequential periodic net cash inflows starting from period 1 onwards. Minimum 1 cash flow required. | |
| initialInvestment | Yes | Upfront initial capital outlay at period 0 in currency units. Entered as a positive number (treated as cash outflow). Must be positive. | |
| discountRatePercent | No | Annual cost of capital or hurdle discount rate percentage (e.g. 10.0 for 10%). |