Brian Dunning's FileMaker Custom Functions

IRR ( cf0 ; cf1 ; cf2 ; cf3 ; cf4 ; cf5 ; cf6 ; cf7 ; cf8 ; cf9 ; cf10 ; cf11 ; x1 ; x2 ; accuracy )

Calculates the internal rate of return (IRR)

  Average rating: 4.2 (30 votes) Log in to vote

Pascal Marazzi-de Lima   Pascal Marazzi-de Lima
Wuest&Partner
http://www.wuestundpartner.com

Share on Facebook Share on Twitter

  Sample input:
IRR ( 0 ; -18184526 ; 983537 ; 983537 ; 983537 ; 19683537 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; .2 ; .000001 )
  Sample output:
.0605609345657417

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

A recursive function that calculates the internal rate of return (IRR).

The first investment must be entered as a negative number in cf0, up to 10 cashflows can be entered in cf1 to cf11. x1 is always 0.0, x2 should be 0.2.

Accuracy must be entered as a fraction, eg. 0.000001. This means that the calculation is accurate up to the sixth decimal place.

In normal cases the calculation is done in less than 10 iterations but in some cases (don't know when) it takes longer.

Sometimes exist more than one result for the IRR, this case is not solved yet.

 

Comments

Okcun Sahin   Okcun Sahin, Turkey
Aug 2, 2012
Hi Brian,

Custom functions is the point that I don't know anything at all and I really have to make the calculation of IRR. I used your instructions and filemaker is asking for the field of cf0 do I have to create fields for every variable on your function or am I doing something wrong?
 
PASCAL   PASCAL
Aug 2, 2012
Hi Okcun
First of all you need Filemaker Advanced in order to use custom functions.
The variables cf0, cf1 ... accuracy are the input variables for the custom function, not fields.
This is a recursive function, therefor it only works in custom functions and not in a normal calculation field.

Hope that helps
Pascal
 
Robert   Robert, Luxembourg Europe
Aug 6, 2012
Hallo Pascal,
ich würde gerne Ihre Formel verwenden, jedoch habe ich Probleme sie in die eigenen Funktionen einzubauen. könnten Sie mir vielleicht einen Screenshot zusenden oder hier als Download reinstellen?

Danke
Robert
 
PASCAL   PASCAL
Aug 6, 2012
Hallo Robert
Ich verstehe nicht ganz, welche Probleme Sie haben. Zudem weiss ich nicht, wie ich hier einen Screenshot publizieren kann.
Am besten schicken Sie mir eine Mail mit einer etwas ausführlicheren Beschreibung.

Gruss Pascal
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: