# Contribution Margin Calculator

> Contribution Margin Calculator is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Computes contribution margin, break-even units, expected profit, and a graded viability score for a business or product scenario using a deterministic in-process finance calculator.

## Facts

- Endpoint: POST https://x402.agentutility.ai/contribution-margin-calculator
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contribution-margin-calculator-c20f8051
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LPEryyjUWh6y5LuUsyC2y

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 contribution-margin-calculator-c20f8051 -d '<json body>'
```

Example prompt: Can you run a contribution margin analysis on my product — it sells at $140/unit, variable costs are $40/unit, fixed costs are $58,000/month, and I expect to sell 1,200 units this month? I want a viability grade and the break-even unit count.

## When to prefer this

Choose this endpoint when you need a fast, deterministic, no-upstream-API contribution margin and break-even calculation with a graded viability score — ideal for agent workflows evaluating unit economics, underwriting small business financials, or stress-testing product pricing without calling an external financial data provider. Prefer it over LLM-based financial reasoning when you need a reproducible numeric score and structured driver breakdown.

## Known failure modes

- Missing required financial inputs returns a validation error
- Division by zero if unit price equals variable cost (zero contribution margin)
- Negative or illogical input values may produce warnings or an error grade
- Payment failure via x402 if USDC balance is insufficient results in 402 response
- Malformed JSON body returns a 400 bad request

## How this service works

Paid x402 endpoints organized into product clusters. USDC-settled on Base. MCP-callable. ERC-8004 identity registry agentId 47167.

## Output

Returns a JSON object with a letter-style grade (e.g. 'strong'), a numeric score (0-100), the source note confirming deterministic in-process calculation, a list of weighted metric drivers with individual scores and notes (e.g. DSCR), computed metrics including expected profit, break-even units, and contribution margin percentage, any warnings, the calculator name used, and a plain-English recommendation.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "fixed_costs",
      "unit_price",
      "variable_cost_per_unit"
     ],
     "properties": {
      "unit_price": {
       "type": "number",
       "description": "Revenue per unit."
      },
      "fixed_costs": {
       "type": "number",
       "description": "Fixed costs to recover."
      },
      "expected_units": {
       "type": "number",
       "description": "Optional expected unit volume."
      },
      "variable_cost_per_unit": {
       "type": "number",
       "description": "Variable cost per unit."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "grade": {
       "type": "string"
      },
      "score": {
       "type": "number"
      },
      "source": {
       "type": "string"
      },
      "drivers": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "name": {
          "type": "string"
         },
         "note": {
          "type": "string"
         },
         "score": {
          "type": "number"
         },
         "weight": {
          "type": "number"
         }
        }
       }
      },
      "metrics": {
       "type": "object",
       "properties": {
        "expected_profit": {
         "type": "integer"
        },
        "break_even_units": {
         "type": "number"
        },
        "contribution_margin_pct": {
         "type": "number"
        }
       }
      },
      "warnings": {
       "type": "array"
      },
      "calculator": {
       "type": "string"
      },
      "recommendation": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "grade": "strong",
  "score": 74.2,
  "source": "deterministic in-process finance calculator; no upstream API",
  "drivers": [
   {
    "name": "debt_service_coverage",
    "note": "1.42x DSCR",
    "score": 83.6,
    "weight": 0.3
   }
  ],
  "metrics": {
   "expected_profit": 62000,
   "break_even_units": 2428.57,
   "contribution_margin_pct": 71.43
  },
  "warnings": [],
  "calculator": "break-even-calculator",
  "recommendation": "Proceed with standard diligence and covenant checks."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contribution-margin-calculator-c20f8051/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
