Use this calculator to choose the right counting rule and find how many selections or arrangements are possible.
Advanced options
How to use our Permutation and Combination Calculator
- Choose What are you counting? based on whether order matters and whether repeats are allowed.
- Enter Total distinct items, n (count) for how many different choices you start with.
- Enter Items chosen, r (count) for how many items are selected or arranged.
- Set Show sample arrangements or selections? to yes only if you want a small preview list for learning or checking.
- If you want named results in the preview, enter Item labels (optional, comma-separated) such as A,B,C,D. Leave it blank to use 1, 2, 3, and so on.
- If needed, open Advanced options and set Maximum listed results (count) or the number display format.
- Click Calculate to see the total in Number of outcomes, along with Notation used, Formula used, and Meaning of the mode.
- Sanity-check the answer before trusting it: if order should not matter, switching from a combination mode to a permutation mode should usually make the count larger, and Input check should not show an error.
Definitions
Permutation: A count where order matters. For example, ABC and BAC are different.
Combination: A count where order does not matter. For example, ABC and BAC are the same selection.
Without repetition: You cannot use the same item more than once.
With repetition: The same item can be used more than once.
Total distinct items, n (count): The number of different items available to choose from.
Items chosen, r (count): The number of items selected or arranged.
Notation used: The standard shorthand for the case, such as C(n,r) or P(n,r).
Number of outcomes: The total number of valid selections or arrangements for your chosen mode.
Listed results shown: How many actual sample selections or arrangements appear in the preview list.
Common mistakes and quick fixes
Mistake: Picking the wrong option in What are you counting? , especially using a permutation when order does not matter.
Fix: Read Meaning of the mode . If swapping the same chosen items should not create a new outcome, use a combination mode instead.
Mistake: Entering a larger Items chosen, r (count) than Total distinct items, n (count) in a no-repetition mode.
Fix: Either lower Items chosen, r (count) , raise Total distinct items, n (count) , or switch to a with-repetition mode if repeats are allowed.
Mistake: Typing decimals, negatives, or other non-whole values into Total distinct items, n (count) or Items chosen, r (count) .
Fix: Use whole numbers only. These formulas count actual items, so both inputs must be nonnegative integers.
Mistake: Turning on Show sample arrangements or selections? and expecting the preview to show every result for a large problem.
Fix: Check Listed results shown . The calculator may cap the preview using Maximum listed results (count) while still giving the correct Number of outcomes .
Mistake: Entering the wrong number of names in Item labels (optional, comma-separated) .
Fix: If you provide labels, the number of nonblank labels must match Total distinct items, n (count) exactly.
Mistake: Using repeated names in Item labels (optional, comma-separated) and then thinking two preview results are the same math case.
Fix: Use distinct labels like A,B,C,D so the preview matches the counting model clearly, even though Number of outcomes is based on distinct item types.
Limitations & Key Assumptions / Boundary Conditions
- This calculator is for whole-number counting problems only. Inputs like 4.5 items or negative counts are invalid.
- For modes without repetition, Items chosen, r (count) cannot be greater than Total distinct items, n (count).
- For combination with repetition, Total distinct items, n (count) must be at least 1.
- The preview list is only for small cases. Large totals may show the correct count without generating every arrangement or selection.
- If you enter Item labels (optional, comma-separated), they should be distinct and the number of labels must match n, or the preview can be misleading or blocked by an error.
- Very large results can have many digits. The calculator may switch display format for readability even though the count itself is still based on exact counting rules.
- The tool assumes all available items are distinct types before any labels are applied. If your real-world problem has repeated or identical items, you may need a different counting model.
Methodology
How the calculator decides the formula
The tool first checks two questions: does order matter, and can an item be reused? If order matters, it uses a permutation. If order does not matter, it uses a combination. If reuse is allowed, it uses a with-repetition formula.
Formulas used
Combination without repetition: C(n,r) = n! / (r! * (n-r)!)
Permutation without repetition: P(n,r) = n! / (n-r)!
Combination with repetition: C_rep(n,r) = (n+r-1)! / (r! * (n-1)!)
Permutation with repetition: P_rep(n,r) = n^r
Factorial rule: 0! = 1, and for integer k >= 1, k! = k * (k-1) * ... * 1
What each part means
n is the number of different items available. r is the number of items chosen or the number of positions filled. Factorial, written with an exclamation mark, means multiplying counting numbers down to 1.
Mini example
Suppose you have 5 different books and want to choose 2 of them, with order not mattering. That is a combination without repetition.
C(5,2) = 5! / (2! * 3!) = 10
So the Number of outcomes is 10. If order did matter instead, the calculator would use a permutation:
P(5,2) = 5! / 3! = 20
This is larger because AB and BA count as different outcomes.
How listing works
If listing is turned on, the calculator may generate a small preview of actual selections or arrangements using your labels or default labels 1 through n. The preview does not change the count. It is only a learning and checking aid. If the total is too large, the calculator skips or caps the preview for speed and readability.
Input checks and edge cases
The calculator accepts only nonnegative integers for n and r. For no-repetition modes, it blocks cases where r is greater than n. For combination with repetition, n must be at least 1. For permutation with repetition, r = 0 returns 1 because there is one empty arrangement. If n = 0 and r > 0 in permutation with repetition, the result is 0.
Assumptions behind the result
The formulas assume you are counting discrete choices, not measurements. They also assume the available items are distinct types and that the selected mode matches the real situation. If your problem has identical objects, extra restrictions, or grouped conditions, the true count may be different.