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

Permutation and combination calculator

Enter n and r to get nPr, nCr, the factorials involved and the substituted formula — with out-of-range values refused rather than guessed.

Short answer: 5P2 = 20 and 5C2 = 10 — twice as many permutations because each chosen pair can be arranged in two orders.

Order matters, or it does not

A race's gold-and-silver pair is a permutation; a hand of cards is a combination. Deciding which you have is the whole problem, and once decided the formula is mechanical — which is what this page computes, including the factorials so the arithmetic is visible.

Worked example

A 4-digit PIN with no repeats: 10P4 = 5,040. With repeats allowed it would be 10⁴ = 10,000, and the ratio between the two is exactly why "no repeated digits" is a real constraint.

Permutation and combination questions

What is the difference between nPr and nCr?

Permutations count arrangements where order matters, combinations count selections where it does not. Choosing 2 from 5 has 20 permutations and 10 combinations, because each pair can be arranged two ways.

What are the formulas?

nPr = n! ÷ (n − r)! and nCr = n! ÷ (r!(n − r)!). The page prints both with your numbers substituted, so the arithmetic can be followed rather than taken on trust.

Which one does a lottery use?

Combinations, because the order the balls come out does not matter. Choosing 6 from 49 is 49C6 = 13,983,816 — the figure quoted for the odds of a jackpot.

Why is r > n refused?

Because you cannot select more items than exist. The factorial expression would divide by the factorial of a negative number, so the page states the reason instead of returning a number.

Related tools