Enter n (total items) and r (selected items) to compute P(n,r) for ordered selections and C(n,r) for unordered selections, plus repetition variants and n! factorial.
How to use this calculator
Enter n (total items in the pool) and r (items to select).
Read C(n,r) for combinations (order does not matter) and P(n,r) for permutations (order matters).
Repetition variants and the factorial n! are also shown for reference.
Formula & method
Permutation and combination formulas
C(n,r) = n! / (r! × (n−r)!) · P(n,r) = n! / (n−r)! · C with rep = (n+r−1)! / (r! × (n−1)!) · P with rep = nʳ
n! = n × (n−1) × … × 1. Limited to n ≤ 170 to avoid floating-point overflow.