Permutation and Combination Calculator

Permutations (Order Matters)

720

The Numbers

  • Combinations (order doesn't matter): 120

Compare Calculations

Downloads

Includes your inputs and results for this calculation, plus any additional calculations you've compared.

How This Calculator Works

A permutation (nPr) counts how many ways to arrange r items out of n where order matters, while a combination (nCr) counts how many ways to choose r items out of n where order doesn’t matter. Enter a total number of items (n) and how many you’re choosing (r), and this calculator finds both related answers at once.

The Formulas

  • Permutations: P(n,r)=n!(nr)!P(\vA{n}, \vB{r}) = \frac{\vA{n}!}{(\vA{n} - \vB{r})!} — equivalently, the product of r\vB{r} descending numbers starting at n\vA{n}: n×(n1)××(nr+1)\vA{n} \times (\vA{n}-1) \times \cdots \times (\vA{n}-\vB{r}+1).
  • Combinations: C(n,r)=P(n,r)r!C(\vA{n}, \vB{r}) = \frac{P(\vA{n}, \vB{r})}{\vB{r}!} — the same permutations count, divided by the r!\vB{r}! ways those same r\vB{r} items could themselves be reordered (since order doesn’t matter for a combination).

Worked Example

Choosing 3 items from a group of 10, where order matters (permutations):

P(10,3)=10×9×8=720P(10,3) = 10 \times 9 \times 8 = 720

The same choice where order does NOT matter (combinations):

C(10,3)=720÷3!=720÷6=120C(10,3) = 720 \div 3! = 720 \div 6 = 120

A Real-World Check

The odds of matching all 6 numbers in a 6-from-49 lottery draw are 1 in C(49,6) — exactly 13,983,816 — since the order the numbers are drawn in doesn’t change whether you’ve won.

Source: Wikipedia: Combination (and Permutation).

Frequently Asked Questions

What's the difference between a permutation and a combination?

A permutation counts arrangements where ORDER matters — 1st, 2nd, and 3rd place in a race are different outcomes even with the same three runners. A combination counts selections where order does NOT matter — a 3-person committee is the same group regardless of who was picked first.

Which one should I use for my problem?

Ask whether swapping the order of your selected items would count as a different outcome. If yes (arranging books on a shelf, assigning 1st/2nd/3rd place), use permutations. If no (picking a team, choosing lottery numbers, selecting a committee), use combinations.

Why is there a limit on how large n can be?

Permutations and combinations grow extremely fast — n! for even moderately large n produces numbers far beyond what can be represented exactly in JavaScript's number type. This calculator caps n at 1000 to keep results meaningful rather than silently returning an imprecise or infinite value.