Permutation & Combination Calculator

Enter the total number of items n and the number you're choosing r to compute permutations (nPr, where order matters) and combinations (nCr, where order doesn't), with the formulas spelled out.

Enter n and r, then press Calculate.

Permutations vs combinations

Both count how many ways you can pick r items from n, but they differ on order. A permutation counts ordered arrangements (ABC ≠ CBA); a combination counts unordered selections (ABC = CBA).

nPr = n! ÷ (n − r)! · nCr = n! ÷ ( r! · (n − r)! )

Here n! (n factorial) is the product 1 × 2 × … × n. Because every combination corresponds to r! orderings, the two are linked by nCr = nPr ÷ r! — there are always at least as many permutations as combinations.

Worked example

From 10 items, choose 3:

nPr: 10! ÷ 7! = 10 × 9 × 8 = 720 ordered arrangements.
nCr: 720 ÷ 3! = 720 ÷ 6 = 120 unordered selections.
Result: 720 permutations, 120 combinations.

When to use each

Use permutations when the sequence matters — race finishing positions, PIN codes, seating a row of people. Use combinations when only the group matters — lottery numbers, a hand of cards, choosing a committee. The calculator keeps results exact for everyday n and switches to high-precision handling for large factorials so the answer stays accurate. Note nPr and nCr require r ≤ n; if r exceeds n the answer is 0.

Tip: need raw probability or odds afterwards? Combine these counts with the percentage calculator, or check primality with the prime number checker.

Frequently asked questions

What's the difference between nPr and nCr?

nPr (permutations) counts ordered arrangements, so ABC and CBA are different. nCr (combinations) counts unordered selections, so ABC and CBA are the same group. There are always at least as many permutations as combinations.

What does the factorial n! mean?

n! is the product of all whole numbers from 1 to n, so 5! = 1 × 2 × 3 × 4 × 5 = 120. By convention 0! = 1, which makes the permutation and combination formulas work at the edges.

When should I use a combination?

Use a combination when order doesn't matter — picking lottery numbers, a poker hand, or members of a committee. Use a permutation when order does matter, like race positions or passwords.

What if r is bigger than n?

You can't choose more items than you have, so both nPr and nCr are 0 when r > n. The calculator returns 0 in that case rather than an error.

MB
Mustafa Bilgic · Editor, Calcool
Uses the standard factorial formulas for permutations (nPr) and combinations (nCr) from combinatorics. Everything runs in your browser — nothing you enter is uploaded, logged or stored.

Related calculators