Permutation and Combination Calculator

Count the ways to choose r items from n — combinations (nCr), permutations (nPr), with or without repetition.

Combinations nCr (order doesn’t matter)
120
Order matters: 720 vs 120 ways (×3!)
nCrnCr — Ways: 120120nPrnPr — Ways: 720720nCr (rep.)nCr (rep.) — Ways: 220220nʳnʳ — Ways: 1,0001,000
Permutations nPr (order matters)
720
Combinations with repetition
220
Permutations with repetition (nʳ)
1,000
Show the working
  1. nPr = n! ÷ (n − r)! = 10! ÷ 7! = 10 × 9 × 8 = 720
  2. nCr = nPr ÷ r! = 720 ÷ 3! = 120
  3. With repetition: nʳ = 10^3 = 1000 ordered, C(n + r − 1, r) = 220 unordered

Runs entirely in your browser. Nothing you enter is uploaded.

Formula

nPr = n! ÷ (n − r)!nCr = n! ÷ (r! (n − r)!)With repetition: nʳ (ordered), (n + r − 1)! ÷ (r! (n − 1)!) (unordered)

How it works

Permutations and combinations both count ways of picking r items from a set of n. The difference is whether order matters. A podium finish (gold, silver, bronze) is a permutation — Alice-Bob-Carol is a different result from Carol-Bob-Alice. A three-person committee is a combination — the same three people form the same committee no matter the order they were picked.

Because every group of r items can be arranged in r! orders, there are always r! times as many permutations as combinations: nCr = nPr ÷ r!. Choosing 3 from 10 gives 720 permutations but only 120 combinations.

With repetition allowed — like digits in a PIN, where the same digit can appear more than once — ordered selections number nʳ. A 4-digit PIN has 10⁴ = 10,000 possibilities. Unordered selections with repetition (such as choosing 3 scoops from 10 ice-cream flavours, doubles allowed) use the “stars and bars” formula C(n + r − 1, r).

Frequently asked questions

Is a combination lock really a combination?

Mathematically, no — the order of the numbers matters and repeats are allowed, so it is a permutation with repetition. “Permutation lock” would be more accurate.

What are the odds of winning a 6/49 lottery?

There are 49C6 = 13,983,816 possible tickets, so a single ticket has about a 1 in 14 million chance of matching all six numbers.

What is 0! ?

0! is defined as 1. This makes formulas work at the edges: there is exactly one way to choose nothing, so nC0 = 1.

esc