Combinatorics calculator

Calculate factorials, permutations and combinations without replacement as exact integers, and download every result digit.

0 ≤ r ≤ n ≤ 10,000; five digits per field excluding the sign. Factorial does not use r. Permutations and combinations are without replacement.

Accepts digits 0–9, Arabic-Indic ٠–٩ and extended Arabic-Indic ۰–۹, with an optional +, - or − sign. No spaces, decimals, separators or expressions.

Local BigInt arithmetic; one worker, a 5-second deadline and at most 128 KiB of output. No automatic storage or requests carrying your input.

How to use

Choose factorial n!, permutations P(n, r) or combinations C(n, r). Enter n and r where shown, then calculate. Use preview pages for long results; copy and download include the entire report regardless of the displayed page.

Try an example

For n=5 and r=2, P(5, 2)=20 because order matters, while C(5, 2)=10 because order does not matter. Factorial 5!=120, and 0!=1.

Support & limits

These formulas select distinct items without replacement: nPr=n!/(n−r)! and nCr=n!/(r!(n−r)!). They do not calculate probabilities, account for identical items or enumerate arrangements. nP0=nC0=1. Arabic-Indic and extended digits and Unicode minus are accepted syntax, but negative values are rejected. No decimals, whitespace, grouping separators or scientific notation. Factorial hides r and sends it as an empty string; its hidden value does not affect calculation. Arithmetic is exact with BigInt.

Common questions

Are result digits lost when they do not fit the preview?

No. Preview pages are bounded, while copy and the TXT file contain the complete report without an added BOM or trailing line separator. If computation exceeds the worker deadline, it fails without publishing a partial result.

Related tools