NPV, IRR & Payback Calculator
When does my investment pay back, and what is its NPV and IRR?
Single calculationv1.1.0Verified 2026-11-01Runs in your browser
Spec sheet
dcf_npv_irr · v1.1.0Method
Discounted cash flow
- 01
NPV = Σ CFₜ / (1 + r)ᵗ, t = 0…N, CF₀ = −initial investment - 02
IRR: real roots of NPV(r) = 0, selected as numpy-financial does - 03
MIRR = (FV⁺ at reinvest rate / PV⁻ at finance rate)^(1/(n−1)) · (1 + r_reinvest) − 1 - 04
Payback: first year cumulative cash flow ≥ 0 (linear within the year)
Limits — read before relying on it
- Cash flows are assumed at year end.
- IRR may not be unique when cash flows change sign more than once; the root is chosen with numpy-financial's selection rule. MIRR avoids this ambiguity.
Sources
- numpy-financial (BSD-3) — npv, irr, mirr, ported to TypeScript ↗library
- Discounted cash flow analysis (standard corporate finance)textbook