About the Permutation & Combination Calculator tool
“How many ways?” questions are everywhere: how many lottery tickets exist, how many ways a committee of 4 can be picked from 12 people, how many 6-character codes can be made from 36 symbols. The answer depends on two yes-or-no questions — does the order matter, and can an item be used more than once? Get either one wrong and the count can be off by a factor of thousands.
This permutation and combination calculator asks those two questions directly with the “Does order matter?” and “Can items repeat?” selectors, then computes the matching count: nPr = n! ÷ (n − r)!, nCr = n! ÷ (r!(n − r)!), nʳ for ordered selections with repetition, or C(n + r − 1, r) for unordered selections with repetition. The other three counts are shown underneath so you can see how much each assumption changes the answer.
Results are exact. The calculator uses big-integer arithmetic rather than floating point, so C(100, 50) is shown as all 30 digits instead of a rounded 1.0089e29; only truly enormous answers with more than 20,000 digits fall back to a scientific approximation. If you type your actual items, such as “red, green, blue, yellow”, it also lists every permutation or combination when there are 500 or fewer.
How to use Permutation & Combination Calculator
- Enter n, the total number of items to choose from, and r, the number you pick.
- Choose “Does order matter?” — Yes for permutations (rankings, codes, seating), No for combinations (teams, hands of cards).
- Choose “Can items repeat?” — allow repetition for things like PIN digits that can be reused.
- Optionally type the items in “List the items” to set n automatically and see every arrangement.
- Read the count, compare it with the other three counts below it, and open “Show steps” for the formula.
Features
Exact big-integer answers
Counts are calculated with BigInt, so large factorial results keep every digit.
All four counting rules
Permutations and combinations, each with and without repetition, from two simple questions.
Side-by-side comparison
The other three counts for the same n and r appear under the main answer.
Lists the actual arrangements
Type your own items and see every permutation or combination when there are up to 500.
Formula with your numbers
Steps show how factorials cancel, for example P(10, 3) = 10 × 9 × 8 = 720.
When to use it
- Count the possible 6-from-49 lottery tickets (13,983,816 combinations).
- Work out how many ways gold, silver and bronze can be awarded to 8 finalists.
- Find how many 4-digit PINs exist when digits may repeat.
- List every 2-topping pizza you can make from a menu of toppings.
- Check a combinatorics exercise before handing it in.
Frequently asked questions
What is the difference between a permutation and a combination?
In a permutation the order matters, so ABC and CBA are different. In a combination only the members matter, so ABC and CBA are the same selection. For the same n and r, there are r! times as many permutations as combinations.
What is the formula for nCr?
nCr = n! ÷ (r! × (n − r)!). For example C(5, 2) = 120 ÷ (2 × 6) = 10.
What is the formula for nPr?
nPr = n! ÷ (n − r)!, which is the product of the r largest factors n × (n − 1) × … × (n − r + 1). For example P(5, 2) = 5 × 4 = 20.
What are combinations with repetition?
They count unordered selections where an item can be picked more than once, such as choosing 3 scoops from 5 ice-cream flavours. The formula is C(n + r − 1, r), often explained with the “stars and bars” method.
Can r be larger than n?
Only when repetition is allowed. Without repetition you cannot pick more distinct items than exist, so the calculator asks you to allow repetition or lower r.
What is 0! and C(n, 0)?
0! is defined as 1, so C(n, 0) = 1 — there is exactly one way to choose nothing — and P(n, 0) = 1 as well.