# Exact Financial & Token Math Calculator

> Exact Financial & Token Math Calculator is a paid API for AI agents from api.webbersites.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Performs precise financial computations (compound interest, loan amortization, NPV, IRR) and exact token unit conversions using BigInt arithmetic to avoid floating-point errors

## Facts

- Endpoint: POST https://api.webbersites.com/api/calc/finance
- 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/exact-financial-token-math-calculator-e4a80716
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fePyGyepROf-UqXBWlbjZ

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 exact-financial-token-math-calculator-e4a80716 -d '<json body>'
```

Example prompt: Calculate the amortization schedule for a $250,000 loan at 6.5% annual interest over 30 years with monthly payments — I want the monthly payment amount and total interest paid.

## When to prefer this

Choose this endpoint when you need mathematically exact financial calculations — especially for crypto token unit conversions where float64 precision loss would corrupt 18-decimal values (ETH, USDC), or when you need a full amortization schedule, compound growth with contributions, NPV, or deterministic IRR that a general-purpose LLM might approximate incorrectly.

## Known failure modes

- Missing or unrecognized 'op' field returns an error
- Invalid or missing required fields for the chosen operation (e.g. no principal for amortize)
- cashflows array empty or missing for npv/irr operations
- IRR bisection fails to converge for pathological cash flow series
- token_units called without specifying 'to', 'amount', or 'decimals'
- Payment failure or x402 protocol error if USDC balance is insufficient

## How this service works

Exact financial + token math. POST {op:…}: compound (growth with per-period contributions), amortize (payment, total interest, schedule), npv, irr (deterministic bisection) — and token_units: exact decimal↔base-unit conversion via BigInt for any token decimals (ETH 18, USDC 6), the 18-decimal math that float64 silently corrupts. Iterative series computed exactly, never guessed.

## Output

Returns exact numerical results for the requested financial operation: for compound, the final balance; for amortize, the periodic payment, total interest, and full amortization schedule; for npv, the net present value; for irr, the internal rate of return via bisection; for token_units, the precise decimal or base-unit representation as a BigInt-accurate string.

## 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": {
     "required": [
      "op"
     ],
     "properties": {
      "op": {
       "type": "string",
       "description": "compound | amortize | npv | irr | token_units"
      },
      "to": {
       "type": "string",
       "description": "token_units — base | decimal"
      },
      "rate": {
       "type": "number",
       "description": "annual %, e.g. 6.5"
      },
      "years": {
       "type": "number"
      },
      "amount": {
       "type": "string",
       "description": "token_units — decimal or base-unit string"
      },
      "decimals": {
       "type": "number",
       "description": "token_units — ETH 18, USDC 6"
      },
      "cashflows": {
       "type": "array",
       "description": "npv/irr — period 0 first"
      },
      "principal": {
       "type": "number"
      },
      "periods_per_year": {
       "type": "number",
       "description": "default 12"
      },
      "contribution_per_period": {
       "type": "number"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "op": {
       "type": "string"
      },
      "npv": {
       "type": "number"
      },
      "decimal": {
       "type": "string"
      },
      "irr_pct": {
       "type": "number"
      },
      "schedule": {
       "type": "array"
      },
      "base_units": {
       "type": "string"
      },
      "future_value": {
       "type": "number"
      },
      "total_interest": {
       "type": "number"
      },
      "payment_per_period": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "amortize",
  "periods": 360,
  "total_interest": 382633.47,
  "payment_per_period": 1896.2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/exact-financial-token-math-calculator-e4a80716/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.webbersites.com](https://www.zero.xyz/host/api.webbersites.com/llms.txt)
