A complete guide to the nCr and nPr formulas — the difference between them, their relationship to factorials, and their repeated (with-repetition) versions — with real examples.
Combinations and permutations are the two fundamental combinatorics concepts that count how many different ways you can select a certain number of elements from a set. The only difference between them is whether the order of the selected elements matters. This calculator computes both values at once, shows the factorial expansion step by step, and — even for astronomically large numbers beyond 170! — returns an exact result using BigInt.
What is a permutation (nPr)?
Quick answerA permutation (nPr) is the number of ways to choose and arrange r elements from a set of n, where order matters. Formula: nPr = n! / (n−r)!. For example, how many ways can the top 3 finishers (gold-silver-bronze) be ordered among 5 racers? That's a permutation: 5P3 = 60.
What is a combination (nCr), and how do you calculate it?
Quick answerA combination (nCr) is the number of ways to choose r elements from a set of n, where order doesn't matter. Formula: nCr = n! / (r! × (n−r)!). For example, how many different 3-person project teams can be formed from 10 people (if no one's role matters)? The answer is 10C3 = 120.
What's the difference between a permutation and a combination?
Quick answerThe difference comes down to one word: order. In a permutation, the arrangement/order matters (distinct roles like president-vice president-secretary); in a combination, only the group/selection matters (a committee where no one's role is distinguished). For the same n and r, nPr is always r! times larger than nCr: nPr = nCr × r!. Example: an ordered 3-person leadership team (president/vice-president/secretary) chosen from 10 people can be formed in 10P3 = 720 ways, while an unordered 3-person committee from the same 10 people can be formed in 10C3 = 120 ways — a factor of 720/120 = 6 = 3!.
What is the factorial (n!) formula?
Quick answern! (n factorial) is the product of all positive integers from 1 to n: n! = n×(n−1)×...×2×1, with 0! defined as 1. Both the nPr and nCr formulas are built on factorials. Factorials grow astonishingly fast: 10! = 3,628,800, while 20! already has 19 digits.
What is a permutation with repetition?
Quick answerA permutation with repetition finds the number of distinct orderings of a sequence that contains identical (repeated) elements. If n elements consist of n₁, n₂, ..., nₖ copies of each distinct item, the number of distinct arrangements is n! / (n₁!·n₂!·...·nₖ!). Example: the word "BANANA" (6 letters: 3 A's, 2 N's, 1 B) has 6!/(3!·2!·1!) = 60 distinct arrangements — try your own word in the "Repeated Perm." tab.
What is combination with repetition?
Quick answerCombination with repetition is the number of ways to choose r items from n types, where order doesn't matter and repeats are allowed: C(n+r−1, r). Example: choosing 5 pieces of fruit total from 3 types (apple, pear, banana), where you can take more than one of the same fruit, gives C(3+5−1,5) = C(7,5) = 21 different selections.
What is a circular (round-table) permutation?
Quick answerA circular permutation is the number of ways n elements can be arranged around a circle (a round table). Because rotating the entire arrangement produces the same layout, the linear count n! is divided by n, giving (n−1)!. Example: 6 people can be seated around a round table in (6−1)! = 5! = 120 different ways. For arrangements that can also be reflected — like a necklace or bracelet, where mirror images count as identical — divide by 2 as well: (n−1)!/2; for example, a 6-bead necklace can be arranged in 5!/2 = 60 ways. Try your own n in the "Circular" tab.
Which formula do "how many different ways" questions use?
Quick answerQuestions phrased as "how many different ways can X be selected/formed" are usually combination (nCr) questions, since order is typically irrelevant; "how many different ways can X be arranged/ordered" signals a permutation (nPr). If you're unsure, ask yourself: if two selections contain the same elements but in a different order, do they count as "different"? If yes, use nPr; if no, use nCr.
Consider a classic example: how many ways can a 3-person team be formed from 10 people? If there are no distinct roles (everyone is an equal member), this is a combination: 10C3 = 120. But if the team has a captain, a vice-captain, and a designated goalkeeper (distinct roles), it's a permutation: 10P3 = 720. Enter n=10, r=3 in the calculator above to see both results at once, with the step-by-step breakdown.