Permutation and Combination Calculator
Calculate the exact number of permutations ($nPr$) and combinations ($nCr$) with and without repetition. Features exact arbitrary-precision BigInt arithmetic, step-by-step factorial algebraic derivations, and real-world presets.
BigInt arithmetic to compute massive factorials without floating-point rounding errors.Set Parameters
Combinatorial Counts
Permutations vs. Combinations: Decision Matrix
| Scenario | Order Matters? | Repetition Allowed? | Formula | Real-World Example |
|---|---|---|---|---|
| Permutation | Yes | No | P(n, r) = n! / (n - r)! | 1st, 2nd, and 3rd place race finishes |
| Combination | No | No | C(n, r) = n! / [r!(n - r)!] | Choosing a 5-person committee or poker hand |
| Permutation with Repetition | Yes | Yes | n^r | 4-digit ATM PIN code (e.g. 7721) |
| Combination with Repetition | No | Yes | (n + r - 1)! / [r!(n - 1)!] | Picking 5 scoops of ice cream from 8 flavors |
Factorial Mathematics & Combinatorics
Combinatorics is the branch of mathematics dealing with counting arrangements, combinations, and permutations of discrete objects. It forms the bedrock of probability theory, cryptography, statistical mechanics, and computer algorithm design.
Why is C(n, r) Always Less Than P(n, r)?
In a permutation, changing the sequence of the exact same elements creates a completely distinct outcome (e.g., $(A, B, C) \neq (C, B, A)$). For any group of $r$ distinct items, there are exactly $r!$ ways to arrange them. Therefore, the combination count is simply the permutation count divided by $r!$: $C(n, r) = \frac{P(n, r)}{r!}$.
Permutations vs. Combinations: Principles of Combinatorics
Combinatorics is the branch of mathematics focused on counting, arrangement, and grouping. The fundamental distinction between permutations and combinations centers on order: permutations calculate arrangements where sequence or ranking matters, whereas combinations calculate groupings where internal order has no relevance.
For deeper analysis and related planning, you can also explore our Area Calculator and Average Calculator.
Factorial Formulations for nPr and nCr
Given a total set of 'n' unique elements from which 'r' items are selected:
- Permutations Formula (Order Matters): P(n, r) = n! ÷ (n - r)!
- Combinations Formula (Order Does NOT Matter): C(n, r) = n! ÷ [r! × (n - r)!]
- Relationship between nPr and nCr: C(n, r) = P(n, r) ÷ r! (dividing by r! eliminates duplicate ordered arrangements)
- Factorial Definition: n! = n × (n - 1) × (n - 2) × ... × 1, with 0! = 1 by mathematical convention.
Frequently Asked Questions
What is the difference between a permutation and a combination?
In a permutation, the arrangement order matters (e.g. race finishes 1st, 2nd, 3rd or a locker combination). In a combination, order does not matter (e.g. a hand of playing cards or a committee of team members).
What are the formulas for nPr and nCr?
The permutation formula is P(n, r) = n! / (n - r)!. The combination formula is C(n, r) = n! / [r! (n - r)!], where n is the total number of items, r is the number chosen, and '!' denotes the factorial function.
How many 5-card poker hands can be dealt from a 52-card deck?
Because the order cards are dealt does not affect the final hand, use the combination formula C(52, 5) = 52! / (5! × 47!) = 2,598,960 possible hands.