probability calculators

Combinations and Permutations Calculator

Calculate combinations (nCr) and permutations (nPr), with or without replacement, for counting and probability problems. Use it for lottery odds, team selection, and combinatorics assignments.

About this calculator

Permutations count the number of ordered arrangements of r items chosen from n total items. Without replacement: nPr = n! / (n−r)!. Combinations count unordered selections: without replacement, nCr = n! / (r! × (n−r)!). Order matters for permutations but not for combinations — choosing {A, B} is the same as {B, A} in a combination but different in a permutation. With replacement, the formulas change: permutations become nʳ (since each position can be any of n items), and combinations become (n+r−1)! / (r! × (n−1)!), known as the multiset coefficient. Factorials grow extremely fast, so calculators are essential for large n and r values. These formulas underpin probability theory, cryptography, and experimental design.

How to use

How many ways can you choose 3 students from a class of 10 to form a committee (order doesn't matter, no replacement)? Set n = 10, r = 3, Calculation Type = combination, With Replacement = false. The calculator computes: nCr = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. There are 120 distinct committees. If order mattered (e.g., president, VP, secretary), switch to permutation: nPr = 10! / 7! = 720 arrangements.

Frequently asked questions

What is the difference between combinations and permutations in probability?

Permutations count ordered arrangements — the sequence matters, so choosing A then B is different from B then A. Combinations count unordered selections — only which items are chosen matters, not the order. For example, the number of ways to arrange 3 books on a shelf uses permutations, while the number of ways to pick 3 books from a shelf to read uses combinations. The combination count is always less than or equal to the permutation count because multiple orderings collapse into one combination.

When should I use combinations with replacement versus without replacement?

Use without replacement when each item can only be selected once, such as drawing cards from a deck or choosing team members from a group. Use with replacement when an item can be chosen more than once, such as rolling a die multiple times or creating a PIN where digits repeat. In most real-world selection problems, replacement is not allowed, but in sampling theory and some probability models, with-replacement calculations are essential for independence between draws.

How do I calculate combinations and permutations for very large numbers?

Factorials grow astronomically fast — 20! already exceeds 2.4 × 10¹⁸ — making direct multiplication impractical by hand. Calculators and software handle this by simplifying before multiplying, canceling terms in the numerator and denominator. For example, nCr = n! / (r!(n−r)!) can be computed as (n × (n−1) × … × (n−r+1)) / r! without computing full factorials. For very large n, logarithms of factorials (Stirling's approximation) are used in advanced statistical software.