MIRR

function MIRR(arg1: ApiRange = null, arg2: number = null, arg3: number = null): number | string | boolean

Description

Returns the internal rate of return for a series of periodic cash flows, considering both cost of investment and interest on reinvestment of cash.

Parameters

arg1ApiRangedefault: null

Is an array or a reference to cells that contain numbers that represent a series of payments (negative) and income (positive) at regular periods.

arg2numberdefault: null

Is the interest rate you pay on the money used in the cash flows.

arg3numberdefault: null

Is the interest rate you receive on the cash flows as you reinvest them.

Returns

number | string | boolean

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var values = ["Values", "-$40,000.00", "$10,000.00", "$15,000.00", "$20,000.00"];

for (var i = 0; i < values.length; i++) {
   oWorksheet.GetRange("A" + (i + 1)).SetValue(values[i]);
}

oWorksheet.GetRange("B1").SetValue("Paid interest rate");
oWorksheet.GetRange("B2").SetValue(0.2);
oWorksheet.GetRange("C1").SetValue("Received interest rate");
oWorksheet.GetRange("C2").SetValue(0.23);

var oRange = oWorksheet.GetRange("A2:A5");
oWorksheet.GetRange("B5").SetValue(oFunction.MIRR(oRange, 0.2, 0.23));

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).