Permutation and Combination Calculator

Count the ways to choose or arrange items. Enter the total number of items (n) and how many you're choosing (r) to get the permutations, combinations, and factorials.

Combinations (nCr) 0
Permutations (nPr) 0
n! 0
r! 0

Permutations vs. combinations

Both count ways to pick r items from a set of n — the difference is whether order matters. Permutations count ordered arrangements; combinations count unordered selections.

nPr = n! ÷ (n − r)!

nCr = n! ÷ (r! × (n − r)!)

With n = 5 and r = 2: nPr = 120 ÷ 6 = 20 ordered arrangements, and nCr = 120 ÷ (2 × 6) = 10 unordered selections. There are exactly half as many combinations because each pair can be ordered two ways.

When to use which

Factorials

A factorial n! multiplies every whole number from 1 to n, and 0! = 1 by definition. Factorials grow extremely fast, so very large n produces huge results shown in scientific notation.

Frequently asked questions

What is the difference between a permutation and a combination?

Order matters in a permutation but not in a combination. Choosing a president and vice-president from a group is a permutation, because the two roles are different. Choosing a two-person committee is a combination, because the pair is the same regardless of order.

How do you calculate permutations (nPr)?

The number of permutations of r items from n is nPr = n! ÷ (n − r)!. For 5 items taken 2 at a time, that is 5! ÷ 3! = 120 ÷ 6 = 20 ordered arrangements.

How do you calculate combinations (nCr)?

Combinations divide out the duplicate orderings: nCr = n! ÷ (r! × (n − r)!). For 5 items taken 2 at a time, that is 120 ÷ (2 × 6) = 10 unordered selections — half the 20 permutations, since each pair can be arranged two ways.

What is a factorial?

A factorial, written n!, is the product of all whole numbers from 1 up to n. So 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition 0! = 1. Factorials count the number of ways to arrange n distinct items in order.

Why is nCr always less than or equal to nPr?

Every combination corresponds to r! different permutations — the ways its chosen items can be ordered. Because combinations ignore order, you divide nPr by r!, so nCr is never larger than nPr and equals it only when r is 0 or 1.

Disclaimer: Very large values are shown in scientific notation and may lose precision beyond about 15 significant digits. Provided for educational purposes.