How to Calculate Permutations and Combinations
Permutations and combinations are the mathematical tools for counting arrangements and selections. Whether you are calculating lottery odds, determining how many teams can be formed from a group, or figuring out the number of possible passwords, these two concepts provide the answers.
This guide explains both concepts from the ground up, covers the factorial operations that power the formulas, and walks through real-world counting problems step by step.
What Are Permutations and Combinations?
Both permutations and combinations deal with selecting items from a larger set, but they differ in one critical way: whether order matters.
Permutations
Order MATTERS
Arranging 3 books on a shelf. The sequence A-B-C is different from C-B-A.
Combinations
Order does NOT matter
Choosing 3 books to take on vacation. The set { A, B, C } is the same regardless of selection order.
Think of it this way: a permutation cares about the arrangement of items, while a combination only cares about the selection. Picking a president, vice president, and treasurer from a club of 10 people is a permutation problem (each role is different). Picking 3 people from the same club to form a committee with no specific roles is a combination problem.
Understanding Factorials
Both formulas rely on the factorial operation, written as n! (read "n factorial"). The factorial of a positive integer n is the product of all positive integers from 1 to n.
Factorial Definition
n! = n × (n - 1) × (n - 2) × ... × 2 × 1
By convention: 0! = 1 and 1! = 1
Factorial Examples
3! = 3 × 2 × 1 = 6
5! = 5 × 4 × 3 × 2 × 1 = 120
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
10! = 3,628,800
20! = 2,432,902,008,176,640,000
Factorials grow astronomically fast. While 10! is about 3.6 million, 20! exceeds 2.4 quintillion. This rapid growth reflects the explosion of possible arrangements as the number of items increases and explains why large counting problems produce such enormous results.
Try Our Factorial Calculator
Calculate the factorial of any number instantly, with step-by-step multiplication breakdown.
Use CalculatorThe Permutation Formula
The number of permutations of r items selected from a set of n items is given by:
Permutation Formula
P(n, r) = n! / (n - r)!
where n = total items, r = items selected
Example: Arranging 3 Runners on a Podium from 8 Competitors
n = 8 (total runners), r = 3 (gold, silver, bronze positions)
P(8, 3) = 8! / (8 - 3)! = 8! / 5!
= (8 × 7 × 6 × 5!) / 5!
= 8 × 7 × 6 = 336
There are 336 different ways to award gold, silver, and bronze to 3 of 8 runners.
The formula works by recognizing that for the first position you have n choices, for the second you have n - 1 remaining choices, for the third n - 2, and so on for r positions. The product n × (n - 1) × (n - 2) × ... × (n - r + 1) equals n! divided by (n - r)!.
The Combination Formula
The number of combinations of r items selected from n items is:
Combination Formula
C(n, r) = n! / (r! × (n - r)!)
Also written as "n choose r" or ⊂(n, r)
The combination formula is the permutation formula divided by r!, which eliminates the duplicate orderings within each group. Since r items can be arranged in r! different orders, dividing by r! counts each group only once.
Example: Choosing 3 People for a Committee from 8 Candidates
n = 8 (total candidates), r = 3 (committee spots, no specific roles)
C(8, 3) = 8! / (3! × 5!)
= (8 × 7 × 6) / (3 × 2 × 1)
= 336 / 6 = 56
There are 56 different committees possible. Notice this is exactly P(8,3) / 3! = 336 / 6 = 56.
Try Our Permutation and Combination Calculator
Calculate permutations and combinations for any values of n and r with formula breakdown.
Use CalculatorWhen to Use Permutations vs Combinations
The single question that determines which formula to use is: does the order of selection matter? Here is a decision guide:
Use Permutations When:
- Assigning distinct positions or roles (president, VP, secretary)
- Arranging items in a sequence (playlist order, seating arrangement)
- Creating codes or passwords where digit order matters
- Ranking competitors (1st place, 2nd place, 3rd place)
Use Combinations When:
- Forming groups with no assigned roles (picking team members)
- Selecting a subset from a larger set (choosing toppings)
- Drawing cards or lottery numbers (order of draw is irrelevant)
- Choosing items where only the final group composition matters
A helpful test: imagine swapping two selected items. If the swap creates a different outcome (swapping who gets gold vs. silver), use permutations. If the swap changes nothing (swapping which two people are on the committee), use combinations.
Practical Examples
Counting problems appear everywhere from games of chance to logistics planning. These examples demonstrate how permutations and combinations solve real questions.
Example 1: Elena Calculates Her Lottery Odds
Elena buys a ticket for a lottery where she picks 6 numbers from 1 to 49. Order does not matter, so she needs combinations.
C(49, 6) = 49! / (6! × 43!)
= (49 × 48 × 47 × 46 × 45 × 44) / (6 × 5 × 4 × 3 × 2 × 1)
= 10,068,347,520 / 720
= 13,983,816
Elena's odds of matching all 6 numbers are 1 in 13,983,816. To put this in perspective, she is about 45 times more likely to be struck by lightning in her lifetime (roughly 1 in 300,000) than to win this particular jackpot.
Example 2: Raj Plans a Meeting Room Seating Arrangement
Raj is organizing a board meeting for 5 executives around a rectangular table with 5 specifically labeled seats (head, left-1, left-2, right-1, right-2). Each seat assignment is distinct, so this is a permutation problem.
P(5, 5) = 5! / (5 - 5)! = 5! / 0! = 120 / 1 = 120
There are 120 different seating arrangements. If the CEO must sit at the head, Raj fixes that position and permutes the remaining 4 executives in 4 seats: P(4, 4) = 4! = 24 arrangements.
Example 3: Mei Forms Study Groups from Her Class
Mei's professor asks the class of 20 students to form groups of 4 for a project. Mei wants to know how many different groups are possible.
C(20, 4) = 20! / (4! × 16!)
= (20 × 19 × 18 × 17) / (4 × 3 × 2 × 1)
= 116,280 / 24 = 4,845
There are 4,845 different groups of 4 that can be formed. Since group members have no designated roles, this is a combination problem. If the groups had assigned roles (leader, recorder, presenter, timekeeper), it would become P(20, 4) = 116,280 permutations.
Counting Reference Table
This table provides quick reference values for common permutation and combination calculations. Notice how permutations always exceed or equal combinations for the same n and r values.
| n | r | P(n, r) | C(n, r) | Real-World Example |
|---|---|---|---|---|
| 5 | 2 | 20 | 10 | Pairing 2 from 5 finalists |
| 10 | 3 | 720 | 120 | Medal positions from 10 athletes |
| 12 | 4 | 11,880 | 495 | 4-person team from 12 players |
| 20 | 5 | 1,860,480 | 15,504 | 5-member committee from 20 people |
| 52 | 5 | 311,875,200 | 2,598,960 | 5-card poker hand from deck |
| 49 | 6 | 10,068,347,520 | 13,983,816 | 6-number lottery pick |
Tips and Complete Guide
Counting problems become manageable when you follow a systematic approach. These strategies will help you identify the right formula and avoid errors.
- Always ask "does order matter?" first. This single question determines whether you use permutations or combinations. If rearranging the selected items creates a different outcome, use permutations. If not, use combinations.
- Simplify before multiplying. In the formula C(49, 6), cancel common factors between the numerator and denominator before multiplying everything out. Compute (49 × 48 × 47 × 46 × 45 × 44) / 720 rather than calculating full factorials.
- Use symmetry to check answers. C(n, r) always equals C(n, n - r). So C(10, 3) = C(10, 7) = 120. If your answer does not satisfy this property, recheck your work.
- Draw tree diagrams for small problems. When n and r are small (3 or 4 items), sketching a tree diagram shows every possibility and helps you verify your formula-based answer.
- Break complex problems into stages. If you need to choose 2 guards and 3 forwards from a pool of 6 guards and 8 forwards, calculate each selection independently: C(6, 2) × C(8, 3) = 15 × 56 = 840. This uses the fundamental counting principle to combine independent choices.
- Watch for restrictions. Problems that say "at least one" or "at most three" often require calculating the complementary case and subtracting. The number of committees with at least one woman equals the total committees minus the all-male committees.
Common Mistakes to Avoid
- Confusing permutations and combinations. Using P(n, r) when order is irrelevant inflates your answer by a factor of r!. A 5-card poker hand has C(52, 5) = 2,598,960 possible hands, not P(52, 5) = 311,875,200. Always determine whether ordering matters before selecting a formula.
- Forgetting that 0! = 1. When r = n (selecting all items), the formula includes (n - n)! = 0! in the denominator. If you treat 0! as 0 instead of 1, you will get a division-by-zero error rather than the correct result.
- Misidentifying repetition. Standard permutation and combination formulas assume each item is selected at most once. If items can repeat (like digits in a PIN code), you need the "with repetition" formulas: n^r for permutations or C(n + r - 1, r) for combinations.
- Computing full factorials unnecessarily. Calculating 49! as a complete number before dividing is impractical and risks overflow errors. Cancel the common factorial terms first, then multiply the remaining factors.
- Ignoring problem constraints. Read problems carefully for restrictions like "must include at least 2 seniors" or "no two people from the same department." These constraints require adjusting the calculation, often by splitting into cases or using complementary counting.
Try Our Probability Calculator
Use combinations to calculate event probabilities and expected outcomes.
Use CalculatorFrequently Asked Questions
The fundamental counting principle states that if one event can occur in m ways and a second independent event can occur in n ways, then the two events together can occur in m times n ways. For example, if you have 3 shirts and 4 pants, you can make 3 times 4 equals 12 different outfits. This principle extends to any number of sequential choices and forms the foundation for both permutation and combination calculations.
The convention that 0! equals 1 is necessary for mathematical consistency. It ensures that the combination formula C(n, 0) equals 1, reflecting the fact that there is exactly one way to choose zero items from any set (choose nothing). It also preserves the recursive relationship n! equals n times (n-1)!, because 1! equals 1 times 0! requires 0! to equal 1. Without this definition, many combinatorial formulas would need special case handling for n equals 0.
Lottery odds use combinations because the order of drawn numbers does not matter. For a typical lottery where you pick 6 numbers from 49, calculate C(49, 6) = 49! divided by (6! times 43!), which equals 13,983,816. Your odds of matching all 6 numbers with a single ticket are 1 in 13,983,816. Some lotteries add a bonus ball from a separate pool, which multiplies the total combinations and further reduces the odds.
Permutations with repetition occur when items can be reused in each position. The formula is n to the power of r, where n is the number of items to choose from and r is the number of positions. A 4-digit PIN using digits 0 through 9 allows repetition, giving 10 to the power of 4 equals 10,000 possible PINs. This differs from standard permutations where each item can only be used once.
Each entry in Pascal's triangle equals a combination value C(n, r), where n is the row number and r is the position within the row (both starting from 0). The triangle's third row reads 1, 3, 3, 1, which corresponds to C(3,0), C(3,1), C(3,2), C(3,3). This connection means you can read combination values directly from the triangle. Pascal's triangle also reveals the binomial coefficients used when expanding expressions like (a + b) raised to the nth power.
Yes, permutations are always greater than or equal to combinations for the same values of n and r (when r is greater than 1). This is because P(n, r) equals C(n, r) times r!, so permutations count every possible ordering of each combination. For example, from 5 items choosing 3, there are C(5,3) = 10 combinations but P(5,3) = 60 permutations. Each combination of 3 items can be arranged in 3! = 6 different orders, and 10 times 6 equals 60.
In combinations without replacement (the standard formula), once an item is chosen it cannot be chosen again. Picking 3 cards from a deck of 52 uses C(52, 3) because each card is unique and drawn only once. In combinations with replacement (also called multiset coefficients), items can be selected multiple times. The formula changes to C(n + r - 1, r). Choosing 3 scoops from 5 ice cream flavors where repeats are allowed gives C(7, 3) = 35 possible selections.
Sources & References
- Wolfram MathWorld — Mathematical reference on permutations and counting: mathworld.wolfram.com
- Wolfram MathWorld — Mathematical reference on combinations and binomial coefficients: mathworld.wolfram.com
- Encyclopaedia Britannica — Encyclopedia article on permutations and combinations: britannica.com
CalculatorGlobe Team
Content & Research Team
The CalculatorGlobe team creates in-depth guides backed by authoritative sources to help you understand the math behind everyday decisions.
Related Calculators
Permutation and Combination Calculator
Calculate permutations and combinations for any values of n and r.
Factorial Calculator
Calculate factorials used in permutation and combination formulas.
Probability Calculator
Use combinations to calculate event probabilities.
Statistics Calculator
Perform statistical analysis using combinatorial methods.
Dice Roller
Explore permutations and probability with dice combinations.
Exam Score Calculator
Apply combination problems to test question selection.
Related Articles
How to Calculate Standard Deviation: Step-by-Step
Master standard deviation calculation with a clear step-by-step method, understand population vs sample formulas, and see practical real data examples.
Understanding Percentages: Practical Applications
Master percentage calculations for discounts, tips, grades, and growth rates with clear formulas, step-by-step examples, and common conversion shortcuts.
How to Solve Quadratic Equations
Learn three methods to solve quadratic equations including the quadratic formula, factoring, and completing the square with worked examples for each approach.
The Golden Ratio in Nature, Art, and Design
Discover the golden ratio and its appearances in nature, architecture, art, and modern design with mathematical proofs and visual examples explained clearly.
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: February 23, 2026