{"uid":"cap_b8jIYW8n48P6JCiCoahhS","slug":"math-and-statistics-combinatorics-calculator-36dcd26b","name":"Math and Statistics – Combinatorics Calculator","description":"Exact counts: factorial, combinations, permutations, with repetition, derangements and Catalan numbers, as big integers.","url":"https://math-stats.x402tookit.com/combinatorics?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["n"],"properties":{"k":{"type":"integer","description":"k for combinations and permutations (0 to n, or any k for repetition)"},"n":{"type":"integer","description":"n, 0 to 2000"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"k":{"type":["null","string"]},"n":{"type":["null","string"]},"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"catalan":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"factorial":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"combinations":{"type":["null","string"]},"derangements":{"type":["null","string"]},"permutations":{"type":["null","string"]},"factorialDigits":{"type":["null","number"]},"factorialScientific":{"type":["null","string"]},"combinationsWithRepetition":{"type":["null","string"]},"permutationsWithRepetition":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dqy1tlIPmlZm0yS9i9lDG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes exact combinatorial counts—factorial, combinations, permutations, repetition variants, derangements, and Catalan numbers—as arbitrary-precision big integers.","exampleAgentPrompt":"What are all the combinatorial counts for n=52 and k=5—factorial, combinations, permutations, with-repetition variants, derangements, and the Catalan number—as exact big integers?","exampleUseCases":[{"title":"Lottery odds exact calculation","prompt":"How many 5-card hands can be dealt from a standard 52-card deck? Give me the exact combination count, not an approximation."},{"title":"Seating arrangement count","prompt":"In how many ways can 10 people be seated at a table such that none of them sits in their originally assigned seat? Give me the exact derangement count for n=10."},{"title":"Password space enumeration","prompt":"I have a character set of 62 characters and want passwords of length 8 with repetition allowed—what is the exact permutations-with-repetition count?"}],"resultDescription":"A JSON object containing exact big-integer string values for factorial, combinations (n choose k), permutations, combinations with repetition, permutations with repetition, derangements, and Catalan number for the given n (and optional k). Also includes the number of digits in n! and a scientific-notation representation. Values are returned as strings to preserve full precision for very large numbers.","failureModes":["Missing required parameter n returns an error","n out of range (negative or > 2000) returns a validation error","k out of valid range for the chosen operation returns a null or error for that field","Non-integer values for n or k cause a schema validation failure","Combinatorial results for very large n may still succeed but produce extremely long big-integer strings"],"whenToPreferThis":"Choose this endpoint when you need exact, arbitrary-precision combinatorial counts rather than floating-point approximations. It is ideal for probability problems, cryptographic key-space analysis, card game odds, permutation puzzles, or any combinatorics homework where precision matters. Prefer it over a general-purpose math library call when you need all major combinatorial quantities (factorial, C(n,k), P(n,k), with-repetition, derangements, and Catalan) in a single request.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T00:34:50.204Z","isFirstParty":false,"canonicalSlug":"math-and-statistics-combinatorics-calculator-36dcd26b"}