IRR Calculator (Internal Rate of Return)
This tool calculates the Internal Rate of Return (IRR) using three common approaches: periodic IRR for equal-length periods, XIRR for cash flows with irregular dates, and MIRR when finance and reinvestment rates differ.
Enter cash flows as a comma-separated list (first value typically the negative initial investment). For XIRR provide matching ISO-format dates. Use solver guess and precision to control convergence; results are reported as annual rates unless you adjust 'Periods per year'.
Computes the internal rate of return assuming equal-length periods (annual, monthly, etc.). The solver finds rate r such that NPV = 0.
Inputs
Advanced inputs
XIRR date inputs
MIRR rate inputs
Results
IRR (periodic)
—
NPV at IRR
—
| Output | Value | Unit |
|---|---|---|
| IRR (periodic) | — | % |
| NPV at IRR | — | — |
Visualization
Methodology
Periodic IRR solves for the rate r that makes the net present value (NPV) of equal-period cash flows equal zero: NPV = sum_{t=0..n} CF_t / (1+r)^t. A numerical root-finding algorithm (e.g. Newton-Raphson with fallback to secant/bisection) is used with a user-provided initial guess and precision limit.
XIRR generalizes IRR by using actual day counts between cash flow dates; the solver finds r such that XNPV(r) = sum CF_t / (1 + r)^{(days_t/365)} = 0, or an equivalent day-count convention when periods_per_year is adjusted.
MIRR computes a single rate that equates the future value of positive cash flows reinvested at the reinvestment rate to the present value of negative cash flows discounted at the finance rate. MIRR is preferable when financing and reinvestment rates differ.
Worked examples
Example A (periodic): Cash flows -10000, 3000, 4200, 6800 with periods_per_year=1 yields the periodic IRR computed by solving NPV=0.
Example B (XIRR): Cash flows -10000 on 2020-01-01, 3000 on 2020-07-01, 7000 on 2022-03-15. Use XIRR with matching dates_series to account for irregular timing.
Further resources
External guidance
Expert Q&A
What input format is required for cash flows and dates?
Enter cash flows as a comma-separated list. For XIRR, provide a comma-separated list of ISO-format dates (YYYY-MM-DD) with the same number of entries as the cash flows.
When should I use MIRR instead of IRR?
Use MIRR when the project's cash inflows are likely to be reinvested at a different rate than the project's financing cost. MIRR explicitly separates finance and reinvestment rates to give a more realistic return measure.
How accurate are results and what are the limits?
The solver provides numerical solutions subject to initial guess, convergence tolerance, and cash-flow patterns. Multiple sign changes in cash flows can produce multiple IRRs or no real IRR. XIRR uses day-count assumptions and reports an annualized rate. Validate critical decisions with alternative metrics (NPV, payback, scenario analysis).
How do you ensure the tool's correctness and reliability?
Numeric methods, unit tests, and regression tests are used during development. Follow software quality and testing guidance such as ISO 9001 for quality management, IEEE test documentation practices for algorithm verification, and NIST recommendations for software assurance. Results are advisory and should be cross-checked for high-stakes decisions.
Sources & citations
- NIST - Software and Systems Assurance guidance — https://www.nist.gov
- ISO 9001 — Quality management systems — https://www.iso.org/iso-9001-quality-management.html
- IEEE Standards Association — https://standards.ieee.org
- OSHA — Worker safety and software development environments — https://www.osha.gov