Combination & Permutation Calculator

Calculate combinations (nCr) and permutations (nPr) with step-by-step formula.

nCr (Combinations)
0
nPr (Permutations)0
nCr Formula
nPr Formula
Ratio nPr / nCr-

About Combination & Permutation Calculator

This calculator computes both combinations (nCr) and permutations (nPr) for a given total number of items (n) and the number of items to choose (r). Combinations count selections where order does not matter, while permutations count arrangements where order matters. The tool displays the step-by-step formula using factorials, showing exactly how each result is derived. You will also see the ratio of permutations to combinations, which equals r! — illustrating why there are always more permutations than combinations for the same n and r. Use this calculator in probability and statistics coursework, for analyzing lottery odds, for scheduling problems, or for any scenario involving counting and arrangement. The factorial-based approach works for whole numbers up to approximately 170 before JavaScript precision limits become noticeable. Whether you are a student mastering combinatorics or a data scientist evaluating possible outcomes, this calculator makes nCr and nPr computations clear and accessible.

How to Use This Calculator

Suppose you're forming a 3-person committee from a group of 10 people. Since the order of committee members doesn't matter (Alice, Bob, Carol is the same as Bob, Carol, Alice), you need combinations. Enter n = 10 and r = 3, then Calculate. The result shows nCr = 120 — there are 120 possible 3-person committees. The permutations result shows nPr = 720, which is 6 times larger because 3! = 6. That's the ratio displayed: 720/120 = 6. Now say you're arranging 3 books from a shelf of 10 on a display — order matters here. The same n = 10, r = 3 gives nPr = 720 possible arrangements. The step-by-step formulas show 10!/(3!×7!) = 120 for combinations and 10!/7! = 720 for permutations.

When to Use This Calculator

Lottery & Gambling: In a typical 6/49 lottery where you pick 6 numbers from 49, the number of possible combinations is C(49,6) = 13,983,816. Your chance of winning with one ticket is 1 in nearly 14 million. This calculator shows you the exact number so you can understand the true odds.

Tournament Scheduling: If 8 teams compete in a round-robin where each team plays every other once, that's C(8,2) = 28 games. If order matters (team A vs team B is different from B vs A for home/away purposes), that's P(8,2) = 56 possible matchups.

Password & Security Analysis: If a 4-digit PIN uses digits 0-9 with no repeats, the number of possible PINS is P(10,4) = 5,040. If repeats are allowed, it's 10⁴ = 10,000. The ratio shows how much security you gain by disallowing repeated digits (about half as many possibilities).

Frequently Asked Questions

What's the difference between combinations and permutations?

Combinations (nCr) count selections where order doesn't matter — like picking 3 pizza toppings from 10 options. Permutations (nPr) count arrangements where order matters — like arranging 3 trophies on a shelf from 10 choices. For n=10, r=3, nCr = 120 but nPr = 720. The ratio is always r! (6 in this case).

What does the factorial (!) symbol mean in nCr?

Factorial (n!) means multiplying a number by every positive integer below it. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. In combinations, factorials count the total arrangements and then divide out overcounting. By convention, 0! = 1. Factorials grow extremely fast — 10! = 3,628,800 and 20! ≈ 2.43 × 10¹⁸.

When do I use nCr vs nPr?

Use nCr (combinations) when order does not matter: selecting lottery numbers, forming a team, choosing toppings. Use nPr (permutations) when order matters: ranking contestants, creating passwords, arranging books on a shelf. If the problem asks for "arrangements" or "sequences", use nPr. If it asks for "groups" or "selections", use nCr.

How do I calculate combinations with repetition?

Combinations with repetition (stars and bars) use the formula C(n+r-1, r). For example, choosing 3 scoops of ice cream from 5 flavors where flavors can repeat gives C(5+3-1, 3) = C(7,3) = 35 possible combinations. This differs from standard combinations where each item can only be selected once.

What is the formula for combinations?

The combination formula is nCr = n! / (r! × (n-r)!), where n is the total number of items, r is the number selected, and ! denotes factorial. For n=5 and r=3, nCr = 5! / (3! × 2!) = 120 / (6 × 2) = 10. The permutation formula nPr = n! / (n-r)! is related by nPr = nCr × r!.