# 24K Labs Percentage Calculator

> 24K Labs 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).

Computes percent-of, percent-change, tip amount, and 'X is what percent of Y' calculations in a single endpoint.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/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/24k-labs-percentage-calculator-c5a8cb1b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tx533Xqn2mOFE98DRLraS

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 24k-labs-percentage-calculator-c5a8cb1b -d '<json body>'
```

Example prompt: What is 18% of $74.50 for a tip, and what percent change is that compared to my usual 15% tip on the same amount?

## When to prefer this

Choose this endpoint when you need a quick, reliable server-side percentage computation without implementing arithmetic logic client-side. It handles four distinct percentage calculation modes in one call, making it ideal for agents that need to answer percentage-related user questions on the fly. Prefer it over general-purpose code execution endpoints when you want a dedicated, low-latency math microservice with a predictable schema.

## Known failure modes

- Missing required input values — returns error if base or comparison numbers are absent
- Division by zero if Y is zero in an X-is-what-percent-of-Y query
- Invalid or unrecognized calculation type specified
- Non-numeric input values causing a parse error
- Payment failure or insufficient USDC balance blocks the request

## 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 — such as the percentage value, the percent change (positive or negative), the tip amount, or the ratio result showing what percent X is of Y. Results are returned as precise decimal numbers with context about which calculation type was performed.

## 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/24k-labs-percentage-calculator-c5a8cb1b/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)
