# IRR Calculator (Internal Rate of Return)

> IRR Calculator (Internal Rate of Return) is a paid API for AI agents from finance.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Computes the internal rate of return per period for a series of cash flows using bounded bisection, rejecting flows without sign changes or a bracketable root.

## Facts

- Endpoint: POST https://finance.openverbs.com/v1/irr
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/irr-calculator-internal-rate-of-return-83c73a2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H41UdjTOS-v4_VuAGWIyK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability irr-calculator-internal-rate-of-return-83c73a2a -d '<json body>'
```

Example prompt: Calculate the IRR for this investment: I put in -10000 at time 0, then receive 3000, 4000, 4500, and 5000 over the next four periods — what's the per-period rate of return?

## When to prefer this

Use this endpoint when you need to solve for the discount rate that makes the NPV of a cash flow series equal to zero — the classic IRR computation. It is ideal for capital budgeting, investment comparisons, and return analysis where the cash flows have mixed signs. The bounded bisection solver is robust for conventional cash flows. Prefer this over manual NPV iteration or spreadsheet solvers when building automated financial analysis pipelines. Choose the sibling NPV endpoint instead if you already know the discount rate and want to compute net present value directly.

## Known failure modes

- All cash flows have the same sign (no sign change) — returns 400
- No bracketable root exists for the given cash flow pattern — returns 400
- Fewer than 2 cash flows provided — returns 400 (minItems violated)
- More than 10,000 cash flows provided — returns 400 (maxItems violated)
- Non-numeric values in cashflows array — returns 400 schema validation error
- Multiple IRRs exist for non-conventional cash flows — bisection may return one root without warning

## How this service works

Internal rate of return (per period) of a series of cash flows, solved with a bounded bisection. Requires at least one positive and one negative flow; flows with no sign change or no bracketable root are rejected as a clean 400.

## Output

Returns the computed internal rate of return per period (as a decimal rate) for the provided cash flow series. If the cash flows have no sign change or no bracketable root, the endpoint returns a 400 error with a clear rejection message.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "cashflows"
     ],
     "properties": {
      "cashflows": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "maxItems": 10000,
       "minItems": 2,
       "description": "Cash flows by period; index 0 is time 0. Needs mixed signs."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/irr-calculator-internal-rate-of-return-83c73a2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finance.openverbs.com](https://www.zero.xyz/host/finance.openverbs.com/llms.txt)
