3tej home
← Math

What is Combinations + Permutations Calculator?

A Combinations + Permutations Calculator computes combinations + permutations from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Free Combinations + Permutations Calculator.

Combinations + Permutations Calculator

nPr = n! / (n-r)! · nCr = n! / (r!·(n-r)!)

Inputs

Combinations (nCr)

-

Breakdown

Permutations (nPr)
0
Ratio nPr/nCr
0
With repetition
0
Note
0

About the combinations and permutations calculator

Combinations and permutations both count how many ways you can choose items from a set, but they answer two different questions. Permutations count ordered arrangements, where the sequence matters, like the possible first, second, and third place finishers in a race. Combinations count unordered selections, where only the group matters, like the five cards dealt from a deck. This calculator returns both at once from your n and r, plus the ratio between them and the with-repetition count, so you can pick the right model for your problem.

The distinction comes down to whether rearranging the same items counts as a new outcome. Choosing players A, B, and C for a committee is one combination no matter what order you name them, but as a ranked podium A-B-C and C-B-A are two distinct permutations. Because every combination of r items can be ordered in r factorial ways, permutations are always larger than or equal to combinations for the same n and r. A third case, sampling with repetition, applies when an item can be picked more than once, such as a four-digit PIN where each digit can repeat; that count is simply n to the power r.

How it works: the formulas

The two core formulas use the factorial function, and they differ only by whether you divide out the orderings of the chosen items:

Permutations  P(n, r) = n! / (n - r)!
Combinations  C(n, r) = n! / (r! (n - r)!)
With repetition (ordered) = n^r
Relationship  P(n, r) = C(n, r) x r!
  • n is the total number of items available to choose from.
  • r is how many you pick or arrange.
  • P(n, r) counts ordered selections; C(n, r) counts unordered ones.
  • Dividing P by C gives exactly r factorial, the number of orderings of the chosen group.

Worked example

Choosing r = 3 from n = 5 (for example, picking 3 people from a group of 5):

  1. 5 factorial: 5! = 120.
  2. Permutations: P(5, 3) = 120 / (5 - 3)! = 120 / 2 = 60 ordered arrangements.
  3. Combinations: C(5, 3) = 120 / (3! x 2!) = 120 / (6 x 2) = 10 unordered groups.
  4. Ratio: 60 / 10 = 6, which equals 3! (the orderings of each group).
  5. With repetition: 5^3 = 125 ordered outcomes if items can repeat.
Result: there are 10 ways to choose the group and 60 ways to arrange it in order. The factor of 6 between them is 3 factorial, the number of ways to reorder any chosen trio.

Reference: combinations and permutations for small n, r

nrC(n, r)P(n, r)n^r
52102025
531060125
62153036
1031207201,000
5252,598,960311,875,200380,204,032

Common pitfalls

  • Using combinations when order matters. A ranked podium or a sequence of moves is a permutation; using C(n, r) undercounts by a factor of r factorial.
  • Using permutations for unordered groups. A committee or a poker hand is a combination; using P(n, r) overcounts the same group many times.
  • Forgetting repetition. If an item can be chosen more than once, like digits in a PIN, neither standard formula applies; use n to the power r.
  • Setting r greater than n. You cannot choose more distinct items than exist, so C(n, r) and P(n, r) are zero when r exceeds n (without repetition).
  • Factorial overflow. Factorials grow explosively; n! reaches the billions by n = 13, so large inputs can exceed what a simple calculator represents precisely.

Frequently asked questions

What is the difference between a combination and a permutation?

A permutation counts ordered arrangements, where sequence matters, like ranking the top three finishers. A combination counts unordered selections, where only the group matters, like choosing three committee members. Because each group of r items can be ordered r factorial ways, P(n, r) always equals C(n, r) times r factorial, so permutations are larger.

What are the formulas for nCr and nPr?

Permutations are P(n, r) = n! / (n - r)!, and combinations are C(n, r) = n! / (r! (n - r)!). The only difference is the extra r factorial in the denominator of the combination formula, which removes the duplicate orderings of the chosen items. Both use the factorial function, where n! is the product of all integers from 1 to n.

How do I count selections with repetition?

When an item can be chosen more than once and order matters, like a four-digit PIN where digits can repeat, the count is n to the power r. For a PIN that is 10^4 = 10,000 possibilities. This is different from both standard formulas, which assume each item is picked at most once.

How many 5-card poker hands are there?

Order does not matter in a hand, so it is a combination: C(52, 5) = 52! / (5! x 47!) = 2,598,960 possible hands. If order did matter you would use P(52, 5) = 311,875,200, exactly 5 factorial (120) times larger, since each hand can be dealt in 120 different orders.

Why is nPr always greater than nCr?

Because permutations count every ordering of a chosen group as distinct, while combinations count the group once. Each combination of r items can be arranged in r factorial ways, so P(n, r) = C(n, r) times r factorial. They are equal only when r is 0 or 1, where there is just one ordering.