# 24KLabs Percentage Calculator

> 24KLabs Percentage Calculator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Performs percentage computations including percent-of, percent-change, tip calculation, and X-is-what-percent-of-Y in a single endpoint.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/percentage-calc
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24klabs-percentage-calculator-717a0960
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W_MvCEJcosYFAYqIBsBSt

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 24klabs-percentage-calculator-717a0960 -d '<json body>'
```

Example prompt: What is 18% of 340, and also what percentage change is that from the original 340 if I add 18% to get the new value?

## When to prefer this

Choose this endpoint when an agent needs quick, reliable percentage math without implementing arithmetic logic itself — especially useful for financial summaries, tip calculations, growth metrics, or ratio analysis in a single standardized call. Prefer it over general-purpose code execution when you want a deterministic, low-latency math result with a predictable response shape.

## Known failure modes

- Missing or non-numeric input values return a 400 validation error
- Invalid or unsupported calculation type returns an error indicating valid operation types
- Division by zero scenarios (e.g. base value of 0 for what-percent) return an error or undefined result
- Malformed JSON body results in a 400 parse error

## How this service works

Percent-of, percent-change, tip, and X-is-what-percent-of-Y in one endpoint.

## Output

Returns the computed numeric result for the requested percentage operation, including the calculated percentage value, derived amount, or ratio depending on the operation type (percent-of, percent-change, tip, or what-percent-of).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "op": {
   "type": "string"
  },
  "to": {
   "type": "number"
  },
  "from": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": 25
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24klabs-percentage-calculator-717a0960/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
