Brian Dunning's FileMaker Custom Functions

XIRR ( cashFlowList ; cashFlowDateList ; guessRate )

Returns extended internal rate of return - XIRR. Mimics Excel XIRR function.

  Average rating: 4.4 (25 votes) Log in to vote

Lewis Lorenz   Lewis Lorenz - Show more from this author
Lorenz Companies
http://www.LorenzCom.com

Share on Facebook Share on Twitter

  Sample input:
when using:
numbers: -6777.00, -6000.00, 150.00, 300.00, 300.00, 300.00, 300.00, 300.00, 12960.00
dates: 4-30-2001, 9-17-2001, 9-28-2001, 4-2-2002, 9-30-2002, 3-31-2003, 9-30-2003, 3-31-2004, 5-5-2004,

XIRR ( list ( data::number ) ; list ( data::date ) ; ".01" )
  Sample output:
.0510565877350815

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

Extended Internal Rate of Return

XIRR ( cashFlowList ; cashFlowDateList ; guessRate )

Returns the eXtended Internal Rate of Return of a list of cash flows with corresponding cash flow dates. Mimics Excel XIRR function.

Example:

when using:
numbers: -6777.00, -6000.00, 150.00, 300.00, 300.00, 300.00, 300.00, 300.00, 12960.00
dates: 4-30-2001, 9-17-2001, 9-28-2001, 4-2-2002, 9-30-2002, 3-31-2003, 9-30-2003, 3-31-2004, 5-5-2004,

XIRR ( list ( data::number ) ; list ( data::date ) ; ".01" ) = .0510565877350815

 

Comments

Sean Oliver   Sean Oliver, Finance Technology Services Ltd
Apr 26, 2019
This function works really well and has always mimicked the Excel function for me.
 
Albert Steg   Albert Steg
Nov 3, 2020
Hi -- I currently use the XIRR function to calculate my annualized investment returns in Excel on a spreadsheet someone set up for me (I'm Excel-illiterate). In my spreadsheet, at the end of the schedule of inflows and outflows, I enter my current account valuation on today's date as a negative value. I don't see anyplace in this custom function example for expressing the current valuation. Could someone explain what I'm missing, or how I would use this custom function for the purpose I describe? Thanks!
 
Albert Steg   Albert Steg
Nov 3, 2020
Oh I think I see -- this function uses negative numbers for the inflows and positive for the withdrawals and then a positive from the current balance, which is just the reverse of what I had seen before?
 
Benny DB   Benny DB, B&E Equities
Dec 1, 2020
Stated that I'm not an expert of FM, I'm trying to move a big Excel file to FM 19 and I'd need XIRR performance result. I found this function, it seems to fit but, as suggested I copied & pasted into Custom Functions editor, then I set a calculation field with the new XIRR function. Unfortunately, immediately after I have always #NUMMISSING message. I tried to enter in the script but is far too complicate for me. I feel my problem is related to the variables and the link with the fields.

Does anybody any suggestions?
 
Benny DB   Benny DB, B&E Equities
Dec 2, 2020
SOLVED!! It was my inexperience on FM.

I created 2 Summary fields (cashFlowsList and dateList), option "List of" and collecting the cashflows and dates sources. Then I created a Calculation field with the XIRR function as follows:
XIRR ( list ( cashFlowList ); list ( dateList ); "0.1" )

It works.

Thanks Lewis for your work.
 

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: