# AgentTools Margin & Markup Calculator

> AgentTools Margin & Markup Calculator is a paid API for AI agents from agenttools-hub.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Calculates gross profit, profit margin (profit as % of selling price), and markup (profit as % of cost) from a unit cost and selling price.

## Facts

- Endpoint: GET https://agenttools-hub.vercel.app/api/v1/finance/margin-calculator?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agenttools-margin-markup-calculator-2a273d28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BpoL0QnTk33qf-Ox2o2cn

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 agenttools-margin-markup-calculator-2a273d28
```

Example prompt: My product costs me $35 to make and I sell it for $60 — can you tell me both the profit margin and the markup percentage so I understand the difference?

## When to prefer this

Choose this endpoint when you need both profit margin and markup computed simultaneously from cost and price inputs — especially useful when users conflate the two metrics. Ideal for quick pricing calculations in e-commerce, retail, freelance, or manufacturing contexts without needing a full accounting system.

## Known failure modes

- Missing required 'cost' or 'price' query parameter returns an error
- Non-numeric values for cost or price cause a validation error
- Zero cost value may cause division-by-zero for markup calculation
- Negative values may return unexpected or undefined results
- Service unavailability due to Vercel hosting downtime

## How this service works

Calculate gross profit, profit margin (profit as % of price) and markup (profit as % of cost) from a unit cost and selling price — the two numbers people constantly mix up. Use this when an agent needs to profit margin vs markup, both computed.

## Output

Returns gross profit (selling price minus cost), profit margin as a percentage of selling price, and markup as a percentage of cost — giving both figures that are frequently confused with one another.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "cost",
      "price"
     ],
     "properties": {
      "cost": {
       "type": "number",
       "description": "Cost"
      },
      "price": {
       "type": "number",
       "description": "Selling price"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agenttools-margin-markup-calculator-2a273d28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agenttools-hub.vercel.app](https://www.zero.xyz/host/agenttools-hub.vercel.app/llms.txt)
