Permutation and Combination Calculator (nPr & nCr with Steps)
Calculate Permutations (nPr) and Combinations (nCr) with step-by-step factorial proofs. Determine the exact number of possible arrangements when order matters versus when order does not matter, backed by exact BigInt precision.
The primary distinction between permutations and combinations is order. In a permutation (nPr), the order of selection matters (e.g., locker combinations, race finishes: 1-2-3 is distinct from 3-2-1). In a combination (nCr), order does not matter (e.g., drawing a poker hand or selecting a committee: {A, B} is identical to {B, A}).
The Mathematical Formulas for Permutations and Combinations
Combinatorics provides systematic counting principles for finite sets without requiring manual enumeration of every scenario:
1. Permutations Formula ($nPr$ • Order Matters)
A permutation is an ordered arrangement of $r$ elements selected from a set of $n$ distinct elements without replacement:
2. Combinations Formula ($nCr$ • Order Does NOT Matter)
A combination is an un-ordered collection of $r$ elements chosen from a set of $n$ distinct elements. Because grouping $\{A, B\}$ is considered identical to $\{B, A\}$, we divide $nPr$ by $r!$ to eliminate duplicate arrangements:
Permutations vs. Combinations Problem Classification Matrix
| Real-World Scenario | Does Order Matter? | Mathematical Model | Calculation Formula |
|---|---|---|---|
| Race Podium (Gold, Silver, Bronze) | Yes (Ranking) | Permutation (nPr) | ₈P₃ = 336 arrangements |
| Poker Hand (5 Cards from 52) | No (Set of cards) | Combination (nCr) | ₅₂C₅ = 2,598,960 hands |
| 4-Digit Lock Passcode (No repeat) | Yes (Sequence) | Permutation (nPr) | ₁₀P₄ = 5,040 combinations |
| Electing a 3-Person Committee | No (Equal peers) | Combination (nCr) | ₁₀C₃ = 120 committees |
Related Probability & Math Calculators:
- Probability Calculator — Calculate single and two-event probability, odds ratios, and conditional independent outcomes.
- Random Number Generator — Draw unbiased random integers without duplicates.
- Ratio & Proportion Calculator — Solve proportions A:B = C:D and simplify ratios.
- Full Percentage Calculator Hub — Master tool for general percentages and ratios.
Frequently Asked Questions
What is 0! (zero factorial)?
In mathematics, 0! is defined as exactly 1. This mathematical convention ensures that formulas like nPn = n! / (n − n)! = n! / 0! = n! remain algebraically consistent.
Why is nCr always smaller than or equal to nPr?
Because combinations do not care about order, every single combination of r items corresponds to r! different permutations. Dividing by r! eliminates these duplicate sequences, making nCr equal to nPr / r!.
What happens when r = 0?
When choosing 0 items from n items, both nP0 and nC0 equal exactly 1. There is only one way to choose nothing (the empty set).
How many 5-card poker hands are possible from a 52-card deck?
There are exactly 2,598,960 possible poker hands. This is calculated using combinations (order does not matter in your hand): 52C5 = 52! / [5!(47!)] = 2,598,960.
Is my calculation data saved on a server?
No. All calculations execute 100% locally inside your browser's runtime memory using JavaScript BigInt algorithms. No numbers or homework entries are transmitted over a network or saved in an external database.