Permutation and Combination Calculator
0 combinations
| Quantity | Formula | Result |
|---|
Permutations vs. Combinations
Both count the number of ways to choose r items from a set of n items — the difference is whether order matters. A permutation treats "A then B" as different from "B then A," so it counts arrangements. A combination treats them as the same outcome, so it only counts which items were picked. Because every group of r items can be arranged in r! different orders, permutations are always larger than (or equal to) combinations for the same n and r: P(n, r) = C(n, r) × r!.
The Formulas Used Here
Without repetition, this calculator uses the standard formulas P(n, r) = n! / (n - r)! and C(n, r) = n! / [r! (n - r)!], where n! (n factorial) is the product of all positive integers up to n, with 0! defined as 1. With repetition allowed, it switches to the formulas for arrangements and selections with replacement: permutations with repetition are nr, and combinations with repetition (multisets) are C(n + r - 1, r). All factorial-based terms are computed with a numerically stable running-product algorithm rather than raw factorials, which avoids overflow for larger n.
Where This Shows Up
Permutations answer questions like "how many ways can 4 runners finish 1st, 2nd, 3rd out of 10?" while combinations answer "how many different 4-runner teams can I pick from 10?" These same counting principles underpin classical probability calculations — for example computing the odds of a specific lottery draw or poker hand relies directly on C(n, r). If you need to double-check any of the individual factorial or exponent terms above by hand, the scientific calculator can compute factorials and powers directly.
Frequently Asked Questions
What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters (choosing a 1st, 2nd, and 3rd place winner), while a combination counts selections where order doesn't matter (choosing a 3-person committee). For the same n and r, permutations are always r! times larger than combinations, since each combination can be arranged in r! different orders.
What happens if r is larger than n?
Without repetition, you cannot choose more items than exist in the set, so both P(n, r) and C(n, r) are undefined (treated as 0) whenever r > n. If repetition is allowed, r can exceed n because items can be reused, so both permutations (n^r) and combinations (C(n+r-1, r)) remain valid.