Skip to main content

IRR - script function

IRR() returns the aggregated internal rate of return for a series of cash flows represented by the numbers in the expression iterated over a number of records as defined by a group by clause.

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.The function needs at least one positive and one negative value to calculate.

This function uses a simplified version of the Newton method for calculating the internal rate of return (IRR).



Return data type: numeric


  • value: The expression or field containing the data to be measured.


Text values, NULL values and missing values are disregarded.

Examples and results:  

Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.


LOAD 2013 as Year, * inline [






] (delimiter is '|');



LOAD Year,IRR(Payments) as IRR2013 Resident Cashflow Group By Year;

Example results
Year IRR2013



Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: