Permutations & Combinations Calculator
Calculate nPr and nCr with or without repetition. Instantly see interactive visualizations and get step-by-step explanations for every result. The most user-friendly and educational tool for permutations and combinations.
How to Use This Calculator
- Choose Permutation (nPr) or Combination (nCr) using the buttons above.
- Enter the total number of items (n) and the number to choose (r).
- Toggle Allow Repetition if items can be chosen more than once.
- View the result, formula, steps, and explanation below.
When to Use Permutations vs. Combinations
Permutations: Order Matters
Use permutations when the order of selection is important. Think of arranging items, assigning specific roles, or creating a password. A "1st, 2nd, 3rd" place race is a permutation.
Combinations: Order Doesn't Matter
Use combinations when the order of selection is irrelevant. Think of picking a group of people, choosing toppings for a pizza, or selecting lottery numbers. A hand of cards is a combination.
Practical Examples
Example 1: Race Finishers
Question: In a race with 8 runners, how many different ways can the 1st, 2nd, and 3rd place medals be awarded?
Answer: Order matters, so it's a permutation. Use n=8
, r=3
. The calculation is P(8,3) = 336 ways.
Example 2: Pizza Toppings
Question: A pizza place offers 10 toppings. How many different 3-topping pizzas can you create?
Answer: The order you pick toppings doesn't matter, so it's a combination. Use n=10
, r=3
. The calculation is C(10,3) = 120 pizzas.
Example 3: Lock Code
Question: How many 4-digit codes can be set on a lock with digits 0-9 if digits can be repeated?
Answer: Order matters and repetition is allowed. It's a permutation with repetition. Use n=10
, r=4
. The calculation is 104 = 10,000 codes.
Example 4: Committee Selection
Question: How many ways can a committee of 5 be chosen from a group of 20 people?
Answer: The order of selection for a committee doesn't matter. It's a combination. Use n=20
, r=5
. The calculation is C(20,5) = 15,504 committees.
What Makes Our Calculator Stand Out?
Interactive Visualizer
See a dynamic representation of your inputs. Understand the difference between ordered arrangements and unordered groups at a glance.
Step-by-Step Solutions
Don't just get an answer; understand how it's calculated. We provide the formula and a clear breakdown of each step.
Repetition Control
Easily toggle between calculations that allow or disallow repetition, covering all common permutation and combination scenarios.
Clear Explanations
Each result comes with a plain-language explanation, helping you grasp the meaning and application of the calculated value.
Frequently Asked Questions
What is a Permutation?
A permutation is an arrangement of items where the order matters. For example, if you're arranging books on a shelf, "ABC" is different from "ACB".
What is a Combination?
A combination is a selection of items where the order does not matter. For example, if you're picking fruits for a salad, a "banana, apple, orange" combination is the same as "apple, orange, banana".
When do I use Permutations vs. Combinations?
Use permutations when the sequence or arrangement of items is important (e.g., passwords, race finishes). Use combinations when you're just selecting a group, and the order of selection doesn't change the group itself (e.g., lottery numbers, committee members).
What do 'n' and 'r' mean?
n represents the total number of items available to choose from. r represents the number of items you are choosing or arranging from the total set.
What is "with repetition" vs. "without repetition"?
With repetition: An item can be chosen more than once (e.g., a lock code where digits can repeat). Without repetition: An item can only be chosen once (e.g., picking unique winners in a race).
Why are the results sometimes "Too Large"?
Permutations and combinations can result in extremely large numbers very quickly, especially with larger 'n' and 'r' values. Standard JavaScript numbers have a limit (Number.MAX_SAFE_INTEGER
), and calculations exceeding this limit are displayed as "Too Large" to prevent inaccuracies.