# QuantOracle IRR Calculator

> QuantOracle IRR Calculator is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the Internal Rate of Return (IRR) for a series of cash flows, returning the periodic rate, annualized percentage, NPV at IRR, and investment summary statistics.

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/tvm/irr
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-0bb3c014
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1q9vdr5msCgpVqGacK6N7

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 api-quantoracle-dev-0bb3c014 -d '<json body>'
```

Example prompt: What's the IRR on an investment where I put in $10,000 upfront and receive $3,000, $4,000, $4,500, and $5,000 over the next four periods?

## When to prefer this

Use this endpoint when you need a fast, precise IRR calculation from a known cash flow series, especially in financial modeling, project evaluation, or investment screening workflows. Prefer it over spreadsheet tools or manual iteration when automating capital budgeting or portfolio analysis pipelines.

## Known failure modes

- No sign change in cash flows (all positive or all negative) — IRR cannot be computed, returns error
- Non-convergence when cash flows have multiple IRR solutions (non-normal cash flows)
- Empty or single-element cash_flows array — insufficient data for IRR
- Invalid data types in cash_flows (non-numeric values)

## How this service works

QuantOracle: tvm/irr

## Output

Returns the IRR as a decimal and percentage, the number of periods, the NPV at the computed IRR (should be ~0), total amount invested, total cash received, and the profit multiple (total received / total invested). Also includes computation time in milliseconds.

## Example request

```json
{
 "input": {
  "body": {
   "cash_flows": [
    -10000,
    3000,
    4000,
    4500,
    5000
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cash_flows": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Cash Flows",
   "minItems": 2,
   "description": "Array of cash flows (first is typically negative = initial investment)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-0bb3c014/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
