Permutation & Combination Calculator

nPr and nCr, with or without repetition — exact answers, with the formula, substitution, and cancellation worked out.

Mode

Repetition

How to use the permutation & combination calculator

  1. Pick permutations or combinations. Ask: does rearranging the result change it? A race podium does (nPr); a poker hand doesn’t (nCr).
  2. Pick repetition. Can the same item be chosen twice? Lock codes can; card hands can’t.
  3. Enter n and r. n is the pool size, r is how many you pick (whole numbers, 0–2000).
  4. Press Calculate. The exact answer appears — even 29-digit monsters — with the cancellation steps shown.
  5. Check the steps. Each line substitutes your numbers into the formula and cancels before multiplying, exactly like textbook working.

Frequently asked questions

What is the difference between permutations and combinations?

Order matters in permutations, not in combinations. Picking 1st, 2nd, 3rd from 5 runners is a permutation (5P3 = 60); picking any 3 friends from 5 for a team is a combination (5C3 = 10).

What does “with repetition” mean?

Whether the same item can be picked more than once. A 3-digit lock code allows repetition (10³ = 1,000 codes); dealing 3 cards from a deck doesn’t (52P3 = 132,600 ways).

Why must r be ≤ n without repetition?

You can’t pick 5 distinct items out of 3 — you’d run out. With repetition allowed, r can exceed n (like a 10-digit code from 10 digits).

How big can the answers get?

Enormous — factorials grow faster than exponentials. The calculator uses exact integer arithmetic (BigInt), so even a 29-digit answer like 100C50 = 100,891,344,545,564,193,334,812,497,256 is exact, not rounded.

What are 0P0 and 0C0?

Both equal 1. There’s exactly one way to choose nothing from nothing — the empty selection. It also keeps the formulas consistent (0! = 1).

More from the codex

Questions or feedback?

Found a bug or want a feature? Email [email protected] — every message is read by the indie dev behind the codex.