Back to home

Permutations & Combinations

Permutations, combinations, sampling with repetition, factorials, derangements and Catalan numbers, exact to the last digit

n · total items
k · items picked
Results
PermutationsP(10, 3)
n! / (n − k)!
720
CombinationsC(10, 3)
n! / (k! × (n − k)!)
120
Permutations with repetition10^3
n^k
1,000
Combinations with repetitionC(10 + 3 - 1, 3)
C(n + k − 1, k)
220
Factorial10!
n!
3,628,800
Derangements!10
!n = (n − 1)(!(n − 1) + !(n − 2))
1,334,961
Catalan numberC(20, 10) / 11
C(2n, n) / (n + 1)
16,796
Stirling number (2nd kind)S(10, 3)
S(n, k) = k × S(n − 1, k) + S(n − 1, k − 1)
9,330
Bell numberB(10)
B(n) = S(n, 0) + S(n, 1) + … + S(n, n)
115,975
n = 10 k = 3

Both n and k are non-negative integers. When k is larger than n only the ordered and unordered selection rows have no answer and show —; factorials, derangements and the rest still compute. n is capped at 2000, Stirling and Bell numbers at 200.

Everything is exact BigInt arithmetic, no floating point. Values longer than 24 digits switch to scientific notation in the table, while the copy button always yields the full number. The math never leaves the browser.