Combinations and Permutations Calculator

STATISTICS & PROBABILITY
Combinations (nCr)
Combinations nCr
Permutations nPr
n!
r!
(n – r)!

Combinations versus permutations

Both count how many ways you can choose r items from n, but they answer different questions. Permutations count arrangements where order matters; combinations count selections where it does not. Picking a 3-digit code is a permutation; picking 3 pizza toppings is a combination.

The formulas

Permutations: nPr = n! divided by (n – r)!. Combinations: nCr = n! divided by r! times (n – r)!. Because combinations ignore the r! ways each selection can be ordered, nCr is always nPr divided by r! — never larger than the permutation count.

Why order changes the count

Choosing A then B differs from B then A as a permutation but is the same combination. That single distinction is why a lock should really be called a permutation lock, and why lottery odds use combinations.

Related tools

To turn these counts into chances, use the probability calculator; for averages of a data set, the mean median mode calculator.

Worked example

From 10 items choosing 3: there are 720 permutations (10 times 9 times 8) but only 120 combinations, since each group of 3 can be ordered in 3! = 6 ways and 720 divided by 6 is 120.

FAQ

What if r is greater than n?

Then there are zero ways — you cannot choose more distinct items than exist — and the calculator returns 0.

Why do huge n and r show scientific notation?

Factorials grow astronomically; beyond about 15 digits the result is shown in exponential form to stay readable.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.