Skip to main content

Combinatorics Calculator – nCr, nPr & More

Quick answer

All counting forms together: C(5,2)=10, P(5,2)=20, with-repetition variants nʳ=32 and C(6,2)=15 — pick the right rule for each problem.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How the Combinatorics Calculator Works

C(n,r) = n!/(r!(n−r)!) | P(n,r) = n!/(n−r)! | with repetition: nʳ and C(n+r−1,r)

Counting problems differ on two axes — does order matter, and can items repeat — producing four standard formulas the calculator computes side by side. Choosing 2 from 5: unordered without repetition gives C(5,2) = 10; ordered without repetition gives P(5,2) = 5×4 = 20; ordered with repetition gives 5² = 25; unordered with repetition gives C(6,2) = 15. The tool prints all four together with the formula substitution so the source of each number is visible, then helps you classify your problem with two questions (order? repeats?). Factorial expansions are shown canceled, e.g. C(10,3) = (10×9×8)/(3×2×1) = 120, avoiding huge intermediate factorials. Sum rules appear for completeness: ΣC(n,k) = 2ⁿ counts all subsets, so a 5-element set has 32 subsets — the answer to many "how many groups" questions.

  1. 1

    Enter n and r

    The pool size and selection size

  2. 2

    Answer two questions

    Does order matter? Are repeats allowed?

  3. 3

    Read the matching formula

    All four counts are shown with substitutions

  4. 4

    Sanity-check the spread

    Ordered ≥ unordered, repetition ≥ no-repetition

Use Cases

Committee Formation

C(9,4) = 126 unordered committees from 9 people

Race Finishes

P(8,3) = 336 podium orders in an 8-runner race

Password Counting

Ordered with repetition: 62⁸ for 8-char alphanumeric

Tips

  • 1

    Order matters → permutations; otherwise combinations

  • 2

    Repetition allowed → nʳ (ordered) or C(n+r−1, r) (unordered)

  • 3

    All subsets of an n-set total 2ⁿ

Common Mistakes

  • Using nPr when the problem says "group" or "committee" — order-free

  • Forgetting repetition when items are returned or unlimited

  • Computing C(5,2) as 20 by skipping the r! divisor

  • Confusing 2ⁿ subsets with n! arrangements

FAQs

C(5,2) or P(5,2) — which for choosing 2 of 5?

Unordered choice: C(5,2) = 10. Ordered arrangement: P(5,2) = 20.

How many podium orders in an 8-runner race?

P(8,3) = 8×7×6 = 336.

How many 2-toppings picks from 5 with doubles allowed?

C(5+2−1,2) = C(6,2) = 15.

How many subsets does a 5-element set have?

2⁵ = 32, summing C(5,k) over k = 0…5.

What is C(10,3)?

120 — canceled form (10×9×8)/6.