# Investing Math – Risk/Reward Calculator

> Investing Math – Risk/Reward Calculator is a paid API for AI agents from invest-math.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates reward-to-risk ratio, break-even win rate, and expectancy for a trade given entry, stop-loss, and profit target prices.

## Facts

- Endpoint: GET https://invest-math.x402tookit.com/risk-reward?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/investing-math-risk-reward-calculator-c46232c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fvwwyTl2AfSv8cSPBECmy

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 investing-math-risk-reward-calculator-c46232c2
```

Example prompt: Can you calculate the risk-reward ratio for a trade where I enter at $150, my stop-loss is at $145, and my profit target is $162, and also tell me the break-even win rate and expectancy assuming I win 55% of the time?

## When to prefer this

Use this endpoint when you need a fast, precise, single-trade risk/reward computation — especially when you want break-even win rate and expectancy together in one call. Prefer it over manual calculation or general-purpose LLM math when accuracy and structured output (R-multiples, per-unit values, edge verdict) matter. It complements position sizing endpoints but focuses purely on trade quality metrics.

## Known failure modes

- Missing required parameters (entry, stop, target) returns a 400-level error
- Entry equal to stop (zero risk) causes division-by-zero or invalid ratio
- Nonsensical price combinations (e.g. stop above entry for a long) may produce negative or unexpected direction values
- winRatePct outside 0-100 range may produce unreliable expectancy values
- Network or payment authorization failure returns a 402 or 5xx error

## How this service works

Reward-to-risk ratio from entry, stop and target, the win rate needed to break even, and expectancy at your win rate.

## Output

Returns the reward-to-risk ratio, risk per unit (entry minus stop), reward per unit (target minus entry), break-even win rate percentage, and — if a win rate is provided — the expectancy in R-multiples and per unit. Also includes a summary verdict, direction (long or short), and whether the setup has a positive edge.

## 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": [
      "entry",
      "stop",
      "target"
     ],
     "properties": {
      "stop": {
       "type": "number",
       "description": "Stop-loss price"
      },
      "entry": {
       "type": "number",
       "description": "Entry price"
      },
      "target": {
       "type": "number",
       "description": "Profit target price"
      },
      "winRatePct": {
       "type": "number",
       "description": "Your expected win rate in percent, for expectancy"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "direction": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "winRatePct": {
       "type": [
        "null",
        "number"
       ]
      },
      "expectancyR": {
       "type": [
        "null",
        "number"
       ]
      },
      "riskPerUnit": {
       "type": [
        "null",
        "number"
       ]
      },
      "positiveEdge": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "rewardToRisk": {
       "type": [
        "null",
        "number"
       ]
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/investing-math-risk-reward-calculator-c46232c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from invest-math.x402tookit.com](https://www.zero.xyz/host/invest-math.x402tookit.com/llms.txt)
