Skip to content
NumberCalculator365

Permutation and Combination Calculator

Count how many ways you can choose r items from n. Pick whether order matters (permutation) or not (combination) and whether items can repeat, and the calculator returns the exact answer — even when it has hundreds of digits — along with the formula used.

Permutation and Combination Calculator tool

About the Permutation and Combination Calculator

Permutations answer questions like how many ways three runners can finish first, second and third out of ten. Combinations answer how many different 3-person committees can be formed from the same ten people. The calculator shows both side by side so you can see how much ordering changes the count.

Repetition covers PIN codes, license plates and ice-cream scoops where the same choice can be used more than once. All arithmetic is done with exact whole numbers, not floating point, so lottery odds and card-hand counts are never rounded.

How the Permutation and Combination Calculator works

n! (n factorial) is the product 1 × 2 × … × n, with 0! = 1. Permutations divide out the arrangements of the items you did not pick; combinations also divide out the r! orderings of the items you did pick.

With repetition, each of the r positions has n options, so order-matters counts are nʳ. Order-ignored counts with repetition use the stars-and-bars formula.

Permutation
nPr = n! / (n − r)!
Combination
nCr = n! / (r! × (n − r)!)
Permutation with repetition
nʳ
Combination with repetition
C(n + r − 1, r) = (n + r − 1)! / (r! × (n − 1)!)

Example

From 10 people, 10P3 = 10 × 9 × 8 = 720 ordered podiums, but 10C3 = 720 / 3! = 120 unordered teams.

How to Use the Permutation and Combination Calculator

  1. Enter the total number of items, n.
  2. Enter how many you are choosing, r.
  3. Choose whether order matters: yes for rankings, codes and seating; no for teams, hands and samples.
  4. Choose whether an item can be used more than once.
  5. Read the exact count, the formula and the count for the opposite ordering choice.

Permutation and Combination Calculator Examples

Race podium

8 runners, gold-silver-bronze: 8P3 = 8 × 7 × 6 = 336 possible podiums.

Poker hand

5 cards from a 52-card deck, order ignored: 52C5 = 2,598,960 possible hands.

4-digit PIN

Digits 0–9, repetition allowed, order matters: 10⁴ = 10,000 possible PINs.

Ice-cream cup

3 scoops from 5 flavors, repeats allowed, order ignored: C(7, 3) = 35 different cups.

Permutation vs Combination

The difference is entirely about order. Permutations count arrangements; combinations count selections. Choosing a 4-digit code is a permutation problem (1234 ≠ 4321). Choosing 4 toppings for a pizza is a combination problem (the same pizza in any order).

Which formula fits the problem
SituationOrder matters?Repeats?Formula
Gold, silver, bronze from 10 runnersYesNo10P3 = 720
3-person committee from 10NoNo10C3 = 120
3-digit lock code, digits 0–9YesYes10³ = 1,000
3 donuts from 6 kindsNoYesC(8, 3) = 56
Seating 5 guests in 5 chairsYesNo5P5 = 5! = 120

How to Calculate nCr by Hand

Avoid computing full factorials. For 10C3, write the top three factors of 10! — 10 × 9 × 8 = 720 — and divide by 3! = 6 to get 120. The (n − r)! part cancels out.

Use symmetry for large r: nCr = nC(n − r). 100C98 equals 100C2 = 100 × 99 / 2 = 4,950, which is much faster than working with 98 factors.

Counting and Probability

Probability problems usually divide one count by another. The chance of a specific poker hand is 1 / 52C5. The chance that a random 3-person committee from 10 includes a particular person is 9C2 / 10C3 = 36 / 120 = 30%.

For simulations instead of exact counts, the random number generator can draw samples with or without repeats, and the factor calculator breaks large results into prime factors.

Frequently Asked Questions

How do I know if order matters?

Ask whether swapping two chosen items gives a different outcome. A president–treasurer pair changes if you swap them, so order matters. A two-person committee does not change, so it is a combination.

Why is nPr always at least nCr?

Each combination of r items can be arranged in r! different orders, so nPr = nCr × r!. They are equal only when r is 0 or 1.

What is 0! and why is nC0 = 1?

0! is defined as 1. There is exactly one way to choose nothing, so nC0 = 1 and nP0 = 1.

Can r be bigger than n?

Only when repetition is allowed. Without repetition you cannot pick more distinct items than exist, so the calculator rejects r > n.

How do I calculate lottery odds?

For a 6-of-49 lottery, order is ignored and numbers do not repeat, so there are 49C6 = 13,983,816 tickets. The odds of one ticket winning are 1 in that number.

How big can n be?

Up to 1,000. The exact result can still run to thousands of digits, so very large answers are summarized in scientific notation with the full value shown below.