# Agent402 UK IRR Calculator (Newton-Raphson)

> Agent402 UK IRR Calculator (Newton-Raphson) is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.002/call, status down (last checked 2026-10-12).

Computes the Internal Rate of Return for a cashflow series using the Newton-Raphson iterative method, returning IRR and convergence status.

## Facts

- Endpoint: POST https://agent402.co.uk/v1/math/irr?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-uk-irr-calculator-newton-raphson-988d849d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hlx_mJ5ei8Q7TOKC17Ncj

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 agent402-uk-irr-calculator-newton-raphson-988d849d -d '<json body>'
```

Example prompt: Calculate the exact IRR for this cashflow series using Newton-Raphson: [-100000, 20000, 30000, 40000, 50000], starting with an initial guess of 0.1.

## When to prefer this

Use this endpoint when an AI agent must compute IRR with mathematical precision rather than relying on LLM approximation or token-based arithmetic. It is the right choice for financial analysis tasks where convergence guarantees matter, when the cashflow series has more than a few periods, or when the result will feed downstream financial decisions requiring accuracy. Prefer over manual agent math whenever exact IRR and a convergence indicator are needed.

## Known failure modes

- Non-convergence when cashflows have no sign change or multiple IRRs exist — converged returns false
- Invalid cashflow array (empty or non-numeric values) — likely 400 error
- Cashflow series where Newton-Raphson diverges — may return unconverged result or error
- Payment failure via x402 protocol — 402 response before computation occurs

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

Returns a JSON object containing 'irr' (the computed internal rate of return as a decimal, e.g. 0.228901) and 'converged' (a boolean indicating whether the Newton-Raphson algorithm successfully converged to a solution).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "guess": {
   "type": "number",
   "description": "Initial guess (default 0.1)"
  },
  "cashflows": {
   "type": "array",
   "description": "Cashflows by period"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "irr": 0.228901,
  "converged": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-uk-irr-calculator-newton-raphson-988d849d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
