Permutation & Combination Calculator
Find permutations (nPr) and combinations (nCr) for any n and r, with full factorial steps shown.
🎲 What is a Permutation & Combination Calculator?
A permutation and combination calculator computes the number of ways to select or arrange items from a set, the cornerstone of combinatorics and probability theory. The two operations differ in one key respect: permutations count ordered arrangements (the sequence matters), while combinations count unordered selections (only which items are chosen matters).
Real-world permutations appear whenever order is significant: assigning 1st, 2nd, and 3rd place prizes among 20 contestants uses P(20, 3) = 6,840 arrangements. Creating a 4-digit PIN from digits 0–9 without repetition uses P(10, 4) = 5,040. Scheduling the order of 5 tasks from a pool of 12 uses P(12, 5) = 95,040. In each case, swapping positions creates a meaningfully different outcome.
Combinations arise when the group itself is what matters: choosing 6 lottery numbers from 49 uses C(49, 6) = 13,983,816. Forming a 5-person committee from a club of 30 uses C(30, 5) = 142,506. Dealing a 5-card poker hand from a 52-card deck uses C(52, 5) = 2,598,960. A common mistake is applying permutations where combinations are correct, inflating the count by a factor of r!.
This calculator delivers both nPr and nCr instantly along with the factorial breakdown, letting you verify the arithmetic step by step - essential for statistics courses, competitive exams, probability problems, and game design.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 — Medals (Ordered)
How many ways to award Gold, Silver, Bronze to 3 of 8 athletes?
Example 2 — Committee (Unordered)
How many ways to form a 4-person committee from 12 employees?
Example 3 — Poker Hand
How many unique 5-card poker hands can be dealt from a 52-card deck?
❓ Frequently Asked Questions
🔗 Related Calculators
What is the difference between permutation and combination?
A permutation counts ordered arrangements - the order of selection matters. A combination counts unordered selections - only which items are chosen matters, not the order. For example, selecting 3 letters from {A, B, C}: permutations give ABC, ACB, BAC, BCA, CAB, CBA (6 results), while combinations give just {A,B,C} (1 result).
What is the formula for permutation nPr?
P(n, r) = n! / (n - r)!, where n is the total number of items and r is how many you select. For example, P(5, 2) = 5! / (5-2)! = 120 / 6 = 20. This counts the number of ways to pick and arrange r items from n distinct items.
What is the formula for combination nCr?
C(n, r) = n! / (r! × (n - r)!), where n is the total number of items and r is how many you choose. For example, C(5, 2) = 5! / (2! × 3!) = 120 / (2 × 6) = 10. This counts the number of ways to choose r items from n without regard to order.
How do I calculate 10C3 by hand?
C(10, 3) = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. A shortcut: only compute the top r terms of n! divided by r!, cancelling the (n-r)! in the denominator. So C(10,3) = (10 × 9 × 8) / (1 × 2 × 3) = 120.
What is 0! (zero factorial)?
0! = 1 by mathematical convention. This ensures the combination formula C(n, 0) = 1 (there is exactly one way to choose nothing), and C(n, n) = 1 (there is exactly one way to choose everything). Without this convention, the formulas would break down.
When should I use permutations in real life?
Use permutations when the arrangement matters: the number of ways to assign gold/silver/bronze medals to 3 of 10 athletes is P(10,3) = 720. Other examples: PIN codes, passwords, seating arrangements at a table, horse racing finishing positions, and any problem where position or rank is significant.
When should I use combinations in real life?
Use combinations when only the selection matters: choosing 5 cards from a 52-card deck gives C(52,5) = 2,598,960 possible hands. Other examples: lottery number selection, forming a committee from a group, choosing pizza toppings, and any situation where the selected group itself (not the order) is what counts.
What is the maximum value of n this calculator supports?
This calculator handles up to n = 170 for exact results (JavaScript's safe integer limit). For larger n, results may overflow to Infinity. In practice, most combinatorics problems in education and everyday use involve n ≤ 70, where results remain exact and manageable.
What does C(n, r) = C(n, n-r) mean?
This symmetry property means choosing r items from n is equivalent to rejecting (n-r) items. C(10, 3) = C(10, 7) = 120. This is useful for computation: always use the smaller of r and (n-r) to simplify calculations. It also shows the Pascal's triangle symmetry in combinatorics.
How is the combination formula used in the binomial theorem?
The binomial theorem states (a + b)^n = Σ C(n,k) × a^(n-k) × b^k for k from 0 to n. The coefficients C(n,k) are called binomial coefficients and appear in Pascal's triangle. For example, (a+b)^3 = C(3,0)a³ + C(3,1)a²b + C(3,2)ab² + C(3,3)b³ = a³ + 3a²b + 3ab² + b³.