Skip to content

Permutation and Combination Calculator

Calculate permutations (nPr) and combinations (nCr) with step-by-step factorial breakdown. Supports large numbers up to n=170.

Perm/Comb Worksheet

Something wrong or missing? Tell us — we read every report and fix issues fast.

Permutations vs Combinations

Both count ways to select r items from a set of n items. The difference is whether order matters.

Permutation Formula (nPr)

Order matters. The number of ordered arrangements of r items from n:

nPr = n! / (n − r)!

Example: How many ways can 3 runners finish 1st, 2nd, 3rd from 8 contestants?

  • 8P3 = 8! / 5! = 8 × 7 × 6 = 336

Combination Formula (nCr)

Order does not matter. The number of ways to choose r items from n:

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

Example: How many ways to pick a 3-person committee from 8 people?

  • 8C3 = 8! / (3! × 5!) = 336 / 6 = 56

Relationship Between nPr and nCr

Since combinations ignore order, nCr = nPr / r!. Every combination corresponds to r! permutations (all the rearrangements of the same r items).

Common Examples

ScenarioTypeFormulaResult
Lottery: pick 6 from 49Combination49C613,983,816
4-digit PIN (0-9)Permutation10P45,040
Poker hand (5 from 52)Combination52C52,598,960
Podium (top 3 of 20)Permutation20P36,840
Team of 4 from 15Combination15C41,365

Special Cases

  • nP0 = 1: There is exactly one way to arrange zero items
  • nPn = n!: Arranging all items is the full factorial
  • nC0 = nCn = 1: One way to choose nothing or everything
  • nC1 = n: Choosing 1 item from n gives n options
  • nCr = nC(n−r): Choosing r items to include is the same as choosing n−r to exclude

With Repetition

The formulas above assume items are selected without replacement. With repetition:

  • Permutations with repetition: nr (e.g., 4-digit PIN with repeats: 10&sup4; = 10,000)
  • Combinations with repetition: (n + r − 1)! / (r! × (n − 1)!)

Related Calculators

Frequently Asked Questions

What is the difference between a permutation and a combination?

A permutation counts arrangements where order matters, while a combination counts selections where order does not. ABC and BAC are two permutations but one combination. Use permutations for rankings, passwords, PIN codes and seating plans, and combinations for lottery numbers, committees and card hands. For the same n and r, permutations are never fewer than combinations.

What are the formulas for nPr and nCr?

nPr = n! / (n - r)! and nCr = n! / (r! × (n - r)!), where n! means n × (n - 1) × ... × 1 and 0! = 1. Combinations divide out the r! orderings of each group. For 10 items taken 3 at a time, 10P3 = 720 and 10C3 = 720 / 6 = 120.

What is 10 choose 3?

10 choose 3 equals 120. Using nCr = n! / (r! × (n - r)!), 10C3 = 3,628,800 / (6 × 5,040) = 120. Combinations are symmetric, so 10 choose 7 is also 120: picking 3 items to keep is the same as picking the 7 items to leave behind. That symmetry shortens the work when r is close to n.

How many ways can 5 people sit in a row?

There are 120 ways. Arranging all n items in order is nPn = n!, so for 5 people it is 5! = 5 × 4 × 3 × 2 × 1 = 120. The first seat has 5 choices, the second 4, and so on down to 1. Six people would have 720 arrangements.