NPV & IRR Calculator

Evaluate regular periodic cash flows with NPV and IRR, or irregular dated cash flows with XNPV and XIRR. Enter or import CSV data to receive an accept/reject interpretation, supporting decision metrics, sensitivity analysis, and a calculation audit—all calculated locally in your browser.

Try an example

Each preset calculates immediately; the status message links to its matching worked example.

Settings

Use NPV/IRR for equally spaced flows; use XNPV/XIRR when exact dates matter.

Periodic rate: 10.0000%

Your required return or hurdle rate.

Nominal APR is divided by periods per year; an effective rate uses compound conversion. Dated mode always uses an effective annual rate.

MIRR discounts outflows at the finance rate and compounds inflows at the reinvestment rate.

Decision summary

NPV$0.00
IRR / XIRR
Entered hurdle rate10.0000%
IRR exceeds hurdle?

Enter valid cash flows to evaluate the project.

MIRR
Profitability index
Payback
Discounted payback
Total inflows
Total outflows
Net cash flow
Calculation audit and sensitivity

Cash-flow breakdown

Period / dateCash flowDiscount factorPresent valueCumulative NPV
Total NPV

NPV sensitivity

Annual rateNPV
NPV profileNPV plotted across annual discount rates.

Cash-Flow Table

Enter one complete period/date and amount per row. Negative values are investments or costs.

# Period (t) Cash Flow Action
1
2
3
4

Swipe sideways to edit every column.

Advertisement

How to use and interpret the calculator

  1. Enter your cash flows (negative for investments, positive for returns).
  2. Choose equal periods for regular timing or exact dates for XNPV and XIRR.
  3. Enter the required annual return and confirm the rate convention and day-count basis.
  4. Select Calculate, then review the decision summary, supporting metrics, sensitivity profile and calculation audit.

A positive NPV means the forecast cash flows add value relative to the selected hurdle rate; a negative NPV means they fall short. A unique IRR above that hurdle supports acceptance, but NPV is generally the primary metric for mutually exclusive projects or projects of different scale. Multiple roots make IRR ambiguous, so inspect the NPV profile and MIRR.

Core formulas

NPV = Σ from t=0 to n of CFₜ / (1 + rₚ)ᵗ

IRR solves 0 = Σ from t=0 to n of CFₜ / (1 + IRR)ᵗ

XNPV = Σ from i=0 to n of CFᵢ / (1 + r)ʸⁱ

XIRR solves 0 = Σ from i=0 to n of CFᵢ / (1 + XIRR)ʸⁱ

CFₜ or CFᵢ
Cash flow at period t or date i.
t
Number of equal periods from time zero.
rₚ
Periodic discount rate. For an effective annual rate, rₚ = (1 + r)1/m − 1; for nominal APR, rₚ = APR/m, where m is 1, 4 or 12.
r
Effective annual discount rate used by XNPV.
yᵢ
Year fraction between the base date and cash-flow date under Actual/365 or Actual/Actual.
n
Final period or cash-flow index.

Excel and Google Sheets: their periodic NPV functions commonly treat every supplied value as occurring after time zero, so add a time-zero investment separately. XNPV uses exact dates. Results can still differ because of day-count, rate conversion, date ordering or displayed rounding.

Examples and edge cases

Standard capital-budgeting project

Cash flows −1,000, +400, +400 and +400 at 10% produce NPV ≈ −5.26 and IRR ≈ 9.7010%. The project narrowly misses the hurdle.

Irregular dated cash flows

The dated preset uses milestone payments on 2025-01-01, 2025-06-15, 2026-03-01 and 2027-01-20. XNPV/XIRR use the actual dates rather than pretending the intervals are equal.

Verified negative-NPV case

Cash flows −1,000, +300, +400 and +500 at 10% produce NPV ≈ −21.04 and IRR ≈ 8.8963%. The embedded regression check verifies both figures against the preset.

Multiple-IRR case

Cash flows −100, +230 and −132 have two roots: 10% and 20%. A single IRR is therefore not a reliable decision rule; use NPV at the required return, MIRR and the profile.

Limitations

  • Outputs depend on forecast cash flows and the selected rate; they do not model uncertainty, financing constraints or scenario probabilities.
  • Payback ignores cash flows after recovery, and undiscounted payback ignores the time value of money.
  • Profitability index can help under capital rationing but can rank mutually exclusive projects differently from NPV.
  • Keep nominal cash flows with nominal rates, or real cash flows with real rates. Add taxes to the cash flows when after-tax analysis is required.

Review and methodology

Reviewed by: Independent qualified finance review not yet completed. No reviewer credentials are claimed.

Updated: 18 July 2026. Method: discounted-cash-flow equations shown above; a log-spaced root scan with bisection and local-minimum refinement reports distinct detected IRR/XIRR roots, including roots where NPV touches rather than crosses zero. Precision: calculations use JavaScript double precision; money is displayed to 2 decimals, rates to 4 decimals, and unrounded values feed every downstream metric.

References: Brealey, Myers & Allen, Principles of Corporate Finance; Microsoft NPV documentation; Microsoft XNPV documentation; and Google Sheets NPV documentation.

Educational-use disclaimer: This calculator supports analysis and learning; it is not financial, tax or investment advice. Verify material decisions with qualified professionals and independent models.

Frequently asked questions

What does a negative or zero NPV mean?

A negative NPV means the forecast cash flows do not meet the selected required return; zero NPV means they exactly meet it, subject to the assumptions and forecast accuracy.

Should I use NPV or IRR?

Use NPV as the primary value measure, especially for mutually exclusive projects or projects of different size. IRR is a useful supporting percentage return when it is unique.

What discount rate should I choose?

Use a rate consistent with the cash flows, commonly a risk-adjusted required return or weighted average cost of capital. Treat the result as a sensitivity rather than a universal rate.

What is the difference between IRR and XIRR?

IRR assumes equally spaced cash flows. XIRR uses the exact dates and the selected day-count basis, so it is appropriate for irregular timing.

Why can there be multiple or no IRRs?

Cash flows that change sign more than once can produce multiple rates where NPV equals zero, while some patterns never cross zero. Review every reported root, the NPV profile and MIRR.

What is MIRR?

Modified internal rate of return finances negative cash flows at a finance rate and compounds positive cash flows at a reinvestment rate, producing one return for the modeled interval.

How should I handle inflation and taxes?

Use nominal cash flows with a nominal discount rate or real cash flows with a real rate, and do not mix them. Model taxes in the cash flows when the decision requires after-tax analysis.

How do I compare mutually exclusive projects?

Compare projects at the same valuation date and consistent discount rate, then generally prefer the feasible project with the highest positive NPV rather than automatically choosing the highest IRR.

Why can spreadsheet results differ?

Spreadsheet NPV functions commonly discount every supplied value by one period, so a time-zero investment is usually added separately. XNPV uses exact dates, and day-count, rate-conversion and rounding choices can also differ.

Explore more tools