Skip to content
/ xirr Public

JavaScript implementation of LibreOffice XIRR function

License

Notifications You must be signed in to change notification settings

webcarrot/xirr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xirr · GitHub license · npm version · JSR

JavaScript implementation of the XIRR LibreOffice function. It should give the same results as equivalents from LibreOffice Calc, MS Excel, Google Spreadsheet etc.

Usage

import { xirr, CashFlow } from "@webcarrot/xirr";

const flows: Array<CashFlow> = [
  {
    amount: 100,
    date: new Date("2019-02-02"),
  },
  {
    amount: -120,
    date: new Date("2019-03-02"),
  },
];

try {
  console.log("XIRR:", xirr(flows), "of", flows);
} catch (err) {
  console.log(err);
}

About

JavaScript implementation of LibreOffice XIRR function

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published