Permutation & Combination Calculator
Enter n (total items) and r (items chosen) to calculate P(n,r) and C(n,r) — with complete step-by-step workings, formulas, and explanations.
Enter Your Values
📐 Formula Reference
where n! = n × (n−1) × … × 2 × 1, and 0! = 1 by definition.
Understanding Permutations & Combinations
Permutation — Order Matters
A permutation is an arrangement of items where the order matters. Choosing A then B is different from choosing B then A.
Example: How many ways can 3 students be chosen as President, Vice-President, and Secretary from a class of 10?
P(10, 3) = 10! / (10−3)! = 10! / 7! = 10 × 9 × 8 = 720
Each arrangement is a different outcome because the roles (positions) are distinct.
Combination — Order Doesn't Matter
A combination is a selection of items where order does not matter. Choosing {A, B, C} is the same as {C, B, A}.
Example: How many ways can a committee of 3 be chosen from 10 students?
C(10, 3) = 10! / (3! × 7!) = 720 / 6 = 120
Notice C(n,r) = P(n,r) / r! — combinations are always fewer than or equal to permutations because we divide out the r! repeated orderings.
Factorials
The factorial of a non-negative integer n (written n!) is the product of all positive integers up to n.
Key values:
| n | n! |
|---|---|
| 0 | 1 (by definition) |
| 1 | 1 |
| 2 | 2 |
| 3 | 6 |
| 4 | 24 |
| 5 | 120 |
| 6 | 720 |
| 10 | 3,628,800 |
Factorials grow very rapidly. This calculator supports up to n = 170 (the largest value JavaScript can represent precisely as a floating-point number).
When to Use Permutation vs Combination?
| Situation | Use | Reason |
|---|---|---|
| Arranging books on a shelf | Permutation | Position/order matters |
| Electing President, VP, Secretary | Permutation | Roles are distinct |
| PIN / password digits | Permutation | 1234 ≠ 4321 |
| Choosing a committee | Combination | Members are interchangeable |
| Selecting lottery numbers | Combination | Order of draw doesn't matter |
| Picking toppings on a pizza | Combination | Set of toppings, not sequence |