Formualizer Docs

IRR

Calculates periodic internal rate of return for regularly spaced cash flows.

The function iteratively finds the per-period rate where discounted cash flows sum to zero.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=IRR(values, [guess])

Arguments

ArgumentTypeRequiredDefault
valuesanyRequired—
guessnumberOptional—

Remarks

  • Output is a rate per cash-flow period (not automatically annualized).
  • Cash-flow sign convention: outflows are negative and inflows are positive.
  • Non-numeric cells in arrays/ranges are ignored; direct scalar errors are propagated.

Error cases

  • A callable value input returns #CALC!.
  • Returns #NUM! if fewer than two numeric cash flows are available, if derivative is near zero, or if iteration does not converge.

Examples

Find the rate for an investment with three periodic inflows.

Formula =IRR({-100,40,50,30})

Expected result 0.10133104877261

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Start the solver with a different rate guess.

Formula =IRR({-100,40,50,30},0.2)

Expected result 0.101331048772609

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Use the minimum two cash flows, an outlay followed by a larger inflow.

Formula =IRR({-100,115})

Expected result 0.15

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Cash flows all have the same sign, so there is no zero crossing.

Formula =IRR({100,40,50,30})

Expected result #NUM!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Find the periodic return on a 10,000 outlay followed by three increasing receipts.

Formula =IRR({-10000,3000,4200,6800})

Expected result 0.163405600688989

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Solve for the return on four receipts using 10% as the starting guess.

Formula =IRR({-5000,1200,1410,1875,1050}, 0.1)

Expected result 0.0418488760156776

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Why can IRR return #NUM! even with numeric cash flows?

The Newton solve can fail if derivative terms become unstable or no convergent root is reached from the chosen guess.

Implementation

Engine source

On this page