Permutation and Combination Calculator with Steps
The permutation and combination calculator helps you find the number of possible arrangements or selections without listing every possibility by hand. Students encounter these questions in school mathematics, probability, statistics, computer science, entrance-exam preparation and competitive aptitude. Our free online permutation and combination calculator solves nPr and nCr questions, shows the mathematical formula and explains each step so you can understand the result instead of simply copying a number.
Permutations and combinations look similar because both involve selecting items from a larger group. The difference is whether order changes the outcome. When you arrange students in the positions of captain, vice-captain and secretary, the order is important, so you use a permutation. When you choose three students to form a committee with equal roles, the order does not matter, so you use a combination. A combination permutation calculator should make this distinction clear before performing any arithmetic.
The calculator also includes an optional repetition setting. With repetition enabled, an item may be selected more than once. For example, a four-digit code can contain the same digit repeatedly, while choosing three distinct prize winners usually does not allow the same person to fill more than one position. Decide whether repetition is allowed before selecting your formula.
Quick answer: permutation vs combination
Permutation: order matters; calculate nPr = n! / (n − r)! without repetition. Combination: order does not matter; calculate nCr = n! / [r!(n − r)!] without repetition. In both formulas, n is the number of available items, r is the number selected and ! denotes a factorial.
How to Use the Permutation and Combination Calculator
- Choose Permutation (nPr) when different orders count as different results. Choose Combination (nCr) when a different order represents the same group.
- Enter the number of available items in Total items (n). For example, if you have five books, enter 5.
- Enter how many items will be used in Items chosen (r). For a selection of three books, enter 3.
- Keep Allow repetition unchecked if no item may be used more than once. Check it if the same item may be selected repeatedly.
- Press Calculate to see the exact integer answer, formula and clear working. For very large answers, the display abbreviates the number but Copy full result retains all digits.
- Use the examples to compare 5P3, 5C3, 6C2 and selections where repetition is permitted.
This is the basic process behind calculation of permutation and combination, calculate permutation and combination online and computing permutations and combinations. The most common source of errors is not arithmetic; it is choosing the wrong counting rule. Always ask whether a rearrangement counts as a new outcome.
Permutation Formula: How to Calculate nPr
A permutation is an ordered arrangement of r items taken from n available distinct items. The first position has n choices, the second has n − 1 choices, and so on until all r positions are filled. When selection is without repetition, multiplying the number of choices at each step gives the permutation count.
Here the factorial symbol ! means multiplying all positive integers down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. The factorial notation is a compact way of describing how choices shrink when an item cannot be reused.
Example: Find 5P3
You have five different books and want to arrange three of them on a shelf. The first position has five choices, the second has four and the third has three. Thus 5P3 = 5 × 4 × 3 = 60 arrangements. Using factorial notation, 5P3 = 5! / 2! = 120 / 2 = 60. A permutation and combination calculator with steps should show these intermediate choices so the result is easy to verify.
If all five books are arranged, 5P5 = 5! = 120. If no books are chosen, 5P0 = 1, representing the one empty arrangement. These boundary cases are useful for understanding why the factorial formulas work.
Combination Formula: How to Calculate nCr
A combination counts selections where order does not matter. If you choose students A, B and C to form one committee, listing them as BAC or CBA does not form a different committee. Every group of r distinct members appears r! times among the ordered arrangements, so combinations divide the permutation count by r!.
Example: Find 5C3
From five students, choose three to join a team. The permutation count is 5P3 = 60, but each team of three is counted 3! = 6 times in different orders. Therefore 5C3 = 60 / 6 = 10 possible teams. The result would not change if the students stood in a different order after selection.
The same formula tells us 6C2 = 6! / (2! × 4!) = 15. A useful shortcut is the symmetry rule nCr = nC(n − r). For example, selecting three people from five is mathematically equivalent to deciding which two are left out, so 5C3 = 5C2 = 10.
Permutation and Combination Formulas with Repetition
The ordinary nPr and nCr formulas assume that each selected item is distinct and cannot be picked more than once. However, many password, code, and product-selection questions allow repeated choices. Our calculator provides a repetition checkbox because the rules are genuinely different.
If you create a four-character code from three letters A, B and C and letters can repeat, there are 3 choices for every position. Thus the number of codes is 3⁴ = 81. AAAA, ABCA and CCCC are valid. This is a permutation-like ordered selection with repetition, not the ordinary nPr formula.
When order does not matter but repetition is allowed, use combinations with repetition, also known as multisets or the stars-and-bars counting method. For example, selecting three scoops from five ice-cream flavors with repeated flavors allowed gives C(5 + 3 − 1, 3) = C(7,3) = 35 selections. Choosing vanilla twice and chocolate once is the same combination regardless of the order of scoops.
Be careful with questions about permutation and combination involving identical objects. Arranging a fixed collection with repeated letters, such as MISSISSIPPI, is a different problem from choosing items with replacement. For repeated letters in a fixed multiset, use multinomial factorial division, not nʳ. This page's repetition option specifically means each selection may choose any of the n available types again.
Difference Between Permutations and Combinations
| Question | Permutation | Combination |
|---|---|---|
| Does order matter? | Yes | No |
| Choosing 3 from 5, no repetition | 5P3 = 60 | 5C3 = 10 |
| Formula without repetition | n!/(n−r)! | n!/[r!(n−r)!] |
| Formula with repetition | nʳ | C(n+r−1,r) |
| Typical example | Assigning different positions | Choosing committee members |
One way to remember the difference is to ask what happens when two selected objects switch places. If the meaning of the result changes, you are probably using a permutation. If the result is the same group, you are probably using a combination. This is the central idea behind a calculator for combinations and permutations or a calculator permutation and combination.
Step-by-Step Permutation and Combination Examples
Example 1: Awarding gold, silver and bronze medals
Eight students compete in a quiz. Three different medals are awarded to three students. Because gold, silver and bronze are different positions, order matters. The calculation is 8P3 = 8 × 7 × 6 = 336 possible results. If you instead choose three students for one equal-status award, the answer would be 8C3 = 56.
Example 2: Choosing a project group
A class has ten students, and a group needs four members. If every member has the same role, choose the combination formula: 10C4 = 10! / (4! × 6!) = 210 groups. There is no need to list all the teams; the calculator produces the exact count.
Example 3: Passwords with repeated digits
A password contains three digits, and each digit can be any of 0 through 9. There are ten possible values for each position and repetitions are allowed. The count is 10³ = 1,000 passwords. This calculation treats leading zeros as valid, so 007 is included. If the problem prohibits a leading zero or repeated digits, the answer changes and the restrictions must be handled separately.
Example 4: Selecting donuts with repetition
A bakery offers four kinds of donuts, and a customer buys three where repeated types are allowed. If the order in the box does not matter, the number of possible selections is C(4+3−1,3) = C(6,3) = 20. Turn on Allow repetition and choose Combination to calculate this case.
Example 5: A lottery selection
Many lottery-style number-selection problems use combinations when the selected numbers do not need to be in a particular order. If six different numbers are chosen from 49 possible numbers, the number of selections is 49C6 = 13,983,816. This is a counting result, not a general prediction of winning probability; any additional game rules must be taken into account.
How to Calculate Permutations and Combinations on a Scientific Calculator
Students frequently ask how to calculate permutations and combinations on a scientific calculator or how to calculate permutations and combinations on calculator. Many scientific calculators have nPr and nCr functions. Typically, enter n, select nPr or nCr, enter r and press equals. The exact button sequence depends on the calculator model and its shift menu.
For the example 5P3, a scientific calculator with an nPr key should return 60. With 5C3, it should return 10. Some calculators use menus called Probability, Combinatorics, or Math. If your device lacks these functions, use the factorial formulas or this online tool to check the computation.
The search phrase permutation on scientific calculator normally refers to the nPr function. The phrase online scientific calculator with combinations and permutations refers to a wider type of scientific calculator containing both nPr and nCr controls. This page deliberately keeps those operations separate and visible so students do not need to search through calculator menus.
Permutation and Combination in Excel, Python, R and Other Software
A permutation and combination calculator excel search often means a student wants to reproduce the same calculation in a spreadsheet. In Microsoft Excel, PERMUT(n,r) calculates permutations without repetition, while COMBIN(n,r) calculates combinations without repetition. For repetitions, Excel also provides PERMUTATIONA and COMBINA in versions that support them. Check the functions' definitions when using zero values or incompatible arguments.
In Python, the standard math module includes math.perm(n,r) and math.comb(n,r), returning exact integers for valid nonnegative values. It also provides math.factorial(n). For a quick example, math.perm(5,3) is 60 and math.comb(5,3) is 10. Unlike floating-point approximations, Python integers and this calculator's JavaScript BigInt-based implementation can represent very large integer results exactly.
Some users search for how do u calculate permutation and combination in r. In the R language, choose(n,r) computes a binomial coefficient, and factorial(n) / factorial(n-r) expresses a permutation for suitable inputs. R commonly works with double-precision numeric values, so very large outputs may be approximated rather than exact integers.
A permutation and combination calculator app or permutation and combination software is convenient for offline practice, but a browser tool is enough for standard nPr and nCr questions. This page runs entirely on the device without requiring an account or an external calculation service. Students seeking a permutation and combination calculator online can access the same arithmetic on a phone, tablet or computer.
Why Factorials Matter for Counting
Factorials appear throughout permutations and combinations because they count arrangements of distinct items. The number of ways to arrange n distinct objects is n!. For four books, there are 4! = 24 possible complete orders. When you arrange only r objects from n, you stop the multiplication after r factors, which gives the permutation formula.
For combinations, the same arrangement is counted multiple times because the internal order of the selected items does not create a new group. Dividing the permutation count by r! removes these duplicate orders. This also explains the identity nPr = nCr × r!, which you can use to check answers when repetition is not allowed.
Large n values create enormous factorials, and an ordinary JavaScript number loses integer precision beyond 2⁵³ − 1. This calculator uses BigInt so the count itself is exact within the supported input range. When the answer has hundreds or thousands of digits, the page shows an abbreviated preview and a digit count so that mobile users can still read the result. The copy button copies the full answer rather than only the preview.
Probability, Combinations and Counting Outcomes
Combinations frequently appear when finding the number of equally likely outcomes. A classical probability question may divide the number of favorable combinations by the number of total possible combinations. For instance, if two students are chosen randomly from five, there are 5C2 = 10 possible pairs. If a particular pair is the only favorable result and all pairs are equally likely, the probability of selecting that pair is 1/10.
But not every real event has equally likely outcomes. Permutations and combinations count possibilities; they do not automatically tell you which outcomes are more probable. Probability also depends on the selection process, replacement rules, restrictions and fairness assumptions. That distinction is especially important in statistics and probability chapters.
Common Mistakes When Solving Permutation and Combination Questions
- Confusing arrangement and selection. A ranking and a committee with the same numbers n and r produce different answers.
- Forgetting the replacement rule. Decide whether an item can be chosen again before using the repetition checkbox.
- Using nCr when positions are labeled. Selecting a president and secretary from ten people is ordered, even if both are chosen from the same group.
- Using nPr when group order is irrelevant. A group selected as ABC is the same group as CBA.
- Applying ordinary nPr or nCr with r larger than n. Without repetition, you cannot select more distinct items than are available.
- Treating 0! as zero. In combinatorics, 0! = 1 and selecting nothing has one empty outcome.
- Using repetition formulas for arrangements of fixed duplicate letters. The multiset-permutation problem requires a different counting argument.
- Adding arbitrary restrictions after calculating. Extra conditions such as not starting with zero or keeping two people apart can change the formula.
Useful Permutation and Combination Practice Table
| n | r | nPr | nCr |
|---|---|---|---|
| 3 | 2 | 6 | 3 |
| 4 | 2 | 12 | 6 |
| 5 | 2 | 20 | 10 |
| 5 | 3 | 60 | 10 |
| 6 | 2 | 30 | 15 |
| 8 | 3 | 336 | 56 |
| 10 | 4 | 5,040 | 210 |
The table demonstrates that nPr is usually larger than nCr when 1 < r ≤ n. It includes counting problems that appear in basic mathematics, school examinations, aptitude reasoning and introductory statistics.
Frequently Asked Questions
1. What is a permutation and combination calculator?
It is a permutation and combination solver that calculates how many ordered arrangements or unordered selections can be made from a set of items.
2. What is the formula for permutation?
Without repetition, nPr = n! / (n-r)!. It counts arrangements of r distinct items selected from n items.
3. What is the formula for combination?
Without repetition, nCr = n! / [r!(n-r)!]. It counts groups where the order of selected members does not matter.
4. What is the difference between nPr and nCr?
nPr counts ordered arrangements while nCr counts unordered selections. For n = 5 and r = 3, the results are 60 and 10 respectively.
5. How do I find 7C3?
Use 7! / [3! × 4!] = 35. Select Combination, enter n = 7 and r = 3.
6. Can I calculate a permutation with repetition?
Yes. Switch on Allow repetition. For n available symbols and r ordered positions, the count is nʳ.
7. Can I calculate a combination with repetition?
Yes. The formula is C(n+r−1,r) when n is positive. It counts unordered selections with replacement allowed.
8. What if r is greater than n?
Without repetition, the selection is impossible and the calculator asks you to correct it. With repetition, larger r values are allowed.
9. Why is 0! equal to 1?
This convention keeps factorial counting rules consistent and represents one way to arrange or choose zero items: the empty arrangement.
10. Can I use this for probability?
Yes, to count possible selections and arrangements. Calculating probability also requires assumptions about how likely those possibilities are.
11. Does it work for very large numbers?
Yes, up to the stated input limits. Results use exact integer arithmetic, and long answers are shortened on screen while remaining fully copyable.
12. Is there a visual explanation?
Yes. The comparison shows that switching ABC to BAC creates a new permutation but does not create a new combination.
13. Can I use this as a graphing calculator for permutations and combinations?
The page includes an illustrated counting example rather than a full mathematical graphing engine. Its main purpose is exact combinatorial calculation.
14. Does this replace a scientific calculator?
It provides the nPr and nCr counting functions directly. A general scientific calculator may additionally support logarithms, trigonometry and other operations.
15. Is this tool suitable for entrance-exam preparation?
Yes. It is useful for checking standard counting exercises in school maths, aptitude tests, introductory probability and competitive examination practice.
Start Calculating Permutations and Combinations
Use the permutations and combinations calculator above to enter n and r, compare answers and verify the formulas. Whether you are preparing for a mathematics exam, doing a probability assignment or checking a counting problem, the steps can help you understand when order matters and how repetition changes the result.