Cashflow xirr

cashflow-xirr · version 1.0.0 · Financial calculations · free, no key needed

Annual IRR of dated cash flows on the Excel XIRR 365-day basis, with all roots and the chosen root reported.

Use when you need to: XIRR of dated cash flows · annualized return with irregular dates · Excel XIRR function equivalent.

Decide before calling

Read the versioned contract and the supported scope below. Reuse cashflow-xirr@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use cashflow-xirr@1.0.0 for XIRR of dated cash flows. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "cash_flows": [
    {
      "date": "2008-01-01",
      "amount": "-10000"
    },
    {
      "date": "2008-03-01",
      "amount": "2750"
    },
    {
      "date": "2008-10-30",
      "amount": "4250"
    },
    {
      "date": "2009-02-15",
      "amount": "3250"
    },
    {
      "date": "2009-04-01",
      "amount": "2750"
    }
  ],
  "rate_scale": 7
}

Response:

{
  "result": {
    "xirr": "0.3733625",
    "roots": [
      "0.3733625"
    ],
    "sign_changes": 1,
    "multiple_roots_possible": false,
    "method": "brent"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "cashflow-xirr",
  "version": "1.0.0",
  "input": {
    "cash_flows": [
      {
        "date": "2008-01-01",
        "amount": "-10000"
      },
      {
        "date": "2008-03-01",
        "amount": "2750"
      },
      {
        "date": "2008-10-30",
        "amount": "4250"
      },
      {
        "date": "2009-02-15",
        "amount": "3250"
      },
      {
        "date": "2009-04-01",
        "amount": "2750"
      }
    ],
    "rate_scale": 7
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/cashflow-xirr/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"cash_flows":[{"date":"2008-01-01","amount":"-10000"},{"date":"2008-03-01","amount":"2750"},{"date":"2008-10-30","amount":"4250"},{"date":"2009-02-15","amount":"3250"},{"date":"2009-04-01","amount":"2750"}],"rate_scale":7}'

The machine-readable contract is at /v1/tools/cashflow-xirr/versions/1.0.0.

CLI

node cli.mjs run cashflow-xirr 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.