Skip to content

Permutation and Combination Calculator

Enter the total number of items n and the number you choose r, and get the number of permutations (nPr, order matters) and combinations (nCr, order ignored) side by side. Each result shows its formula and the working, and a short guide explains which one your problem needs. Free, no sign-up.

nPr and nCr

Permutations — order matters (10P3)

720

10P3 = 10! ÷ (10 − 3)! = 10! ÷ 7!

10! ÷ 7! cancels down to the product of the top 3 factors:

10 × 9 × 8 = 720

Combinations — order ignored (10C3)

120

10C3 = 10! ÷ (3! × (10 − 3)!) = 10! ÷ (3! × 7!)

10C3 = 10P3 ÷ 3! — divide out the 6 orderings of each selection:

720 ÷ 6 = 120

When does order matter?

Order matters → permutation (nPr). A lock code is the classic example: on a 3-digit lock using the digits 1, 2, and 3, the codes 1-2-3 and 3-2-1 are different — the same three digits in a different order will not open the lock. Race podiums (1st, 2nd, 3rd), passwords, and seating arrangements all work the same way.

Order does not matter → combination (nCr). Pizza toppings are the classic example: a pizza with mushrooms, olives, and peppers is exactly the same pizza as one with peppers, olives, and mushrooms. Committees, lottery number picks, and hands of cards are combinations too.

That is why nCr is never larger than nPr: every unordered selection of r items corresponds to r! different ordered arrangements, so nCr = nPr ÷ r!.

How to Use the Permutation and Combination Calculator

  1. 1. Enter n. This is the total number of distinct items to choose from. The calculator accepts whole numbers from 0 to 170 and starts at 10.
  2. 2. Enter r. This is how many items you pick, from 0 up to n. It starts at 3.
  3. 3. Read both results. nPr counts ordered arrangements and nCr counts unordered selections. Each card shows its formula, the shortened product the factorials cancel to, and the answer.
  4. 4. Pick the right one. The panel below the result explains when order matters, with examples.

The Formulas

  • Permutations: nPr = n! ÷ (n − r)!. In practice this is the product n × (n − 1) × … × (n − r + 1), r factors in all.
  • Combinations: nCr = n! ÷ (r! × (n − r)!) = nPr ÷ r!. Each unordered selection of r items can be arranged in r! ways, so dividing nPr by r! removes the repeats.
  • Both assume no repetition: each item can be used once. Choosing with repetition uses nʳ for ordered picks and (n + r − 1)! ÷ (r! × (n − 1)!) for unordered ones, which this calculator does not compute.

Choose 3 from 10 (the starting values)

10P3 = 10 × 9 × 8 = 720 ordered arrangements

10C3 = 720 ÷ 3! = 720 ÷ 6 = 120 unordered selections

Order Matters or Not? Four Worked Cases

SituationTypeCount
Gold, silver and bronze among 8 runnersPermutation, 8P3336
A committee of 3 chosen from 10 peopleCombination, 10C3120
Five-card poker hands from 52 cardsCombination, 52C52,598,960
Five different officer roles filled from 52 membersPermutation, 52P5311,875,200
Six numbers drawn from 49 in a lottery (order ignored)Combination, 49C613,983,816

Every unordered group of 5 can be ordered in 5! = 120 ways, which is why 52P5 ÷ 52C5 = 120. A lock "combination" is really a permutation, because 1-2-3 and 3-2-1 open different locks.

Limits to Know

  • n is capped at 170. 170! is about 7 × 10³⁰⁶, the largest factorial an ordinary floating-point number holds. Beyond it the arithmetic overflows.
  • Large answers are approximate. Results below 10¹⁵ are shown as whole numbers. Above that they appear in scientific notation, and digits past about fifteen are not exact, so use a big-integer tool if you need every digit.
  • Identical items are different. The arrangements of the letters in MISSISSIPPI are not 11P11, because repeated letters are indistinguishable. Divide by the factorial of each repeat count instead.
  • r larger than n is not allowed. You cannot choose more distinct items than you have without repetition.

Which Tool Do You Need?

You wantUse
The number of ordered or unordered selectionsThis Permutation and Combination Calculator
The probability of a favorable outcomeProbability Calculator
n! on its ownFactorial Calculator
The chance of k successes in n trialsBinomial Distribution Calculator
The chance of drawing a given mix without replacementHypergeometric Distribution Calculator

Frequently Asked Questions

What is the difference between a permutation and a combination?
A permutation counts ordered arrangements, such as who finishes first, second and third. A combination counts unordered selections, such as which three people sit on a committee. For the same n and r, nPr is never smaller than nCr.
What is the formula for nPr?
nPr = n! ÷ (n − r)!, which equals the product n × (n − 1) × … × (n − r + 1). For 10P3 that is 10 × 9 × 8 = 720.
What is the formula for nCr?
nCr = n! ÷ (r! × (n − r)!), equal to nPr ÷ r!. For 10C3 that is 720 ÷ 6 = 120.
How do I calculate the odds of winning a lottery?
If you pick k numbers from n and order does not matter, the number of possible tickets is nCk. A 6-from-49 draw has 49C6 = 13,983,816, so one ticket wins the jackpot with probability 1 ÷ 13,983,816.
Why is the input limited to n ≤ 170?
170! is the largest factorial that fits in ordinary floating-point numbers; 171! overflows to infinity. Within the limit, very large results are shown in scientific notation and are approximate beyond about fifteen digits.
Is a lock combination really a combination?
No. Mathematically it is a permutation, because 1-2-3 and 3-2-1 are different codes. Order matters, so "permutation lock" would be the accurate name.

Related Tools

More in Statistics Calculators

See all Statistics Calculators