🧮 MathCalc Home / Calculators / Permutation & Combination Calculator

Permutation & Combination Calculator

Calculate the number of ways to arrange or choose items.

About Permutations and Combinations

Permutations (nPr) count the number of ways to arrange r items from n distinct items where order matters. Combinations (nCr) count subsets where order does not matter. For example, picking a president, VP, and treasurer from a group is a permutation; picking a committee of 3 is a combination.

Formulas

P(n,r) = n! / (n−r)!. C(n,r) = n! / (r! × (n−r)!). For n=8, r=3: P = 8×7×6 = 336, C = 336 / 3! = 56.

When do I use permutations vs combinations?

Use permutations when the order or arrangement matters (e.g., race positions, passwords, seating arrangements). Use combinations when the selection is unordered (e.g., lottery numbers, committee members, hand of cards). A helpful test: if swapping two chosen items gives a different result, use permutations.

What happens if r > n?

If r exceeds n, both P(n,r) and C(n,r) are zero because you cannot choose or arrange more items than are available. The calculator enforces r ≤ n for valid results.