# Margin of Safety – Weighted Result Mean

> Margin of Safety – Weighted Result Mean 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-23).

Calculates a weighted mean of margin-of-safety values for up to 200 supplied actual-vs-break-even-sales data points using user-provided nonnegative weights.

## Facts

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

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 margin-of-safety-weighted-result-mean-43e0b28e -d '<json body>'
```

Example prompt: Calculate the weighted mean margin of safety for these four sales records: [actual=10000, break-even=7000, weight=1], [actual=11000, break-even=7700, weight=2], [actual=10000, break-even=7000, weight=1], [actual=11000, break-even=7700, weight=2] — give me the formula, units, and any limitations in the result.

## When to prefer this

Choose this endpoint when you need a single aggregated margin-of-safety metric across multiple data points and some observations should count more than others (e.g. larger divisions, more recent periods, higher revenue). It is ideal when you already have the actual and break-even sales figures and want a weighted summary rather than a simple arithmetic mean or a full distribution analysis. Use it over a plain-mean endpoint when observation importance differs, and over histogram or ranking endpoints when a single scalar summary is the desired output.

## Known failure modes

- Mismatched array lengths between rows and weights returns a validation error
- Fewer than 2 rows supplied triggers a minItems constraint error
- A weight or sales value below the allowed minimum (zero or negative) causes schema rejection
- Actual sales of exactly zero is rejected due to exclusiveMinimum constraint
- More than 200 rows supplied exceeds maxItems and is rejected
- Non-numeric or missing required fields (actual_sales, break_even_sales) cause a schema validation error

## How this service works

Margin of safety - Weighted result mean: Calculate a mean of up to 200 results using supplied nonnegative weights; not a pooled accounting ratio. Metric: Margin of safety. 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

Returns a JSON object containing the computed weighted mean margin of safety value, the mathematical formula used, the units of the result, and a limitations section noting that only supplied figures are used (no live data, no financial advice, no trade execution).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "actual_sales",
     "break_even_sales"
    ],
    "properties": {
     "actual_sales": {
      "type": "number",
      "default": 10000,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period",
      "exclusiveMinimum": 0
     },
     "break_even_sales": {
      "type": "number",
      "default": 7000,
      "maximum": 1000000000000,
      "minimum": 0,
      "description": "Amount in a consistent supplied currency and reporting period"
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "actual_sales": 10000,
     "break_even_sales": 7000
    },
    {
     "actual_sales": 11000,
     "break_even_sales": 7700.000000000001
    },
    {
     "actual_sales": 10000,
     "break_even_sales": 7000
    },
    {
     "actual_sales": 11000,
     "break_even_sales": 7700.000000000001
    }
   ],
   "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/margin-of-safety-weighted-result-mean-43e0b28e/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)
