Calculate the number of permutations (nPr) and combinations (nCr) for any n and r.
📖 Standard Permutation & Combination FormulasFill in the fields on the left with your information, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.
Permutations and combinations calculate the number of possible ways to choose or arrange r items from a set containing n items, and the fundamental difference between them is whether order matters. Permutations (denoted nPr) count the number of ways when order matters, while combinations (denoted nCr) count the number of ways when order doesn't matter. nPr is calculated by multiplying n by (n−1) by (n−2)... down to r factors, and nCr is calculated by dividing nPr by the factorial of r (r!). This calculator uses precise big-integer arithmetic (BigInt) to ensure full accuracy even with relatively large values of n, making it an essential tool in probability, combinatorics, and algorithm analysis. A simple test for which formula applies is to ask whether swapping two selected items would count as a different outcome: if yes, use permutations; if the result is considered identical either way, use combinations. Committee selection, lottery number choices, and card hands are classic combination problems, while ranking contestants, assigning distinct roles, and generating ordered codes are classic permutation problems.
Permutations and combinations are two of the most frequently confused concepts in introductory probability, largely because the difference between them comes down to a single question that is easy to overlook under exam pressure: does the order of selection matter for this particular problem?
Consider choosing 3 people from a group of 10 to fill three distinct roles — president, secretary, and treasurer. Here, order clearly matters: selecting Alice as president and Bob as secretary is a different outcome from selecting Bob as president and Alice as secretary, even though the same two people were chosen. This is a permutation problem, calculated as 10P3 = 10 × 9 × 8 = 720 possible arrangements.
Now consider choosing 3 people from the same group of 10 to form an unranked committee with no distinct roles. Here, selecting Alice, Bob, and Carol is exactly the same outcome regardless of which order they happened to be picked in — there is no 'first' or 'second' committee member. This is a combination problem, calculated as 10C3 = 120, considerably smaller than the permutation count because many of those 720 ordered arrangements actually represent the same unordered group of three people counted multiple times.
The relationship between the two formulas makes this concrete: nCr always equals nPr divided by r!, because r! is exactly the number of ways to reorder any given group of r items among themselves. Dividing the permutation count by r! removes this redundant counting of the same group in different orders, leaving only the number of genuinely distinct unordered groups.
Lottery number selection is a classic real-world combination problem (the order the winning numbers are drawn in does not matter, only which numbers appear), while password and PIN generation is a classic permutation problem (1234 and 4321 are different, valid PINs even though they use the same four digits). Card games frequently combine both ideas: the number of distinct 5-card poker hands is a combination problem (52C5), but the number of ways to deal those same 5 cards to 5 different players in a specific seating order would instead require a permutation-based calculation.
Both formulas rely on factorials, which grow extremely quickly — this is exactly why this calculator uses arbitrary-precision BigInt arithmetic internally, ensuring the result stays exact even for values of n large enough that a standard calculator would begin losing precision.
Permutations count arrangements where order matters, while combinations count selections where order does not matter.
The number of permutations equals n! (n factorial), and the number of combinations equals exactly 1.
No, you cannot choose more items than are available, so the calculator will show an alert in that case.