# Unit Contribution Weighted Result Mean Calculator

> Unit Contribution Weighted Result Mean Calculator is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-18).

Calculates a nonnegative-weight-based weighted mean of unit contribution (unit price minus variable cost per unit) across up to 200 product rows, returning a structured JSON report with formula, units, and limitations.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-finance-unit-contribution-weighted-mean?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/unit-contribution-weighted-result-mean-calculator-ed2374a8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZHUpIcCL3gSOdEOt15415

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 unit-contribution-weighted-result-mean-calculator-ed2374a8 -d '<json body>'
```

Example prompt: Calculate the weighted mean unit contribution for my four products: two products with unit price $20 and variable cost $12 each (weights 1 and 1), and two with unit price $22 and variable cost $13.20 each (weights 2 and 2).

## When to prefer this

Choose this endpoint when you need a statistically weighted mean of unit contribution (unit price minus variable cost) across multiple products or time periods, especially when volumes or importance weights differ across rows. It is not a pooled accounting ratio, so prefer it for quick blended-margin estimates using supplied figures rather than full P&L reconciliation. Use it over simple averages when different products have different sales weights or strategic importance.

## Known failure modes

- Mismatched array lengths between rows and weights arrays returns an error
- Fewer than 2 rows or weights supplied returns a validation error
- Negative weight values are rejected (nonnegative constraint)
- Values exceeding 1,000,000,000,000 per field are rejected
- Missing required fields unit_price or variable_cost_per_unit returns a schema validation error
- Payment not included or insufficient USDC results in a 402 Payment Required response

## How this service works

Unit contribution - Weighted result mean: Calculate a mean of up to 200 results using supplied nonnegative weights; not a pooled accounting ratio. Metric: Unit contribution. Supplied figures only; returns JSON with formula, units and limitations. One of 50 calculators with 20 analysis modes. No live feed, financial advice or trade execution. 0.01 USDC includes one bounded weighted result mean report.

## Output

A JSON object containing the calculated weighted mean unit contribution value, the formula used, the units of measurement, and any applicable limitations or caveats about the calculation (e.g. no pooled accounting, supplied figures only, not financial advice).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "unit_price",
     "variable_cost_per_unit"
    ],
    "properties": {
     "unit_price": {
      "type": "number",
      "default": 20,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     },
     "variable_cost_per_unit": {
      "type": "number",
      "default": 12,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "unit_price": 20,
     "variable_cost_per_unit": 12
    },
    {
     "unit_price": 22,
     "variable_cost_per_unit": 13.200000000000001
    },
    {
     "unit_price": 20,
     "variable_cost_per_unit": 12
    },
    {
     "unit_price": 22,
     "variable_cost_per_unit": 13.200000000000001
    }
   ],
   "maxItems": 200,
   "minItems": 2
  },
  "weights": {
   "type": "array",
   "items": {
    "type": "number",
    "default": 1,
    "maximum": 1000000000000,
    "minimum": 0
   },
   "default": [
    1,
    2,
    1,
    2
   ],
   "maxItems": 200,
   "minItems": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/unit-contribution-weighted-result-mean-calculator-ed2374a8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
