none
Excel IRR / XIRR Source Code or Library RRS feed

  • Question

  • Hello, I hope I have the right forum here.

    I am looking for either the Source Code or a Library for the exact same IRR calculation that Excel uses.

    (I need to be able to implement this in a .NET web service in a supported fashion, hopefully from C#)



    I have used and tried other libraries, including those in the Microsoft.VisualBasic.Financial Class, but the results often differ from Excel. Sometimes excel fails with #err while the tested Class/Library works, and sometimes its the other way around. Although the results are theoretically valid IRR results, the accuracy does not match beyond 1 to 4 decimals, usually. This is not confidence-inspiring to our users and so I have to rule this approach as unsuitable for our needs.



    I have also looked into automating a solution with Excel, but this is not supported: see kb 257757. (I cannot use solutions relying on Microsoft.Office.Interop.Excel)



    I am only interested in solutions that always give the same result as Excel to the 9th decimal of accuracy or better.  (must match exactly at least 9 decimals out). The calculation should work when Excel works and fail when excel fails. 100%. 

    Why do I need this? We need to calculate figures that would match the simulations our users create in Excel. If they do not match, it creates unnecessary work proving/explaining that there are no errors. If they match exactly, then we don't waste time, and our users will accept our solution.














    • Edited by David Hoist Thursday, April 21, 2016 1:52 PM grammar
    Sunday, March 20, 2016 1:08 PM

All replies