ARZENTIQ
SCIENCE & MATHS

Permutations & Combinations

nPr, nCr, n! and the with-repetition counts nʳ and C(n+r−1, r), circular arrangements and Pascal’s row — exact big integers for n, r up to 5 000.

Permutations and combinations with and without repetition, the factorials, circular permutations, the probability of one particular selection, Pascal’s triangle row and digit counts.

Example: 10 items, 3 chosen: 720 ordered, 120 unordered, 1 000 with repetition in order, 220 unordered with repetition; a 5-card hand from 52 is one of 2 598 960 (52! has 68 digits).

v0.1.0 · last reviewed 21 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Exact to the last digit,
however many.

The definitions, why big integers are used, and what the extra counts mean.

Definitions

nPr = n!/(n − r)! counts ordered selections without repetition; nCr = n!/(r!(n − r)!) unordered ones. With repetition the ordered count is nʳ and the unordered count is C(n + r − 1, r) (stars and bars). Circular arrangements of n distinct items number (n − 1)!, because rotations coincide.

Exact arithmetic

Factorials grow past double precision at 171!; the page computes with arbitrary-precision integers, so 52! is written out in full (68 digits) and nCr is computed as a product of r terms divided as it goes, never overflowing. Scientific notation is only a rounded view.

Reading the numbers

The probability of one particular unordered selection is 1 ÷ nCr; Pascal's row lists nC0 … nCn (up to n = 40). r larger than n gives 0 without repetition and the with-repetition counts still apply. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

  • nPr = n!/(n − r)!, nCr = n!/(r!(n − r)!), nʳ, C(n + r − 1, r), (n − 1)! for circular arrangements — computed exactly as big integers

Last reviewed 21 September 2026. How results are checked: How we verify.