# Gross Margin Weighted Result Mean Calculator

> Gross Margin 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-22).

Calculates a weighted mean of gross margin across up to 200 supplied data rows using user-provided nonnegative weights, returning the result with formula, units, and limitations.

## Facts

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

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 gross-margin-weighted-result-mean-calculator-78153a45 -d '<json body>'
```

Example prompt: Calculate the weighted mean gross margin for these four quarters: revenues of 10000, 11000, 10000, 11000 with gross profits of 2000, 2200, 2000, 2200 — weight the second and fourth quarters twice as heavily as the first and third.

## When to prefer this

Choose this endpoint when you need a statistically weighted mean of gross margin across multiple data points — such as business units, product lines, time periods, or portfolio companies — and you want to control the relative importance of each observation via explicit weights. It is not a pooled accounting ratio and does not fetch live financial data, making it ideal for offline or agent-driven scenario analysis on user-supplied figures.

## Known failure modes

- Mismatched array lengths between rows and weights — API will reject if counts differ
- Fewer than 2 rows or weights supplied — minimum 2 items required
- Revenue of zero or negative — revenue must be strictly positive (exclusiveMinimum: 0)
- Weights summing to zero — undefined weighted mean result
- Values exceeding maximum bounds (1 trillion) — schema validation error
- Missing required fields (gross_profit or revenue) in any row — validation error

## How this service works

Gross margin - Weighted result mean: Calculate a mean of up to 200 results using supplied nonnegative weights; not a pooled accounting ratio. Metric: Gross margin. 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 weighted mean gross margin value, the formula used to compute it, the units of measurement, and any applicable limitations — covering up to 200 input rows weighted by the supplied nonnegative weights.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "gross_profit",
     "revenue"
    ],
    "properties": {
     "revenue": {
      "type": "number",
      "default": 10000,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period",
      "exclusiveMinimum": 0
     },
     "gross_profit": {
      "type": "number",
      "default": 2000,
      "maximum": 1000000000000,
      "minimum": -1000000000000,
      "description": "Amount in a consistent supplied currency and reporting period"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "revenue": 10000,
     "gross_profit": 2000
    },
    {
     "revenue": 11000,
     "gross_profit": 2200
    },
    {
     "revenue": 10000,
     "gross_profit": 2000
    },
    {
     "revenue": 11000,
     "gross_profit": 2200
    }
   ],
   "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/gross-margin-weighted-result-mean-calculator-78153a45/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)
