Permutations & Combos
Calculate permutations (nPr) and combinations (nCr) with step-by-step factorial breakdown. Toggle between order matters vs.
The total number of items to choose from (n ≥ 0)
How many items you are selecting (r ≥ 0)
With repetition: permutations = n^r, combinations = C(n + r − 1, r)
Results
Permutation: 5P3
60
- Type
- Permutation
- Formula
- P(5,3) = 5! / (5 − 3)!
- Formula Applied
- 5! / 2! = 120 / 2 = 60
- n!
- 120
- r!
- 6
- (n−r)!
- 2
The formula
P(n,r) = n!/(n−r)! | C(n,r) = n!/(r!(n−r)!)
- n
- Total Items
- r
- Items Chosen
- n!
- n Factorial
- P(n,r)
- Permutation
- C(n,r)
- Combination
Worked example — Total Items (n) 5, Items Chosen (r) 3
Permutation: 5P3 = 60
How Permutations & Combos Works
P(n,r) = n!/(n−r)! | C(n,r) = n!/(r!(n−r)!)
Permutations count arrangements where order matters. Combinations count selections where order does not matter. The key difference is dividing by r! in combinations to eliminate counting different orders as distinct outcomes.
- n
- Total Items — The total number of distinct items available to choose from. Must be a non-negative integer up to 1000.
- r
- Items Chosen — How many items you are selecting at a time. Must be between 0 and n.
- n!
- n Factorial — The product of all positive integers from 1 to n: n × (n−1) × ... × 1. By convention, 0! = 1.
- P(n,r)
- Permutation — Number of ways to arrange r items from n when order matters: n!/(n−r)!
- C(n,r)
- Combination — Number of ways to select r items from n when order does not matter: n!/(r!(n−r)!)
Understanding the Result
Permutations and combinations are fundamental counting techniques in combinatorics and probability. Permutations (order matters) count arrangements like passwords ("123" differs from "321"), race rankings (1st, 2nd, 3rd place), and seating arrangements. Combinations (order does not matter) count selections like lottery numbers (the same set of numbers wins regardless of draw order), committee members, and poker hands. The key mathematical insight is that the combination formula is the permutation formula divided by r! — dividing by r! removes the count of different orderings for the same set of items.
The factorial function grows extremely fast: 10! = 3,628,800, and 20! is about 2.43 quintillion. Because the factorial overflows ordinary floating-point numbers beyond 170!, this calculator uses exact big-integer arithmetic and accepts n and r up to 1000. Real-world applications include password security analysis (how many possible 8-character passwords?), tournament bracket design, genetics (gene combinations), and quality control sampling plans.
How to Use
- Enter the total number of items (n) and how many to choose (r). Both must be non-negative integers with r ≤ n.
- Toggle "Does Order Matter?" to switch between permutations (order matters) and combinations (order does not matter).
- View the result, formula, and detailed step-by-step calculation showing each factorial value.
- Compare permutation vs. combination results — notice that combinations are always smaller because order no longer contributes distinct arrangements.
- n and r can be up to 1000. The arithmetic is exact (big integers); results longer than 21 digits are shown in scientific notation with the exact value on its own line.
Frequently Asked Questions
- What is the difference between permutations and combinations?
- Permutations care about order: ABC, ACB, BAC are all different. Combinations treat ABC, ACB, BAC as the same selection. Think of a race: 1st/2nd/3rd place is a permutation (order matters). Choosing 3 team members is a combination (order does not matter). The combination formula is the permutation formula divided by r! — this removes the count of different orderings.
- What does 0! equal and why?
- 0! = 1 by mathematical convention. There is exactly one way to arrange zero items (the empty arrangement). This convention makes formulas work correctly: C(n,n) = n!/(n!×0!) = 1, meaning there is exactly one way to choose all items.
- Can r be greater than n?
- No. You cannot choose more items than are available. If r > n (and items cannot repeat), the calculator shows 0 because there are zero ways to select r different items from n available items. With repetition allowed, r may exceed n.
- What changes when items can repeat?
- Ordered selections with repetition (like PIN codes or passwords) number n^r, because each of the r positions can be any of the n items: 10 digits, 4 positions gives 10^4 = 10,000. Unordered selections with repetition (like choosing 3 scoops from 5 flavours, flavours may repeat) number C(n + r - 1, r): C(7, 3) = 35.
Cite this calculator
TheCalcUniverse. "Permutation and Combination Calculator (nPr & nCr)." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/permutation-combination-calculator/. Accessed October 25, 2026.
Embed this calculator on your site
You may also like
-
Mathematics
Probability
Compute joint (A∩B), union (A∪B), conditional P(A|B), and complement probabilities for independent or mutually exclusive events with Venn diagram.
Open calculator → -
Mathematics
Number Sequences
Identify arithmetic, geometric, and Fibonacci sequences. Find common difference, common ratio, nth-term formula, and compute next terms.
Open calculator → -
Mathematics
Factor Calculator
Find all factors of any positive integer with a complete factor pairs table, total factor count, sum of factors, and primality test.
Open calculator → -
Mathematics
Statistics
Comprehensive descriptive statistics calculator with a dynamic box-and-whisker plot. Computes the five-number summary, quartiles, IQR, standard deviation.
Open calculator → -
Mathematics
Descriptive Stats
Compute key descriptive statistics for any dataset: mean, median, mode, range, variance, standard deviation, quartiles, and IQR.
Open calculator →