Permutation & Combination Calculator
Enter the total number of items (n) and the number chosen (r) to calculate permutations (nPr), combinations (nCr), and n!.
Permutation and Combination Calculator: Formulas, Examples, and When to Use Each
Quick summary: A permutation and combination calculator instantly tells you how many ways you can arrange (permutation) or select (combination) items from a group — the only question that decides which formula applies is whether order matters. This guide breaks down both formulas, walks through worked examples, and clears up the mix-up between the two that trips up most students.
Few topics in math cause more confusion than permutations and combinations. They show up in the same textbook chapter, use nearly identical formulas, and both answer some version of “how many ways can this happen?” — which is exactly why a permutation and combination calculator is so useful. This guide explains both concepts clearly, shows you the exact formulas, walks through several worked examples, and answers the most common questions people search for on this topic.
What’s the Difference Between a Permutation and a Combination?
Permutations and combinations are two of the most commonly mixed-up concepts in probability, because they show up in the same unit, involve the same basic setup of choosing items from a group, and use formulas that look similar enough to grab the wrong one without realizing it. The entire distinction comes down to one question: does order matter?
- Permutation = arranging items where order matters. A permutation is concerned with the different arrangements of a set of elements, where the order of the elements matters.
- Combination = selecting items where order doesn’t matter. A combination is concerned only with the selection of elements from a set, without regard to order.
A classic illustration: if you have a lock that requires four digits entered in a specific sequence, order matters — entering the correct digits in the wrong order won’t open the lock — so that’s a permutation. But if you’re topping a pizza with pepperoni, ham, and mushroom, it doesn’t matter what order you add the toppings; the final pizza is the same either way, which makes it a combination.
The Permutation Formula
nPr = n! / (n − r)!
Where:
- n = total number of items available
- r = number of items being arranged
- ! = factorial (e.g., 5! = 5 × 4 × 3 × 2 × 1 = 120)
The notation nPr represents the number of ways to choose and arrange r objects out of n total options — for example, 5P3 tells you how many unique ways you can pick and arrange 3 objects out of 5 choices when the order of selection changes the outcome.
The Combination Formula
nCr = n! / [r! × (n − r)!]
The formula for combinations is nCr = n! / [r! (n−r)!], and it’s directly related to the permutation formula by nCr = nPr / r! — essentially, a combination is a permutation with the duplicate orderings divided back out.
Worked Example 1: Permutation
Question: How many 2-letter arrangements can be made from the letters in the word GREAT?
Using the formula with n = 5, r = 2:
5P2 = 5! / (5−2)! = 5! / 3! = (5 × 4 × 3 × 2 × 1) / (3 × 2 × 1) = 20
This mirrors a standard textbook example: the number of 2-letter words formed from the letters in “GREAT” is calculated as 5P2 = 5!/(5−2)!.
Worked Example 2: Combination
Question: A basketball coach needs to select 2 players from a roster of 6. How many different pairs are possible?
Using the formula with n = 6, r = 2:
6C2 = 6! / [2! × (6−2)!] = 720 / (2 × 24) = 15
Since the goal here is simply forming a group (not ranking the players), this is a combination problem with n = 6 and r = 2, and the answer is 15 different possible teams of 2 players.
Worked Example 3: Telling Them Apart in Word Problems
Consider two versions of the same setup: Problem A — ten students enter a competition, and three are selected to each receive an identical $50 gift card; Problem B — ten students enter a competition, and three are selected to receive first, second, and third-place trophies.
- Problem A is a combination, because each winner receives the same prize, so the order in which they’re chosen doesn’t matter.
- Problem B is a permutation, <cite index=”33-1″>because the rankings mean order does matter — first place, second place, and third place are all different outcomes even with the same three students.</cite>
Worked Example 4: PIN Codes and Team Selection
If you’re forming 6-digit PIN codes, the calculation produces 1,680 different possible permutations for that scenario, because every unique ordering of digits counts as a distinct PIN. Compare that to a pure selection problem: choosing 4 students out of 10 for a class trip is a combination problem, calculated as 10C4 = 10! / [4!(10−4)!].
When Do You Use Each One? Quick Reference
| Scenario | Permutation or Combination? |
|---|---|
| Ranking runners 1st, 2nd, 3rd | Permutation |
| Selecting a committee of 3 from 10 people | Combination |
| Creating a password from a set of characters | Permutation |
| Choosing pizza toppings | Combination |
| Assigning students to numbered seats | Permutation |
| Picking lottery numbers (unordered draw) | Combination |
| Arranging books on a shelf | Permutation |
| Selecting a starting 5 for a basketball team | Combination |
Permutations are commonly used for creating passwords, forming different words from a set of letters, and working out seating arrangements — anywhere the sequence itself changes the result.
How to Use a Permutation and Combination Calculator
- Identify n — the total number of items in your set.
- Identify r — how many items you’re selecting or arranging.
- Ask: does order matter? If yes, use the permutation formula (nPr). If no, use the combination formula (nCr).
- Enter n and r into the calculator to instantly get factorial-based results without manually computing large factorials by hand.
This last point matters more than it seems — factorials grow extremely fast (10! is already 3,628,800), so a calculator saves significant manual computation time on anything beyond small examples.
Frequently Asked Questions
Order matters → permutation. Order doesn’t matter → combination. If swapping two items would create a “new” outcome, it’s a permutation problem.
Yes. Since nCr = nPr / r!, and r! is always 1 or greater, the number of combinations is always less than or equal to the number of permutations for the same n and r.
No — you can’t select or arrange more items than exist in the original set (without repetition). Both formulas require r ≤ n.
Standard nPr and nCr formulas assume no repetition. If items can repeat (like choosing digits for a PIN where digits can be reused), the formulas change to n^r for permutations with repetition, and a separate “combinations with repetition” formula for combinations.
Common applications include password and PIN generation, lottery and probability calculations, scheduling and seating arrangements, team and committee selection, and genetics/combinatorics problems in statistics.
By mathematical convention, 0! = 1. This matters because when r = n, the formula (n−r)! becomes 0!, and without this definition the formula would break down.
Related Calculators
Solar Saving Calculator By State
Scientific Notation Calculator
Greatest Common Factor Calculator
Conclusion
A permutation and combination calculator takes the guesswork out of one of math’s most commonly confused topics: once you’ve correctly identified whether order matters, the calculator handles the (often large) factorial arithmetic instantly. Whether you’re arranging a lineup, selecting a committee, or solving a probability problem, remembering the core distinction — permutation for order, combination for selection — is the key to picking the right formula every time.