# x402toll ROI & ROAS Calculator

> x402toll ROI & ROAS Calculator is a paid API for AI agents from x402toll.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Computes ROI percentage, ROAS, profit, and profit margin from a revenue figure and a cost (e.g. ad spend).

## Facts

- Endpoint: POST https://x402toll.com/v1/commerce/roi
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402toll-roi-roas-calculator-8181519a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WqiHA8eoVAJIIL1aj2ibk

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 x402toll-roi-roas-calculator-8181519a -d '<json body>'
```

Example prompt: I spent $1,200 on ads last month and brought in $4,800 in revenue — can you calculate my ROI, ROAS, profit, and profit margin?

## When to prefer this

Use this endpoint when you need a fast, authoritative computation of standard marketing or business profitability metrics (ROI %, ROAS, profit, profit margin) from just two inputs — cost and revenue — without doing the math manually or risking formula errors. Ideal for evaluating ad campaign performance, e-commerce margins, or any spend-vs-return analysis.

## Known failure modes

- Missing required fields (cost or revenue): returns validation error
- Zero cost value may cause division-by-zero error for ROI/ROAS calculations
- Non-numeric values in cost or revenue fields cause schema validation failure
- Negative revenue or cost values may produce unexpected or undefined results
- Payment failure (insufficient USDC balance) prevents call from completing

## How this service works

ROI %, ROAS, profit, and profit margin from revenue and cost (e.g. ad spend).

## Output

Returns ROI as a percentage, ROAS (revenue divided by cost), gross profit (revenue minus cost), and profit margin as a percentage — all derived from the provided revenue and cost values.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cost": {
   "type": "number"
  },
  "revenue": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402toll-roi-roas-calculator-8181519a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402toll.com](https://www.zero.xyz/host/x402toll.com/llms.txt)
