Combinations and Permutations Calculator

Combinations C(n, r) = n! / (r!(n-r)!) count the number of ways to choose r items from n items when order does not matter. Permutations P(n, r) = n! / (n-r)! count the arrangements when order does matter. For example, choosing 3 people from a group of 10 gives C(10, 3) = 120 combinations, while arranging 3 people in 10 seats gives P(10, 3) = 720 permutations. The key difference is that permutations are always larger by a factor of r!, because each combination can be arranged r! ways. Enter n and r below to compute both values instantly.

Quick Answer

C(10, 3) = 120 combinations and P(10, 3) = 720 permutations. The permutation count is 6 times larger because 3! = 6.

Enter n (total items) and r (items chosen). Both must be non-negative integers with r ≤ n.

Common Examples

Input Result
n=10, r=3 C(10,3) = 120, P(10,3) = 720
n=52, r=5 C(52,5) = 2,598,960, P(52,5) = 311,875,200
n=20, r=4 C(20,4) = 4,845, P(20,4) = 116,280
n=6, r=6 C(6,6) = 1, P(6,6) = 720
n=100, r=2 C(100,2) = 4,950, P(100,2) = 9,900

How It Works

Factorial

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n:

n! = n * (n-1) * (n-2) * … * 2 * 1

By definition, 0! = 1. Factorials grow extremely fast: 10! = 3,628,800 and 20! = 2,432,902,008,176,640,000.

Combinations (n Choose r)

A combination is a selection of r items from n items where order does not matter. The number of combinations is:

C(n, r) = n! / (r! * (n - r)!)

This is also written as “n choose r” or the binomial coefficient. For example, the number of 5-card poker hands from a 52-card deck is C(52, 5) = 2,598,960.

Combinations have the symmetry property: C(n, r) = C(n, n-r). Choosing which items to include is equivalent to choosing which items to exclude.

Permutations

A permutation is an arrangement of r items from n items where order matters. The number of permutations is:

P(n, r) = n! / (n - r)!

For example, the number of ways to award gold, silver, and bronze medals to 3 out of 10 athletes is P(10, 3) = 720.

Relationship Between Combinations and Permutations

P(n, r) = C(n, r) * r!

Each combination of r items can be rearranged in r! ways to produce distinct permutations. So permutations always equal combinations multiplied by r!.

Worked Example

Find C(10, 3) and P(10, 3).

C(10, 3) = 10! / (3! * 7!) = (10 * 9 * 8) / (3 * 2 * 1) = 720 / 6 = 120.

P(10, 3) = 10! / 7! = 10 * 9 * 8 = 720.

Verification: P(10, 3) / C(10, 3) = 720 / 120 = 6 = 3!. This confirms the relationship P = C * r!.

A practical example: choosing 3 committee members from 10 people gives 120 combinations (order does not matter). Assigning president, vice president, and secretary from 10 people gives 720 permutations (order matters).

Related Calculators

Frequently Asked Questions

What is the difference between combinations and permutations?
Combinations count selections where order does not matter (choosing a committee). Permutations count arrangements where order matters (assigning ranked positions). For the same n and r, permutations are always greater than or equal to combinations, because each combination generates r! permutations.
When do I use combinations versus permutations?
Use combinations when you are selecting a group and the arrangement within the group does not matter (lottery numbers, committee members, card hands). Use permutations when the order of selection matters (race placements, password sequences, seating arrangements).
Why does 0! equal 1?
By convention, 0! = 1 because there is exactly one way to arrange zero items (do nothing). This definition also ensures that formulas like C(n, 0) = 1 and C(n, n) = 1 work correctly.
How large can n be in this calculator?
This calculator supports n up to 1,000 using BigInt arithmetic for exact results. Factorials and combinations of large numbers can have hundreds or thousands of digits. Very large results are displayed in a truncated format showing the first and last digits along with the total digit count.
What is the binomial coefficient?
The binomial coefficient 'n choose r' is another name for C(n, r). It appears in the binomial theorem, which expands (a + b)^n into a sum of terms involving binomial coefficients. The coefficients also form Pascal's triangle, where each entry equals the sum of the two entries above it.