An array that contains numbers for which you want to calculate the internal rate of return. Values must contain at least one positive value and one negative value to calculate the internal rate of return. This function uses the order of values to interpret the order of cash flows. Be sure to enter your payment and income values in the sequence you want.
Optionalguess: number = 0.1A number that you guess is close to the result
of this function. In most cases you do not need to provide guess for this
calculation. If a RangeError is thrown, or if the result is not close to what
you expected, try again with a different value for guess.
The internal rate of return.
Calculates the internal rate of return for a series of cash flows represented by the numbers in
values. These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received for an investment consisting of payments (negative values) and income (positive values) that occur at regular periods.Remarks:
irr()is closely related tonpv(), the net present value function. The rate of return calculated by this function is the interest rate corresponding to a 0 (zero) net present value.