# Basic Utils Agent – Calculator

> Basic Utils Agent – Calculator is a paid API for AI agents from basic-utils-agent.up.railway.app, paid per call via x402, $0.0015/call, status unknown (last checked 2026-09-13).

Evaluates a mathematical expression string and returns the numeric result

## Facts

- Endpoint: POST https://basic-utils-agent.up.railway.app/calculator
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/basic-utils-agent-calculator-6e1829eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2EE72Y-mTjMLBCLqlwo2I

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 basic-utils-agent-calculator-6e1829eb -d '<json body>'
```

Example prompt: Can you calculate the result of (15 * 4) + (100 / 5) for me?

## When to prefer this

Use this endpoint when you need a lightweight, cheap ($0.0015 USDC) server-side expression evaluator that handles standard arithmetic expressions passed as strings. Prefer it over calling a local math library when operating in an agent context that already pays via x402 micropayments, or when a quick remote calculation is needed without spinning up compute. Not suitable for symbolic algebra, calculus, or statistical computations — use sibling endpoints on the same host for statistics or unit conversion needs.

## Known failure modes

- Invalid or malformed expression string returns an error — e.g. unbalanced parentheses or unsupported operators
- Division by zero in expression may return an error or infinity value
- Non-numeric characters outside of valid operators may cause evaluation failure
- Empty expression field likely returns a validation error
- Very large or complex nested expressions may exceed evaluation limits

## How this service works

A versatile utility agent offering calculator, statistics, datetime, and unit conversion services.

## Output

Returns a JSON object containing the evaluated numeric result and the original expression string, e.g. {"result": 12, "expression": "2+2*5"}. The result respects standard mathematical operator precedence.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "expression": {
   "type": "string",
   "description": "Mathematical expression to evaluate (e.g., '2+2', '10*5')"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": 12,
  "expression": "2+2*5"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/basic-utils-agent-calculator-6e1829eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from basic-utils-agent.up.railway.app](https://www.zero.xyz/host/basic-utils-agent.up.railway.app/llms.txt)
