Permutation & Combination Calculator (nPr / nCr)

Compute both nPr (permutations — arrangements where order matters) and nCr (combinations — selections where it doesn't) in one go. Results are exact even for large values, using big-integer arithmetic.

Result

How to use this calculator

  1. Enter n — how many items you have in total.
  2. Enter r — how many you're arranging or choosing.
  3. Press Calculate to get both nPr and nCr, computed exactly.
  4. Ask yourself: does order matter? Podium finishes → permutation. Lottery numbers → combination.

Formula used

nPr = n! ÷ (n − r)!  ·  nCr = n! ÷ (r! × (n − r)!)

n! (factorial) means n × (n−1) × … × 1. Permutations count ordered arrangements; dividing by r! removes the orderings of the chosen items, giving combinations. That's why nPr = nCr × r! always.

Example calculation

Worked example

From 10 runners, how many ways can 3 medals (gold, silver, bronze) be awarded? Order matters → P(10,3) = 10 × 9 × 8 = 720.

How many ways to pick any 3 of the 10 for a team? Order irrelevant → C(10,3) = 720 ÷ 3! = 720 ÷ 6 = 120.

Permutations vs combinations

Both count ways of choosing r items from n — the difference is whether order matters. A permutation treats ABC and CBA as different (passwords, rankings, seatings); a combination treats them as the same selection (committees, lottery tickets, pizza toppings).

Since every unordered selection of r items can be internally ordered r! ways, permutations always exceed combinations by exactly that factor. These counts grow explosively — C(49,6) is nearly 14 million, which is precisely why lottery jackpots are so hard to win.

Why use this calculator?

Frequently asked questions

How do I know whether to use nPr or nCr?

Ask if swapping two chosen items creates a different outcome. Different → order matters → permutation (nPr). Same → combination (nCr). Assigning roles is nPr; forming a group is nCr.

What is 0! and why does nC0 equal 1?

By definition 0! = 1 — it makes the formulas consistent. nC0 = 1 because there is exactly one way to choose nothing, and nCn = 1 because there's one way to take everything.

What are the chances of winning a 6-from-49 lottery?

C(49,6) = 13,983,816 possible tickets, so one ticket has a 1 in ~14 million chance ≈ 0.0000072%. Enter n=49, r=6 above to verify.

Related calculators