Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr) — with or without repetition — for any n and r.
Setup
Updates as you typeCommon scenarios (one-click load)
Mode
What do you want to compute? ?
Repetition ?
Inputs
Total items (n) ?
—
items
Items chosen (r) ?
—
chosen
Formulas
Combination — order doesn't matter
C(n, r) = n! / (r! × (n − r)!)
Permutation without repetition: P(n, r) = n! / (n − r)!
Combination without repetition: C(n, r) = n! / (r! × (n − r)!)
Permutation with repetition: Prep(n, r) = nr
Combination with repetition: Crep(n, r) = C(n + r − 1, r)
- n
- Total number of distinct items in the set.
- r
- Number of items being chosen or arranged.
- n!
- n factorial — the product of all positive integers up to n. 0! = 1 by convention.
- Permutation
- Order matters. ABC and CAB are counted as different.
- Combination
- Order does not matter. ABC and CAB are the same grouping.
- With repetition
- The same item can be picked more than once (e.g., digits in a PIN, dice rolls).
Step-by-step
Sample arrangements
Shown only when both n and r are small (n ≤ 8) so the list stays readable.
Factorial reference
| Term | Value |
|---|---|
| n! | — |
| r! | — |
| (n − r)! | — |