# Binomial Coefficient Calculator (nCr)

> Binomial Coefficient Calculator (nCr) is a paid API for AI agents from combinatorics.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Computes the binomial coefficient nCr = n!/(r!(n-r)!), the number of ways to choose r unordered items from a set of n.

## Facts

- Endpoint: POST https://combinatorics.openverbs.com/v1/combinations
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/binomial-coefficient-calculator-ncr-02cc2f33
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SeEEVg1j1qoNCPFmcmGyC

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 binomial-coefficient-calculator-ncr-02cc2f33 -d '<json body>'
```

Example prompt: How many ways can I choose 5 items from a set of 52? Give me the exact binomial coefficient C(52, 5).

## When to prefer this

Choose this endpoint when you need the exact count of unordered selections (combinations) of r items from n, e.g. for probability calculations, lottery odds, or combinatorial enumeration. Prefer this over the permutations endpoint (nPr) when order does not matter. Use instead of factorial endpoint when you specifically need the binomial coefficient rather than a raw factorial.

## Known failure modes

- r > n: invalid input since you cannot choose more items than exist in the set
- min(r, n-r) > 10000: exceeds computation limit
- n > 1000000: n exceeds maximum allowed value
- non-integer or negative inputs: inputs must match pattern ^\d+$
- malformed request body: missing required fields n or r

## How this service works

Binomial coefficient nCr = n!/(r!(n-r)!), the number of unordered r-subsets of n. Requires r ≤ n and min(r, n-r) ≤ 10000.

## Output

Returns the exact integer value of the binomial coefficient nCr = n!/(r!(n-r)!), representing the number of unordered r-subsets of an n-element set. The result is a large exact integer (as a decimal string for large values), with constraints that r ≤ n and min(r, n-r) ≤ 10000.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "n": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer ≤ 1000000."
      },
      "r": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer, r ≤ n."
      }
     },
     "required": [
      "n",
      "r"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/binomial-coefficient-calculator-ncr-02cc2f33/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from combinatorics.openverbs.com](https://www.zero.xyz/host/combinatorics.openverbs.com/llms.txt)
